Bug 260682

Summary: Canceling menu bar hide keeps "show menu bar" action unchecked
Product: [Applications] konversation Reporter: Nicolás Alvarez <nalvarez>
Component: generalAssignee: Konversation Developers <konversation-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nicolás Alvarez 2010-12-19 07:48:07 UTC
Open the Preferences menu, select "Show menu bar" to uncheck it (or, press Ctrl-M). A warning appears asking if you're sure you want to hide the menu bar. Click cancel.

Go to the Preferences menu again. The "Show menu bar" action appears unchecked, even though the menu bar is visible. Right-clicking the ircview also shows "Show menu bar" as an unchecked action. Selecting this action does nothing with the menu bar, it just makes the menu item checked and the context menu item disappear.
Comment 1 Peter Simonsson 2010-12-19 10:02:44 UTC
commit 0f1260e6344387f91341c243e0ebd2328260431e
branch master
Author: Peter Simonsson <peter.simonsson@gmail.com>
Date:   Sun Dec 19 10:01:42 2010 +0100

    Update the action on canceling the menu bar hide
    
    The action was not updated if the hiding of the menu bar was canceled
    from the warning dialog.
    
    BUG:260682

diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4e0fb5e..3fc4a5b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -726,6 +726,8 @@ void MainWindow::toggleMenubar(bool dontShowWarning)
         }
         if (doit)
             menuBar()->hide();
+        else
+            hideMenuBarAction->setChecked (true);
     }
 
     Preferences::self()->setShowMenuBar(hideMenuBarAction->isChecked());