From 765d801f7248ada3950fd0b01b88127ed1729e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Sat, 14 Jul 2007 23:20:11 +0000 Subject: [PATCH] - "Search Output..." -> "Search Output", since it toggles a search bar on/off. - Make the action checkable. - Connect to the toggled() signal instead of triggered(). - Uncheck the action when the search bar is closed. svn path=/trunk/KDE/kdebase/apps/konsole/; revision=687983 --- src/SessionController.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/SessionController.cpp b/src/SessionController.cpp index c8edb3e5..4adfafaf 100644 --- a/src/SessionController.cpp +++ b/src/SessionController.cpp @@ -464,12 +464,13 @@ void SessionController::setupActions() connect( action , SIGNAL(triggered()) , this , SLOT(decreaseTextSize()) ); // Scrollback - _searchToggleAction = new KAction(i18n("Search Output..."),this); + _searchToggleAction = new KAction(i18n("Search Output"),this); _searchToggleAction->setShortcut( QKeySequence(Qt::CTRL+Qt::SHIFT+Qt::Key_F) ); _searchToggleAction->setIcon( KIcon("edit-find") ); + _searchToggleAction->setCheckable(true); action = collection->addAction("search-history" , _searchToggleAction); - connect( action , SIGNAL(triggered()) , this , SLOT(searchHistory()) ); - + connect( action , SIGNAL(toggled(bool)) , this , SLOT(searchHistory(bool)) ); + _findNextAction = collection->addAction("find-next"); _findNextAction->setIcon( KIcon("find-next") ); _findNextAction->setText( i18n("Find Next") ); @@ -638,7 +639,7 @@ void SessionController::clearAndReset() } void SessionController::searchClosed() { - searchHistory(false); + _searchToggleAction->toggle(); } void SessionController::searchHistory()