summaryrefslogtreecommitdiff
path: root/src/webwindow/webwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-11-02 09:55:20 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:06 +0100
commit050b861d8f9904d905bc74963780ec5c8f2982a8 (patch)
tree703ef601d6b636677a38fd5e3462f761ab9dd77c /src/webwindow/webwindow.cpp
parentImprove webapp creation, fixing title name choice (diff)
downloadrekonq-050b861d8f9904d905bc74963780ec5c8f2982a8.tar.xz
Fix and improve rekonq tools menu
- added "open" menu (A-LA firefox) with: - new tab - new windown - new incognito window ------ - open (local) file - added "bookmarks" menu with: - add bookmark ---- - show bookmarks page - show bookmarks toolbar - edit bookmarks (maybe, we'll list all bk after a separator there in the future...) - show history && downloads page Obviously checked/fixed all the relative slots finally, added in the menu quit option :D
Diffstat (limited to 'src/webwindow/webwindow.cpp')
-rw-r--r--src/webwindow/webwindow.cpp42
1 files changed, 35 insertions, 7 deletions
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp
index 697ecba7..06f0ffac 100644
--- a/src/webwindow/webwindow.cpp
+++ b/src/webwindow/webwindow.cpp
@@ -209,21 +209,34 @@ void WebWindow::setupActions()
KStandardAction::quit(rApp, SLOT(queryQuit()), actionCollection());
// Bookmark Toolbar
- a = new KAction(KIcon("bookmarks-bar"), i18n("Bookmarks Toolbar"), this);
+ a = new KAction(KIcon("bookmark-toolbar"), i18n("Bookmarks Toolbar"), this);
a->setCheckable(true);
a->setChecked(ReKonfig::showBookmarksToolbar());
actionCollection()->addAction(QL1S("show_bookmarks_toolbar"), a);
connect(a, SIGNAL(toggled(bool)), this, SLOT(toggleBookmarksToolbar(bool)));
- // Open Downloads page
- a = new KAction(KIcon("download"), i18n("Downloads"), this);
+ // Open special pages
+ // Home
+ a = actionCollection()->addAction(KStandardAction::Home);
+ connect(a, SIGNAL(triggered(Qt::MouseButtons, Qt::KeyboardModifiers)), this, SLOT(openHomePage(Qt::MouseButtons, Qt::KeyboardModifiers)));
+
+ // Downloads
+ a = new KAction(KIcon("download"), i18n("Downloads page"), this);
a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_J));
actionCollection()->addAction(QL1S("open_downloads_page"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(openDownloadsPage()));
- // Open Home Page
- a = actionCollection()->addAction(KStandardAction::Home);
- connect(a, SIGNAL(triggered(Qt::MouseButtons, Qt::KeyboardModifiers)), this, SLOT(openHomePage(Qt::MouseButtons, Qt::KeyboardModifiers)));
+ // History
+ a = new KAction(KIcon("view-history"), i18n("History page"), this);
+ a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_H));
+ actionCollection()->addAction(QL1S("open_history_page"), a);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(openHistoryPage()));
+
+ // Bookmarks
+ a = new KAction(KIcon("bookmarks"), i18n("Bookmarks page"), this);
+ a->setShortcut(KShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
+ actionCollection()->addAction(QL1S("open_bookmarks_page"), a);
+ connect(a, SIGNAL(triggered(bool)), this, SLOT(openBookmarksPage()));
// find action
a = KStandardAction::find(m_findBar, SLOT(show()), actionCollection());
@@ -285,6 +298,9 @@ void WebWindow::setupActions()
KShortcut bkShortcut(Qt::CTRL + Qt::Key_D);
a->setShortcut(bkShortcut);
+ // Edit bookmarks
+ a = KStandardAction::editBookmarks(BookmarkManager::self(), SLOT(slotEditBookmarks()), actionCollection());
+
// User Agent
a = new KAction(KIcon("preferences-web-browser-identification"), i18n("Browser Identification"), this);
actionCollection()->addAction(QL1S("useragent"), a);
@@ -924,7 +940,19 @@ void WebWindow::checkFocus()
void WebWindow::openDownloadsPage()
{
- rApp->loadUrl( QUrl("about:downloads"), Rekonq::NewTab );
+ rApp->loadUrl( QUrl("about:downloads"), Rekonq::NewFocusedTab );
+}
+
+
+void WebWindow::openHistoryPage()
+{
+ rApp->loadUrl( QUrl("about:history"), Rekonq::NewFocusedTab );
+}
+
+
+void WebWindow::openBookmarksPage()
+{
+ rApp->loadUrl( QUrl("about:bookmarks"), Rekonq::NewFocusedTab );
}