X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=simplexbmcremote-0.8.1%2Fgenericnotify.cpp;fp=simplexbmcremote-0.8.1%2Fgenericnotify.cpp;h=0000000000000000000000000000000000000000;hb=49c2b95c2e9bfe342d822a9534100bafeed308d4;hp=bdefdb73d874a1545b005a77ba53acfbe3d26cb8;hpb=a3cf4f79d3cde0b08b3badc0fb2caa5739265b1e;p=simple-xmbc-rem diff --git a/simplexbmcremote-0.8.1/genericnotify.cpp b/simplexbmcremote-0.8.1/genericnotify.cpp deleted file mode 100644 index bdefdb7..0000000 --- a/simplexbmcremote-0.8.1/genericnotify.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifdef Q_WS_MAEMO_5 -#include -#else -#include -#endif - -#include "genericnotify.h" -#include "constants.h" -#include - -void notify::init() -{ -#ifdef Q_WS_MAEMO_5 -#else - /* Init libnotify library */ - notify_init(APPLICATION_NAME); -#endif -} - -void notify::notify(const QString& msg) -{ -#ifdef Q_WS_MAEMO_5 - QMaemo5InformationBox::information (0, msg); -#else - /* Create notification */ - NotifyNotification *notification = notify_notification_new(APPLICATION_NAME, qPrintable(msg), 0, 0); - if (notification) { - QSettings settings; - int timeout = settings.value(SETUP_NOTIFICATION_TIMEOUT, SETUP_NOTIFICATION_TIMEOUT_DEFAULT).toInt(); - - /* Set timeout */ - notify_notification_set_timeout(notification, timeout); - - /* Schedule notification for showing */ - if (!notify_notification_show(notification, NULL)) { - qDebug("Failed to send notification"); - } - - /* Clean up the memory */ - g_object_unref(notification); - } -#endif - qDebug(qPrintable(msg)); -}