From a60cff7901c30279be846da350d2ea74ec005dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Wed, 10 Nov 2010 23:30:45 +0000 Subject: [PATCH] KStandardAction::showMenubar => showHideMenubar svn path=/trunk/KDE/kdegraphics/okular/; revision=1195401 --- shell/shell.cpp | 5 +++-- shell/shell.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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; };