changeset 626:51887087f1ae

* Added Ctrl-F shortcut for find button
author Sam Izzo <sam@humbug.net>
date Sun, 26 Aug 2012 02:19:36 +1000
parents 3c3827eb5106
children d39d236a0ce8
files src/findwidget.cpp
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/findwidget.cpp	Sun Aug 26 02:08:32 2012 +1000
+++ b/src/findwidget.cpp	Sun Aug 26 02:19:36 2012 +1000
@@ -33,6 +33,7 @@
     layout->addWidget(button, 0, 0);
     button->setText(tr("Find..."));
     button->setToolButtonStyle(Qt::ToolButtonTextOnly);
+    button->setShortcut(tr("Ctrl+F"));
     connect(button, SIGNAL(clicked()), this, SLOT(buttonPressed()));
 
     m_lineEdit = new QLineEdit();
@@ -59,15 +60,15 @@
     QAbstractButton *button = qobject_cast<QAbstractButton *>(sender());
     if (!button) return;
     if (m_lineEdit->isVisible()) {
-	m_lineEdit->hide();
-	button->setText(tr("Find..."));
+        m_lineEdit->hide();
+        button->setText(tr("Find..."));
         if (m_lineEdit->text() != "") {
             emit findTextChanged("");
         }
     } else {
-	m_lineEdit->show();
+        m_lineEdit->show();
         m_lineEdit->setFocus(Qt::OtherFocusReason);
-	button->setText(tr("Find:"));
+        button->setText(tr("Find:"));
         if (m_lineEdit->text() != "") {
             emit findTextChanged(m_lineEdit->text());
         }