summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-03-16 19:46:55 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-03-16 19:46:55 +0100
commit39225590f65749fe628ba6b91482f0eb6124dcb6 (patch)
tree8317b238fdc749d3b679031c698b9f8c114c38cf /src/mainwindow.cpp
parentrekonq 0.6.88 (diff)
downloadrekonq-39225590f65749fe628ba6b91482f0eb6124dcb6.tar.xz
Delete url popup on resize/move
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 34587b12..b3c03ce6 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -108,7 +108,7 @@ MainWindow::MainWindow()
, m_userAgentMenu(new KMenu(this))
, m_bookmarksBar(0)
, m_popup(new KPassivePopup(this))
- , m_hidePopup(new QTimer(this))
+ , m_hidePopupTimer(new QTimer(this))
, m_toolsMenu(0)
, m_developerMenu(0)
{
@@ -277,7 +277,7 @@ void MainWindow::postLaunch()
connect(rApp, SIGNAL(focusChanged(QWidget*, QWidget*)), m_popup, SLOT(hide()));
m_popup->setFrameShape(QFrame::NoFrame);
m_popup->setLineWidth(0);
- connect(m_hidePopup, SIGNAL(timeout()), m_popup, SLOT(hide()));
+ connect(m_hidePopupTimer, SIGNAL(timeout()), m_popup, SLOT(hide()));
// notification system
connect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), this, SLOT(notifyMessage(const QString&, Rekonq::Notify)));
@@ -1117,11 +1117,11 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
// deleting popus if empty msgs
if (msg.isEmpty())
{
- m_hidePopup->start(250);
+ m_hidePopupTimer->start(250);
return;
}
- m_hidePopup->stop();
+ m_hidePopupTimer->stop();
switch (status)
@@ -1129,7 +1129,7 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status)
case Rekonq::Url:
break;
case Rekonq::Info:
- m_hidePopup->start(500);
+ m_hidePopupTimer->start(500);
break;
case Rekonq::Success:
break;
@@ -1537,3 +1537,25 @@ void MainWindow::showUserAgentSettings()
dialog->deleteLater();
}
+
+
+void MainWindow::moveEvent(QMoveEvent *event)
+{
+ if (m_hidePopupTimer)
+ m_hidePopupTimer->stop();
+ if (m_popup)
+ m_popup->hide();
+
+ KMainWindow::moveEvent(event);
+}
+
+
+void MainWindow::resizeEvent(QResizeEvent *event)
+{
+ if (m_hidePopupTimer)
+ m_hidePopupTimer->stop();
+ if (m_popup)
+ m_popup->hide();
+
+ KMainWindow::resizeEvent(event);
+}