SVN commit 1133024 by hindenburg: Fix issue where the menu status for View menubar is not correct. CCBUG: 181345 M +12 -1 MainWindow.cpp M +3 -0 MainWindow.h --- branches/KDE/4.4/kdebase/apps/konsole/src/MainWindow.cpp #1133023:1133024 @@ -267,7 +267,6 @@ _toggleMenuBarAction = new KToggleAction(this); _toggleMenuBarAction->setText( i18n("Show Menu Bar") ); _toggleMenuBarAction->setIcon( KIcon("show-menu") ); - _toggleMenuBarAction->setChecked( !menuBar()->isHidden() ); connect( _toggleMenuBarAction , SIGNAL(toggled(bool)) , menuBar() , SLOT(setVisible(bool)) ); collection->addAction("show-menubar",_toggleMenuBarAction); @@ -491,5 +490,17 @@ KNotifyConfigWidget::configure( this ); } +void MainWindow::showEvent(QShowEvent *event) +{ + // This code from Konqueror. + // We need to check if our toolbars are shown/hidden here, and set + // our menu items accordingly. We can't do it in the constructor because + // view profiles store toolbar info, and that info is read after + // construct time. + _toggleMenuBarAction->setChecked( !menuBar()->isHidden() ); + // Call parent method + KXmlGuiWindow::showEvent(event); +} + #include "MainWindow.moc" --- branches/KDE/4.4/kdebase/apps/konsole/src/MainWindow.h #1133023:1133024 @@ -141,6 +141,9 @@ void closeActiveSessionRequest(); protected: + // Reimplemented for internal reasons. + virtual void showEvent(QShowEvent *event); + // reimplemented from KMainWindow virtual bool queryClose(); virtual void saveProperties(KConfigGroup& group);