diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-10 11:43:09 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-08-10 11:43:09 +0200 |
commit | 1c38aae39d5ec6ee6b422b7f9c0ac54478de88d2 (patch) | |
tree | e89687025bd77eb5bed24c1556cbed4cdd91c7d7 /src/mainwindow.cpp | |
parent | - Fix Ctrl + wheel shortcut (diff) | |
download | rekonq-1c38aae39d5ec6ee6b422b7f9c0ac54478de88d2.tar.xz |
- Checkable action for the zoom and find bars
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 9 |
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"))); |