summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4d6883ef..e547e8e3 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -294,10 +294,12 @@ void MainWindow::setupActions()
KStandardAction::print(this, SLOT(printRequested()), actionCollection());
KStandardAction::quit(this , SLOT(close()), actionCollection());
- a = KStandardAction::find(m_findBar, SLOT(show()), actionCollection());
+ a = KStandardAction::find(m_findBar, SLOT(toggleVisibility()), actionCollection());
KShortcut findShortcut = KStandardShortcut::find();
findShortcut.setAlternate(Qt::Key_Slash);
a->setShortcut(findShortcut);
+ a->setCheckable(true);
+ connect(m_findBar, SIGNAL(visibilityChanged(bool)), a, SLOT(setChecked(bool)));
KStandardAction::findNext(this, SLOT(findNext()) , actionCollection());
KStandardAction::findPrev(this, SLOT(findPrevious()) , actionCollection());
@@ -457,7 +459,10 @@ void MainWindow::setupTools()
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Print)));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Find)));
- toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Zoom)));
+ QAction *action = actionByName(KStandardAction::name(KStandardAction::Zoom));
+ action->setCheckable(true);
+ connect (m_zoomBar, SIGNAL(visibilityChanged(bool)), action, SLOT(setChecked(bool)));
+ toolsMenu->addAction(action);
toolsMenu->addAction(actionByName(QL1S("encodings")));