From 9e48d9d5449d78aab4a4e89001945fda8f571f66 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 1 Dec 2011 18:52:55 +0100 Subject: Fix bk toolbar initialization --- src/application.cpp | 2 +- src/mainwindow.cpp | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/application.cpp b/src/application.cpp index 27dca44f..9dd98a49 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -416,7 +416,7 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) Rekonq::OpenType newType = type; // Don't open useless tabs or windows for actions in about: pages - if(url.url().contains("about:") && url.url().contains("/")) + if (url.url().contains("about:") && url.url().contains("/")) newType = Rekonq::CurrentTab; // first, create the webview(s) to not let hangs UI.. diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0ccb6110..92c786df 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -217,7 +217,7 @@ MainWindow::MainWindow() setAcceptDrops(true); // Bookmark ToolBar (needs to be setup after the call to setupGUI()) - initBookmarkBar(); + QTimer::singleShot(1, this, SLOT(initBookmarkBar())); } @@ -259,9 +259,9 @@ void MainWindow::initBookmarkBar() } m_bookmarksBar = new BookmarkToolBar(XMLGUIBkBar, this); rApp->bookmarkProvider()->registerBookmarkBar(m_bookmarksBar); + QAction *a = actionByName(QL1S("show_bookmarks_toolbar")); a->setChecked(XMLGUIBkBar->isVisible()); - connect(a, SIGNAL(toggled(bool)), this, SLOT(toggleBookmarkBarVisible(bool))); } @@ -505,6 +505,7 @@ void MainWindow::setupActions() a = new KAction(KIcon("bookmarks-bar"), i18n("Bookmarks Toolbar"), this); a->setCheckable(true); actionCollection()->addAction(QL1S("show_bookmarks_toolbar"), a); + connect(a, SIGNAL(toggled(bool)), this, SLOT(toggleBookmarkBarVisible(bool))); // User Agent a = new KAction(KIcon("preferences-web-browser-identification"), i18n("Browser Identification"), this); @@ -614,13 +615,16 @@ void MainWindow::setupPanels() void MainWindow::finalizeGUI(KXMLGUIClient* client) { KXmlGuiWindow::finalizeGUI(client); - //update rekonqMenu when GUI has changed + + // update rekonqMenu when GUI has changed KMenu *m = qobject_cast(factory()->container("rekonqMenu", this)); if (m) m_rekonqMenu->addActions(m->actions()); else - kDebug() << "Could not get the rekonqMenu menu. Maybe the rekonqui.rc file wasn't found. Was" - << "rekonq installed correctly?"; + kDebug() << " ====================== " + << "Could not get the rekonqMenu menu. Maybe the rekonqui.rc file wasn't found." + << "Was rekonq installed correctly?" + << " ====================== "; } -- cgit v1.2.1