diff options
-rw-r--r-- | src/mainwindow.cpp | 30 | ||||
-rw-r--r-- | src/mainwindow.h | 2 | ||||
-rw-r--r-- | src/rekonqui.rc | 4 |
3 files changed, 30 insertions, 6 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 65975a3e..5958e4be 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -120,7 +120,7 @@ MainWindow::MainWindow() // setting up toolbars && location bar: this has to be done BEFORE setupGUI!! setupBars(); - + // Bookmark Menu KActionMenu *bmMenu = Application::bookmarkProvider()->bookmarkActionMenu(); bmMenu->setIcon(KIcon("rating")); @@ -130,6 +130,9 @@ MainWindow::MainWindow() // Side Panel: this has to be done BEFORE setupGUI!! setupSidePanel(); + // setting up rekonq tools: to be done BEFORE setupGUI! + setupTools(); + // a call to KXmlGuiWindow::setupGUI() populates the GUI // with actions, using KXMLGUI. // It also applies the saved mainwindow settings, if any, and ask the @@ -316,10 +319,29 @@ 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())); +} - // ==================== Bookmarks Actions -// QAction *ba = Application::bookmarkProvider()->actionByName("rekonq_add_bookmark"); -// actionCollection()->addAction(QLatin1String("rekonq_add_bookmark"), ba); + +void MainWindow::setupTools() +{ + KActionMenu *toolsMenu = new KActionMenu(KIcon("configure"), i18n("rekonq tools"), this); + toolsMenu->setDelayed(false); + + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::SaveAs))); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Print))); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Find))); + toolsMenu->addSeparator(); + toolsMenu->addAction(actionByName(QLatin1String("private_browsing"))); + toolsMenu->addAction(actionByName(QLatin1String("web_inspector"))); + toolsMenu->addAction(actionByName(QLatin1String("page_source"))); + toolsMenu->addSeparator(); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::ShowMenubar))); + toolsMenu->addAction(actionByName(QLatin1String("show_history_panel"))); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::FullScreen))); + toolsMenu->addSeparator(); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Preferences))); + + actionCollection()->addAction(QLatin1String("rekonq_tools"), toolsMenu); } diff --git a/src/mainwindow.h b/src/mainwindow.h index c8ce7673..f49a0615 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -68,6 +68,8 @@ private: void setupActions(); void setupHistoryMenu(); void setupBars(); + void setupTools(); + void setupSidePanel(); SidePanel *sidePanel(); diff --git a/src/rekonqui.rc b/src/rekonqui.rc index dfb7aef7..f91daafd 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE gui SYSTEM "kpartgui.dtd"> -<gui name="rekonq" version="43"> +<gui name="rekonq" version="44"> <MenuBar> @@ -89,7 +89,7 @@ <Action name="go_home" /> <Action name="url_bar" /> <Action name="bookmarksActionMenu" /> - <Action name="options_configure" /> + <Action name="rekonq_tools" /> </ToolBar> <!-- ============ Bookmarks ToolBar =========== --> |