Bug 376961

Summary: Can't hide menu bar
Product: [Applications] dragonplayer Reporter: dS810 <artem.anufrij>
Component: generalAssignee: Harald Sitter <sitter>
Status: RESOLVED FIXED    
Severity: normal CC: hrishikeshbman, myriam
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description dS810 2017-02-26 17:46:14 UTC
Dragon Player doesn't remember menu bar state:

- Open DP
- Hide menu bar (ctrl+m)
- Close DP
- Open it again -> menu bar is visible.
Comment 1 Hrishikesh Barman 2017-03-13 18:41:52 UTC
I have been looking into the code, can anyone help me with where should I start. I've tried understanding the top down approach from the main.cpp to partToolbar.cpp and the fullScreenToolBarHandler.cpp. It will be helpful if someone can point me where the code for keyboard shortcut ctrl+m exists.
Comment 2 Harald Sitter 2017-03-14 09:55:29 UTC
(In reply to Hrishikesh Barman from comment #1)
> I have been looking into the code, can anyone help me with where should I
> start. I've tried understanding the top down approach from the main.cpp to
> partToolbar.cpp and the fullScreenToolBarHandler.cpp. It will be helpful if
> someone can point me where the code for keyboard shortcut ctrl+m exists.

In MainWindow::setupActions. That probably won't help because none of the logic lives there though, only the shortcut setup. The code actually managing the menubar show/hide is in the framework kxmlgui in the file kmainwindow.cpp.

FWIW, since this is entirely controlled by the that framework I'd first have a look if other applications with this feature work as expected. If not, the chances are high that the bug is in fact in the framework and not how dragon uses it.
Comment 3 Burkhard Lück 2017-08-21 14:16:35 UTC
*** Bug 375064 has been marked as a duplicate of this bug. ***
Comment 4 Harald Sitter 2018-10-09 11:38:53 UTC
Git commit 96c7f9314c4ef181c8a55f3e0aad0cfefb608e18 by Harald Sitter, on behalf of Arthur Pichlkostner.
Committed on 09/10/2018 at 11:38.
Pushed by sitter into branch 'Applications/18.08'.

Fix: user settings for gui not saved after program is closed

Summary:
When the player switches to full screen mode the settings for the visibility of menubar, toolbar and statusbar are set to fixed values and the user settings are saved in backup variables.
These backup values are restored when the player is closed. If the player is not in full screen mode, the backup variable have default values and the user settings are overwritten.

Solution: Restore settings only when the window is in fullscreen mode.

Reviewers: sitter

Reviewed By: sitter

Differential Revision: https://phabricator.kde.org/D15594

M  +6    -4    src/app/mainWindow.cpp

https://commits.kde.org/dragon/96c7f9314c4ef181c8a55f3e0aad0cfefb608e18