diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-06-21 22:11:39 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-06-21 22:11:39 +0200 |
commit | 9501cf849628c5aeef669f12db87d43ed03c357a (patch) | |
tree | ceb5c24d0c17feb94414fb66b40eb0694fdbc1e7 /src/mainwindow.cpp | |
parent | Deleting popup in empty msg (diff) | |
download | rekonq-9501cf849628c5aeef669f12db87d43ed03c357a.tar.xz |
New notifying system. Perhaps this should be default for
rekonq 0.2. Anyway, there are a lot of improvements needed.
We'll see..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 811d607b..c7e3c945 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -60,6 +60,7 @@ #include <KJobUiDelegate> #include <KPassivePopup> #include <KStandardDirs> +#include <KIconLoader> #include <kdeprintdialog.h> #include <kprintpreview.h> @@ -162,7 +163,7 @@ void MainWindow::postLaunch() connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *))); // "status bar" messages (new notifyMessage system) - connect(m_view, SIGNAL(showStatusBarMessage(const QString&)), this, SLOT(notifyMessage(const QString&))); + connect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); connect(m_view, SIGNAL(linkHovered(const QString&)), this, SLOT(notifyMessage(const QString&))); // update toolbar actions signals @@ -850,8 +851,10 @@ QAction *MainWindow::actionByName(const QString name) } +// FIXME: better implement me, please!! void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) { + // deleting popus if empty msgs if(msg.isEmpty()) { delete m_popup; @@ -865,29 +868,26 @@ void MainWindow::notifyMessage(const QString &msg, Rekonq::Notify status) m_popup->setAutoDelete(true); QPixmap px; + QString pixPath; switch(status) { case Rekonq::Info: - m_popup->setView(msg); break; case Rekonq::Success: - px.load("hi32-actions-emoticon.png"); - m_popup->setView( i18n("Success!"), msg, px); break; case Rekonq::Error: - px.load("hi32-actions-edit-delete.png"); - m_popup->setView( i18n("Error!"), msg, px); break; case Rekonq::Download: - px.load( KStandardDirs::locate("appdata", "pics/hi64-actions-download.png") ); - m_popup->setView( i18n("Download!"), msg, px); break; default: kDebug() << "nothing to be notified.."; break; } + m_popup->setView(msg); + + // setting popus in bottom-left position int x = geometry().x(); int y = geometry().y() + height() - 45; QPoint p(x,y); |