diff --git a/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.cpp b/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.cpp index cea1f5c..beef894 100644 --- a/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.cpp +++ b/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.cpp @@ -86,8 +86,13 @@ uint FreedesktopNotification_Frontend::Notify(const QString &app_name, uint repl hints["image_data"].value()>>image; icon=getImagefromHint(image); } - - QSharedPointer noti(new Notification(this,app_name,"",summary,body,icon,timeout==-1?Notification::DefaultTimeout:timeout/1000,replaces_id)); + if(!snore()->aplications().contains(app_name)){ + Application *a = new Application(app_name); + a->addAlert(new Alert("DBus Alert","DBus Alert")); + snore()->addApplication(a); + snore()->applicationIsInitialized(a); + } + QSharedPointer noti(new Notification(this,app_name,"DBus Alert",summary,body,icon,timeout==-1?Notification::DefaultTimeout:timeout/1000,replaces_id)); return snore()->broadcastNotification(noti); } diff --git a/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.h b/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.h index e2dc63e..0764954 100644 --- a/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.h +++ b/src/plugins/freedesktopfrontend/freedesktopnotificationfrontend.h @@ -25,18 +25,14 @@ class FreedesktopNotification_Frontend:public Notification_Frontend{ public: FreedesktopNotification_Frontend(class SnoreServer *snore=0); ~FreedesktopNotification_Frontend(); - QString getImagefromHint(const class FreedesktopImageHint &img); void actionInvoked(QSharedPointernotification); void notificationClosed(QSharedPointernotification); - uint Notify(const QString &app_name, uint replaces_id, const QString &app_icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout); - void CloseNotification( uint id ); QStringList GetCapabilities(); - QString GetServerInformation(QString& vendor, QString& version, QString& specVersion); signals: