summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-08-18 10:40:39 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-08-18 10:40:39 +0200
commit54daf59a18612100ad0d9b9e051164dd6334e51a (patch)
treed57cb8dc838e0bd23ea9c0dbdf49c651f6894fa7 /src/mainwindow.cpp
parentMerge commit 'refs/merge-requests/172' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-54daf59a18612100ad0d9b9e051164dd6334e51a.tar.xz
Fix tools & bookmarks shortcuts behavior
Patch (and implementation) by Glad Deschrijver. Thanks!
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp39
1 files changed, 26 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()));
+ }
+}