Bug 409813 - Wrong label for focusing the terminal in the Tools menu when the terminal was closed from the command line
Summary: Wrong label for focusing the terminal in the Tools menu when the terminal was...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Neon Linux
: NOR minor
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-15 08:56 UTC by Raphaël Jakse
Modified: 2022-01-16 19:12 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A video of the bug (369.07 KB, video/ogg)
2019-07-15 08:56 UTC, Raphaël Jakse
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Raphaël Jakse 2019-07-15 08:56:03 UTC
SUMMARY

In the Tools menu, if the terminal was closed using CTRL+D or command "exit", the "Focus terminal" item is wrongly labeled "Defocus Terminal" 

STEPS TO REPRODUCE
1. Open kate. The terminal is initially closed. If open, close it.
2. Open the Tools menu. Click on the rightly labeled "Focus Terminal"
3. Type exit or ctrl+D in the terminal
4. Open the Tools menu.

OBSERVED RESULT
The terminal is not focused nor open, but item "Focus Terminal" is labeled "Defocus Terminal". Activating it actually focuses the terminal. 

EXPECTED RESULT

The item is labelled "Focus Terminal", or "Toggle Terminal Focus"

SOFTWARE/OS VERSIONS Latest Docker Neon Unstable image and openSUSE Tumbleweed.
Comment 1 Raphaël Jakse 2019-07-15 08:56:43 UTC
Created attachment 121524 [details]
A video of the bug
Comment 2 danielloureiro32 2019-09-20 11:34:03 UTC
I'm having the same problem. Not only the label is wrong, but pressing the menu button does not work, neither does the shortcut (F4 by default).

When following the steps to reproduce I notice that the button (or shortcut) does always open the terminal, but it does not focus or defocus, idependently of whats written in the label. I don't really care about whats written on the label but the actual functionality of the shortcut is now broken.

I know that this happened with a recent update (I'm using KDE neon 5.16), since I have always used this shortcut on a daily basis.
Comment 3 Justin Zobel 2020-10-27 08:33:31 UTC
Can confirm this is still the case on git master.

The state of focus of the terminal is not well reflected in the Tools Menu.

1. Open Kate
2. Press F4 to open terminal (terminal is now in focus)
3. Go to Tools menu and it says Focus Terminal (clicking it de-focusses terminal)
Comment 4 Bug Janitor Service 2022-01-14 18:16:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/559
Comment 5 Christoph Cullmann 2022-01-16 19:12:36 UTC
Git commit d883d7506b3ade45bba57c09a50a1ee0753c5322 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 16/01/2022 at 19:08.
Pushed by cullmann into branch 'master'.

Fix terminal focus action text when focusing/defocusing

M  +11   -7    addons/konsole/kateconsole.cpp
M  +5    -0    addons/konsole/kateconsole.h

https://invent.kde.org/utilities/kate/commit/d883d7506b3ade45bba57c09a50a1ee0753c5322