From ef472bd66df18a87f4c56d07979d73cc8ee1e31e Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 25 Apr 2013 09:30:21 +0200 Subject: Let appmenu-qt support work also with pinned tabs to load This just need fixes ;) --- src/tabwindow/rekonqwindow.cpp | 8 +++++++- src/tabwindow/rekonqwindow.h | 1 + src/tabwindow/tabwidget.cpp | 3 +++ src/tabwindow/tabwidget.h | 1 + 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp index c0785b67..31af5387 100644 --- a/src/tabwindow/rekonqwindow.cpp +++ b/src/tabwindow/rekonqwindow.cpp @@ -99,12 +99,18 @@ void RekonqWindow::init() // signals connect(_tabWidget, SIGNAL(closeWindow()), this, SLOT(close())); connect(_tabWidget, SIGNAL(windowTitleChanged(QString)), this, SLOT(setWindowTitle(QString))); - + connect(_tabWidget, SIGNAL(actionsReady()), this, SLOT(registerWindow())); +} + + +void RekonqWindow::registerWindow() +{ // This is needed to properly support appmenu-qt feature RekonqFactory::createWidget(QL1S("menuBar"), this); QDBusConnection::sessionBus().registerObject(QL1S("rekonq"), this); } + // -------------------------------------------------------------------------------------------------- diff --git a/src/tabwindow/rekonqwindow.h b/src/tabwindow/rekonqwindow.h index 3c1d3c91..0166d0d0 100644 --- a/src/tabwindow/rekonqwindow.h +++ b/src/tabwindow/rekonqwindow.h @@ -75,6 +75,7 @@ public Q_SLOTS: private Q_SLOTS: void showBookmarksPanel(bool); void showHistoryPanel(bool); + void registerWindow(); private: TabWidget *_tabWidget; diff --git a/src/tabwindow/tabwidget.cpp b/src/tabwindow/tabwidget.cpp index ceb0765b..7e9f7328 100644 --- a/src/tabwindow/tabwidget.cpp +++ b/src/tabwindow/tabwidget.cpp @@ -334,6 +334,9 @@ WebWindow *TabWidget::prepareNewTab(WebPage *page) connect(tab, SIGNAL(setFullScreen(bool)), this, SLOT(setFullScreen(bool))); + if (count() == 0) + emit actionsReady(); + return tab; } diff --git a/src/tabwindow/tabwidget.h b/src/tabwindow/tabwidget.h index ef9a4bea..02ac9acd 100644 --- a/src/tabwindow/tabwidget.h +++ b/src/tabwindow/tabwidget.h @@ -89,6 +89,7 @@ public Q_SLOTS: Q_SIGNALS: void closeWindow(); void windowTitleChanged(QString); + void actionsReady(); private: /** -- cgit v1.2.1