summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-02-21 11:39:16 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-02-21 11:53:56 +0100
commit56eea3785a2e3156b38fbafb779c25adcd5322f3 (patch)
tree39c1e7ec2be1db4a9c420b3c5ea2bcde6497387b /src
parentGet sure urlbar is updated on bookmarking (diff)
downloadrekonq-56eea3785a2e3156b38fbafb779c25adcd5322f3.tar.xz
Get sure mainbar is restored on restart after fullscreen close
Also take care about updating actions panels state Cherry-picked from d4af6c8a5919
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkstoolbar.cpp8
-rw-r--r--src/mainwindow.cpp10
2 files changed, 12 insertions, 6 deletions
diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp
index 8dbda960..fc9a32df 100644
--- a/src/bookmarks/bookmarkstoolbar.cpp
+++ b/src/bookmarks/bookmarkstoolbar.cpp
@@ -289,7 +289,9 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
case QEvent::DragEnter:
{
QDragEnterEvent *dragEvent = static_cast<QDragEnterEvent*>(event);
- if (dragEvent->mimeData()->hasFormat("application/rekonq-bookmark") || dragEvent->mimeData()->hasFormat("text/uri-list") || dragEvent->mimeData()->hasFormat("text/plain"))
+ if (dragEvent->mimeData()->hasFormat("application/rekonq-bookmark")
+ || dragEvent->mimeData()->hasFormat("text/uri-list")
+ || dragEvent->mimeData()->hasFormat("text/plain"))
{
QFrame* dropIndicatorWidget = new QFrame(toolBar());
dropIndicatorWidget->setFrameShape(QFrame::VLine);
@@ -319,7 +321,9 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
case QEvent::DragMove:
{
QDragMoveEvent *dragEvent = static_cast<QDragMoveEvent*>(event);
- if (dragEvent->mimeData()->hasFormat("application/rekonq-bookmark") || dragEvent->mimeData()->hasFormat("text/uri-list") || dragEvent->mimeData()->hasFormat("text/plain"))
+ if (dragEvent->mimeData()->hasFormat("application/rekonq-bookmark")
+ || dragEvent->mimeData()->hasFormat("text/uri-list")
+ || dragEvent->mimeData()->hasFormat("text/plain"))
{
QAction *overAction = toolBar()->actionAt(dragEvent->pos());
KBookmarkActionInterface *overActionBK = dynamic_cast<KBookmarkActionInterface*>(overAction);
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