diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-06-10 00:31:11 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-06-20 23:49:29 +0200 |
commit | 0cd3c09a8c51682a2e39ef51834c38785db4bda3 (patch) | |
tree | 07b4964c6486df9352377cc712bb972af16b95bf | |
parent | start moving things.. (diff) | |
download | rekonq-0cd3c09a8c51682a2e39ef51834c38785db4bda3.tar.xz |
Working on new notify system...
new download icon
-rw-r--r-- | icons/CMakeLists.txt | 2 | ||||
-rw-r--r-- | icons/pics/CMakeLists.txt | 4 | ||||
-rw-r--r-- | icons/pics/hi64-actions-download.png | bin | 0 -> 4518 bytes | |||
-rw-r--r-- | src/application.cpp | 27 | ||||
-rw-r--r-- | src/application.h | 7 |
5 files changed, 26 insertions, 14 deletions
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt index 9d7ead58..d575cf4d 100644 --- a/icons/CMakeLists.txt +++ b/icons/CMakeLists.txt @@ -1,2 +1,4 @@ # install standard icons KDE4_INSTALL_ICONS( ${ICON_INSTALL_DIR} ) + +ADD_SUBDIRECTORY( pics ) diff --git a/icons/pics/CMakeLists.txt b/icons/pics/CMakeLists.txt new file mode 100644 index 00000000..53d04224 --- /dev/null +++ b/icons/pics/CMakeLists.txt @@ -0,0 +1,4 @@ +INSTALL( + FILES hi64-actions-download.png + DESTINATION ${DATA_INSTALL_DIR}/rekonq/pics +) diff --git a/icons/pics/hi64-actions-download.png b/icons/pics/hi64-actions-download.png Binary files differnew file mode 100644 index 00000000..aa1101c1 --- /dev/null +++ b/icons/pics/hi64-actions-download.png diff --git a/src/application.cpp b/src/application.cpp index 0a6d641d..b9b15acd 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -42,6 +42,7 @@ #include <KConfig> #include <kio/job.h> #include <kio/jobclasses.h> +#include <KPassivePopup> // Qt Includes #include <QtCore/QTimer> @@ -253,24 +254,28 @@ KUrl Application::guessUrlFromString(const QString &string) return url; } -void Application::notify(const QString &msg, Rekonq::Notify status) + +void Application::notifyMsg(const QString &msg, Rekonq::Notify status) { + QPixmap px; + switch(status) { - case Rekonq::success: -// hi32-actions-emoticon.png - KPassivePopup::message(); + case Rekonq::Success: + px.load("hi32-actions-emoticon.png"); + KPassivePopup::message( i18n("Success!"), msg, px, this, 2); break; - case Rekonq::error: -// hi32-actions-edit-delete.png - KPassivePopup::message(); + case Rekonq::Error: + px.load("hi32-actions-edit-delete.png"); + KPassivePopup::message( i18n("Error!"), msg, px, this, 2); break; - case Rekonq::download: -// kget/pics - KPassivePopup::message(); + case Rekonq::Download: + QString path = KStandardDirs::locate("appdata", "pics/hi64-actions-download.png"); + px.load(path); + KPassivePopup::message( i18n("Download!"), msg, px, this, 2); break; default: kDebug() << "nothing to be notified.."; break; } -}
\ No newline at end of file +} diff --git a/src/application.h b/src/application.h index acb300ed..05db3ecb 100644 --- a/src/application.h +++ b/src/application.h @@ -63,8 +63,9 @@ namespace Rekonq { Success, ///< url successfully (down)loaded Error, ///< url failed to (down)load - Download ///< downloading url - } + Download, ///< downloading url + Info ///< information + }; } @@ -86,7 +87,7 @@ public: KIcon icon(const KUrl &url) const; - void notify(const QString &msg, Rekonq::Notify status); + void notifyMsg(const QString &msg, Rekonq::Notify status); static KUrl guessUrlFromString(const QString &url); |