From 564e889812a0cbf086f60c0b6c4d35e8aac38795 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 27 Nov 2011 23:48:09 +0100 Subject: 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 --- src/mainwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mainwindow.cpp') 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) { -- cgit v1.2.1