diff --git a/shell/shell.cpp b/shell/shell.cpp index 1eb3e07e9..317631182 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -187,7 +188,7 @@ void Shell::setupActions() setStandardToolBarMenuEnabled(true); - m_showMenuBarAction = KStandardAction::showMenubar( this, SLOT( slotShowMenubar() ), actionCollection()); + m_showMenuBarAction = KStandardAction::showHideMenubar( this, SLOT( slotShowMenubar() ), actionCollection()); m_fullScreenAction = KStandardAction::fullScreen( this, SLOT( slotUpdateFullScreen() ), this,actionCollection() ); } @@ -280,7 +281,7 @@ void Shell::setFullScreen( bool useFullScreen ) void Shell::showEvent(QShowEvent *e) { - m_showMenuBarAction->setChecked( menuBar()->isVisible() ); + m_showMenuBarAction->setActive( menuBar()->isVisible() ); KParts::MainWindow::showEvent(e); } diff --git a/shell/shell.h b/shell/shell.h index 850e7e37f..f81ca96b8 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -19,6 +19,7 @@ #include class KCmdLineArgs; +class KDualAction; class KRecentFilesAction; class KToggleAction; @@ -99,7 +100,7 @@ private: bool m_fileformatsscanned; KAction* m_printAction; KToggleAction* m_fullScreenAction; - KToggleAction* m_showMenuBarAction; + KDualAction* m_showMenuBarAction; bool m_menuBarWasShown, m_toolBarWasShown; KUrl m_openUrl; };