diff src/findwidget.cpp @ 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 1ff2a1bf0a40
children ae67ea0af696
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());
         }