summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainwindow.cpp21
-rw-r--r--src/mainwindow.h1
2 files changed, 20 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();
+}
+
diff --git a/src/mainwindow.h b/src/mainwindow.h
index a9363d8a..b9b90b5e 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -82,6 +82,7 @@ private slots:
void slotOpenLocation();
void slotAboutToShowBackMenu();
void geometryChangeRequested(const QRect &geometry);
+ void slotClearLocationBar();
// history related
void slotOpenActionUrl(QAction *action);