diff --git a/src/core/snoreserver.cpp b/src/core/snoreserver.cpp index 0d19361..2d351b9 100644 --- a/src/core/snoreserver.cpp +++ b/src/core/snoreserver.cpp @@ -28,7 +28,7 @@ QString const SnoreServer::snoreTMP=QDir::temp().path()+"/SnoreNotify/"; SnoreServer::SnoreServer(QSystemTrayIcon *trayIcon): - _notificationBackend(0), + _notificationBackend(NULL), _trayIcon(trayIcon) { qDebug()<<"Inititalized"; @@ -89,6 +89,7 @@ void SnoreServer::publicatePlugin(SnorePlugin *plugin){ _primaryNotificationBackends.insert(pluginName,nb); if(_notificationBackend==NULL){ _notificationBackend=nb; + qDebug()<<"Primary NotificationBackend is"<name(); }else{ connect(this,SIGNAL(notify(QSharedPointer)),nb,SLOT(notify(QSharedPointer))); } diff --git a/src/core/snoreserver.h b/src/core/snoreserver.h index 9927f3f..6e24cce 100644 --- a/src/core/snoreserver.h +++ b/src/core/snoreserver.h @@ -43,6 +43,7 @@ public: void applicationIsInitialized(Application* application); void removeApplication(const QString& appName); const ApplicationsList &aplications() const; + const QHash &primaryNotificationBackends() const; void setNotificationBackend(Notification_Backend *backend); diff --git a/src/core/trayiconnotifer.cpp b/src/core/trayiconnotifer.cpp index f26ee61..51c2aeb 100644 --- a/src/core/trayiconnotifer.cpp +++ b/src/core/trayiconnotifer.cpp @@ -23,3 +23,7 @@ int TrayIconNotifer::notify(QSharedPointer notification){ void TrayIconNotifer::closeNotification(QSharedPointer notification){ } + +bool TrayIconNotifer::isPrimaryNotificationBackend(){ + return false; +} diff --git a/src/core/trayiconnotifer.h b/src/core/trayiconnotifer.h index db742e4..09bec3a 100644 --- a/src/core/trayiconnotifer.h +++ b/src/core/trayiconnotifer.h @@ -9,7 +9,7 @@ class TrayIconNotifer:public Notification_Backend Q_OBJECT public: TrayIconNotifer(class SnoreServer *snore=0,class QSystemTrayIcon *icon=0); - bool isPrimaryNotificationBackend(){return true;} + bool isPrimaryNotificationBackend(); public slots: void registerApplication(Application *application); diff --git a/src/plugins/growl/growl_backend.cpp b/src/plugins/growl/growl_backend.cpp index 3f8820a..2dab93b 100644 --- a/src/plugins/growl/growl_backend.cpp +++ b/src/plugins/growl/growl_backend.cpp @@ -28,7 +28,7 @@ Growl_Backend::Growl_Backend(SnoreServer *snore): Notification_Backend("Growl",snore), id(0) { - const char *n[1] = { "SnoreNotification"}; + const char *n[1] = { "Default Alert"}; Growl *growl = new Growl(GROWL_TCP,NULL,"SnoreNotify",n,1); _applications.insert("SnoreNotify",growl); @@ -71,8 +71,8 @@ int Growl_Backend::notify(QSharedPointer notification){ QString title=Notification::toPlainText(notification->title()); QString text=Notification::toPlainText(notification->text()); - qDebug()<application()<Notify(notification->application().toLatin1().data(),title.toLatin1().data(),text.toLatin1().data(),NULL,notification->icon().toLatin1().data()); + qDebug()<<"Notify Growl:"<application()<Notify(notification->alert().toLatin1().data(),title.toLatin1().data(),text.toLatin1().data(),"",notification->icon().toLatin1().data()); return ++id; }