diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-11-27 23:48:09 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-11-27 23:48:09 +0100 |
commit | 564e889812a0cbf086f60c0b6c4d35e8aac38795 (patch) | |
tree | 0c07a422508990414e54f9f6ad8a694159849706 /src | |
parent | Unifies macro style (diff) | |
download | rekonq-564e889812a0cbf086f60c0b6c4d35e8aac38795.tar.xz |
Shortcut + slot to open downloads page (in a new focused tab)
Google code-in 2011 task by Omer Faruk Oruc.
Thanks!!!
REVIEW: 103207
REVIEWED-BY: furkan, adjam
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 10 | ||||
-rw-r--r-- | src/mainwindow.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9ba7ee79..d7b45a32 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -375,6 +375,12 @@ void MainWindow::setupActions() tabAction->setDelayed(false); actionCollection()->addAction(QL1S("tab_list"), tabAction); + //================================Download======================================== + a = new KAction(KIcon("download"), i18n("Downloads"), this); + a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_J)); + actionCollection()->addAction(QL1S("openDownloadsPage"), a); + connect(a, SIGNAL(triggered(bool)), this, SLOT(openDownloadsPage())); + // =============================== Tools Actions ================================= a = new KAction(i18n("View Page S&ource"), this); a->setIcon(KIcon("application-xhtml+xml")); @@ -910,6 +916,10 @@ void MainWindow::viewFullScreen(bool makeFullScreen) KToggleFullScreenAction::setFullScreen(this, makeFullScreen); } +void MainWindow::openDownloadsPage() +{ + rApp->loadUrl(KUrl("about:downloads"), Rekonq::NewFocusedTab); +} void MainWindow::setWidgetsVisible(bool makeVisible) { diff --git a/src/mainwindow.h b/src/mainwindow.h index 581b4fd1..e64cdc22 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -89,6 +89,7 @@ private: void setupPanels(); public Q_SLOTS: + void openDownloadsPage(); void homePage(Qt::MouseButtons = Qt::LeftButton, Qt::KeyboardModifiers = Qt::NoModifier); /** |