diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-08-22 01:57:59 +0200 |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-08-22 04:10:58 +0200 |
commit | 8e19bc87f8a83fde67e8492c0fbe7dd48752ca94 (patch) | |
tree | 165c1676f1584a40b4f4f57e908a1e479e53768a | |
parent | Make the FindBar a bit more robust (diff) | |
download | rekonq-8e19bc87f8a83fde67e8492c0fbe7dd48752ca94.tar.xz |
Change the Find action to show() instead of toggle()
The find actions generally show a find bar, and is not a toggle action.
A general pattern of use is to press "/" or Ctrl+F to show the find
bar with the currently selected text, and press escape to hide the bar.
-rw-r--r-- | src/findbar.cpp | 5 | ||||
-rw-r--r-- | src/findbar.h | 3 | ||||
-rw-r--r-- | src/mainwindow.cpp | 3 |
3 files changed, 1 insertions, 10 deletions
diff --git a/src/findbar.cpp b/src/findbar.cpp index 18a4f168..bad3bf50 100644 --- a/src/findbar.cpp +++ b/src/findbar.cpp @@ -181,8 +181,3 @@ void FindBar::notifyMatch(bool match) m_lineEdit->setPalette(p); m_hideTimer->start(60000); } - -void FindBar::toggleVisibility() -{ - isVisible() ? hide() : show(); -} diff --git a/src/findbar.h b/src/findbar.h index 974d6137..d82e9722 100644 --- a/src/findbar.h +++ b/src/findbar.h @@ -57,9 +57,6 @@ public: void setVisible(bool visible); -public slots: - void toggleVisibility(); - signals: void searchString(const QString &); void visibilityChanged(bool); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 28a3bebf..5eb43aa0 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -365,11 +365,10 @@ void MainWindow::setupActions() KStandardAction::print(this, SLOT(printRequested()), actionCollection()); KStandardAction::quit(this , SLOT(close()), actionCollection()); - a = KStandardAction::find(m_findBar, SLOT(toggleVisibility()), actionCollection()); + a = KStandardAction::find(m_findBar, SLOT(show()), actionCollection()); KShortcut findShortcut = KStandardShortcut::find(); findShortcut.setAlternate(Qt::Key_Slash); a->setShortcut(findShortcut); - a->setCheckable(true); a->setChecked(m_findBar->isVisible()); connect(m_findBar, SIGNAL(visibilityChanged(bool)), a, SLOT(setChecked(bool))); |