From d4af6c8a5919109336d11a0c093968866d3cd35d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 21 Feb 2012 11:39:16 +0100 Subject: Get sure mainbar is restored on restart after fullscreen close Also take care about updating actions panels state --- src/mainwindow.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 54f1b800..1d2304c4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -244,15 +244,15 @@ void MainWindow::setupToolbars() a = new KAction(i18n("Location Bar"), this); a->setDefaultWidget(m_view->widgetBar()); actionCollection()->addAction(QL1S("url_bar"), a); - - KToolBar *mainBar = toolBar("mainToolBar"); - - mainBar->show(); // this just to fix reopening rekonq after fullscreen close } void MainWindow::postLaunch() { + // this just to fix reopening rekonq after fullscreen close + KToolBar *mainBar = toolBar("mainToolBar"); + mainBar->show(); + // Bookmarks Bar KToolBar *XMLGUIBkBar = toolBar("bookmarkToolBar"); if (!XMLGUIBkBar) @@ -585,6 +585,7 @@ void MainWindow::setupPanels() actionCollection()->addAction(QL1S("show_history_panel"), a); a->setCheckable(true); connect(a, SIGNAL(triggered(bool)), m_historyPanel, SLOT(setVisible(bool))); + connect(m_historyPanel, SIGNAL(visibilityChanged(bool)), a, SLOT(setChecked(bool))); // STEP 2 // Setup bookmarks panel @@ -605,6 +606,7 @@ void MainWindow::setupPanels() actionCollection()->addAction(QL1S("show_bookmarks_panel"), a); a->setCheckable(true); connect(a, SIGNAL(triggered(bool)), m_bookmarksPanel, SLOT(setVisible(bool))); + connect(m_bookmarksPanel, SIGNAL(visibilityChanged(bool)), a, SLOT(setChecked(bool))); // STEP 3 // Setup webinspector panel -- cgit v1.2.1