summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 7a45d945..3ac46a1b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -176,13 +176,18 @@ void MainWindow::postLaunch()
connect(m_findBar, SIGNAL(searchString(const QString &)), this, SLOT(slotFind(const QString &)));
// bookmarks loading
- connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&)));
+ connect(Application::bookmarkProvider(), SIGNAL(openUrl(const KUrl&, const Rekonq::OpenType&)),
+ Application::instance(), SLOT(loadUrl(const KUrl&, const Rekonq::OpenType&)));
// setting up toolbars to NOT have context menu enabled
setContextMenuPolicy(Qt::DefaultContextMenu);
// accept d'n'd
setAcceptDrops(true);
+
+ const qlonglong winId = window()->winId();
+ Application::cookieJar()->setWindowId(winId);
+ Application::networkAccessManager()->metaData().insert("window-id", QString::number(winId));
}
@@ -252,7 +257,7 @@ void MainWindow::setupActions()
m_stopReloadAction = new KAction(this);
actionCollection()->addAction(QLatin1String("stop_reload") , m_stopReloadAction);
m_stopReloadAction->setShortcutConfigurable(false);
- connect(m_view, SIGNAL(browserLoading(bool)), this, SLOT(slotBrowserLoading(bool)));
+ connect(m_view, SIGNAL(browserTabLoading(bool)), this, SLOT(slotBrowserLoading(bool)));
slotBrowserLoading(false); //first init for blank start page
// ============== Custom Actions
@@ -367,7 +372,7 @@ void MainWindow::setupTools()
void MainWindow::setupSidePanel()
{
// Setup history side panel
- m_sidePanel = new SidePanel(i18n("History"), this);
+ m_sidePanel = new SidePanel(i18n("History Panel"), this);
connect(m_sidePanel, SIGNAL(openUrl(const KUrl&)), Application::instance(), SLOT(loadUrl(const KUrl&)));
connect(m_sidePanel, SIGNAL(destroyed()), Application::instance(), SLOT(slotSaveConfiguration()));
@@ -375,7 +380,6 @@ void MainWindow::setupSidePanel()
// setup side panel actions
KAction* a = (KAction *) m_sidePanel->toggleViewAction();
- a->setText( i18n("History Panel") );
a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); // WARNING : is this the right shortcut ??
a->setIcon(KIcon("view-history"));
actionCollection()->addAction(QLatin1String("show_history_panel"), a);
@@ -451,7 +455,6 @@ void MainWindow::slotUpdateConfiguration()
// ====== load Settings on main classes
Application::networkAccessManager()->loadSettings();
-// FIXME (?) Application::cookieJar()->loadSettings();
Application::historyManager()->loadSettings();
}
@@ -908,12 +911,13 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
return;
}
- if(m_popup)
- delete m_popup;
+ KPassivePopup *popup_sav = m_popup;
m_popup = new KPassivePopup(this);
m_popup->setAutoDelete(true);
+ connect(Application::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)), m_popup, SLOT(hide()));
+
QPixmap px;
QString pixPath;
@@ -953,6 +957,10 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
QPoint p(x,y);
m_popup->show(p);
+
+ if(popup_sav)
+ delete popup_sav;
+
}