summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp39
-rw-r--r--src/mainwindow.h4
2 files changed, 30 insertions, 13 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index cbef274a..73779627 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -211,19 +211,7 @@ void MainWindow::setupToolbars()
void MainWindow::postLaunch()
{
- KToolBar *mainBar = toolBar("mainToolBar");
-
- QToolButton *bookmarksButton = qobject_cast<QToolButton*>(mainBar->widgetForAction(actionByName( QL1S("bookmarksActionMenu") )));
- if(bookmarksButton)
- {
- connect(actionByName(QL1S("bookmarksActionMenu")), SIGNAL(triggered()), bookmarksButton, SLOT(showMenu()));
- }
-
- QToolButton *toolsButton = qobject_cast<QToolButton*>(mainBar->widgetForAction(actionByName( QL1S("rekonq_tools") )));
- if(toolsButton)
- {
- connect(actionByName(QL1S("rekonq_tools")), SIGNAL(triggered()), toolsButton, SLOT(showMenu()));
- }
+ setupBookmarksAndToolsShortcuts();
// setting popup notification
m_popup->setAutoDelete(false);
@@ -1343,3 +1331,28 @@ bool MainWindow::queryClose()
}
return true;
}
+
+
+void MainWindow::saveNewToolbarConfig()
+{
+ KXmlGuiWindow::saveNewToolbarConfig();
+ setupBookmarksAndToolsShortcuts();
+}
+
+
+void MainWindow::setupBookmarksAndToolsShortcuts()
+{
+ KToolBar *mainBar = toolBar("mainToolBar");
+
+ QToolButton *bookmarksButton = qobject_cast<QToolButton*>(mainBar->widgetForAction(actionByName( QL1S("bookmarksActionMenu") )));
+ if(bookmarksButton)
+ {
+ connect(actionByName(QL1S("bookmarksActionMenu")), SIGNAL(triggered()), bookmarksButton, SLOT(showMenu()));
+ }
+
+ QToolButton *toolsButton = qobject_cast<QToolButton*>(mainBar->widgetForAction(actionByName( QL1S("rekonq_tools") )));
+ if(toolsButton)
+ {
+ connect(actionByName(QL1S("rekonq_tools")), SIGNAL(triggered()), toolsButton, SLOT(showMenu()));
+ }
+}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index e5a43649..50c73b4b 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -81,6 +81,7 @@ public:
void setWidgetsVisible(bool makeFullScreen);
private:
+ void setupBookmarksAndToolsShortcuts();
void setupActions();
void setupTools();
void setupToolbars();
@@ -108,6 +109,9 @@ signals:
void ctrlTabPressed();
void shiftCtrlTabPressed();
+protected slots:
+ void saveNewToolbarConfig();
+
protected:
/**
* Filters (SHIFT + ) CTRL + TAB events and emit (shift)ctrlTabPressed()