summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-04-18 03:24:47 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-04-18 03:24:47 +0200
commitcc6c9e776848b49dc717a8d351d103f3f7be9642 (patch)
treea4e242d5fa35119b59ad2feace8d0df1122a52c5 /src/mainwindow.cpp
parentpedantic (diff)
downloadrekonq-cc6c9e776848b49dc717a8d351d103f3f7be9642.tar.xz
clear location bar action. As requested
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b68a6ad1..077a057b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -162,7 +162,7 @@ void MainWindow::setupToolBars()
// location bar
a = new KAction(i18n("Location Bar"), this);
- a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_L, Qt::Key_F6));
+ a->setShortcut(KShortcut(Qt::Key_F6));
a->setDefaultWidget(m_view->lineEditStack());
actionCollection()->addAction(QLatin1String("url_bar"), a);
@@ -284,6 +284,15 @@ void MainWindow::setupActions()
a->setShortcuts(QApplication::isRightToLeft() ? KStandardShortcut::tabNext() : KStandardShortcut::tabPrev());
actionCollection()->addAction(QLatin1String("show_prev_tab"), a);
connect(a, SIGNAL(triggered(bool)), m_view, SLOT(previousTab()));
+
+ // clear Location Bar action (Henry de Valance WISH)
+ a = new KAction(KIcon("edit-clear-locationbar-rtl"), i18n("Clear Location Bar"), this);
+ a->setShortcut(Qt::CTRL+Qt::Key_L);
+ actionCollection()->addAction(QLatin1String("clear_location"),a);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(slotClearLocationBar()));
+ a->setWhatsThis(i18n( "<html>Clear Location bar<br /><br />"
+ "Clears the contents of the location bar.</html>" ));
+
}
@@ -841,4 +850,12 @@ bool MainWindow::queryClose()
return true;
}
- \ No newline at end of file
+
+
+void MainWindow::slotClearLocationBar()
+{
+ QLineEdit *lineEdit = m_view->currentLineEdit();
+ lineEdit->clear();
+ lineEdit->setFocus();
+}
+