diff --git a/src/core/snoreserver.cpp b/src/core/snoreserver.cpp index fb258d8..791ff13 100644 --- a/src/core/snoreserver.cpp +++ b/src/core/snoreserver.cpp @@ -43,9 +43,14 @@ void SnoreServer::publicatePlugin(QObject *plugin){ Notification_Backend * nb=qobject_cast(plugin); if(nb){ qDebug()<property("name").value()<<"is a Notification_Backend"; - if(nb->isPrimaryNotificationBackend()) + if(nb->isPrimaryNotificationBackend()){ + if(primaryNotificationBackend){ + notyfier.append(primaryNotificationBackend); + connect(this,SIGNAL(notify(QSharedPointer)),primaryNotificationBackend,SLOT(notify(QSharedPointer))); + + } primaryNotificationBackend=nb; - else{ + }else{ notyfier.append(nb); connect(this,SIGNAL(notify(QSharedPointer)),nb,SLOT(notify(QSharedPointer))); } diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 91f6466..c2947a7 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -1,12 +1,12 @@ SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/plugins) -#add_subdirectory(freedesktopnotification) +add_subdirectory(freedesktopnotification) add_subdirectory(freedesktopfrontend) add_subdirectory(redirector) add_subdirectory(webposter) add_subdirectory(registredapps) add_subdirectory(snarlnetwork) -#add_subdirectory(snarl) -#add_subdirectory(dbusbinding) +add_subdirectory(snarl) +add_subdirectory(dbusbinding) add_subdirectory(growl) diff --git a/src/plugins/freedesktopnotification/CMakeLists.txt b/src/plugins/freedesktopnotification/CMakeLists.txt index 641cbab..785b058 100644 --- a/src/plugins/freedesktopnotification/CMakeLists.txt +++ b/src/plugins/freedesktopnotification/CMakeLists.txt @@ -1,4 +1,4 @@ -if(QT_QTDBUS_FOUND) +if(QT_QTDBUS_FOUND AND UNIX AND NOT APPLE) message(STATUS "Adding Freedesktop notification backend") set ( FREEDESKTOP_NOTIFICATION_SRC freedesktopnotification_backend.cpp @@ -6,7 +6,7 @@ if(QT_QTDBUS_FOUND) ) automoc4_add_library(freedesktop_backend MODULE ${FREEDESKTOP_NOTIFICATION_SRC} ) target_link_libraries(freedesktop_backend snore ${QT_QTGUI_LIBRARY} ${QT_QTDBUS_LIBRARY} ) -else(QT_QTDBUS_FOUND) - message(STATUS "Adding Freedesktop notification backend.... for Freedesktop notification backend support QDBus is needed") -endif(QT_QTDBUS_FOUND) +else(QT_QTDBUS_FOUND AND UNIX AND NOT APPLE) + message(STATUS "Adding Freedesktop notification backend.... ") +endif(QT_QTDBUS_FOUND AND UNIX AND NOT APPLE) diff --git a/src/plugins/growl/CMakeLists.txt b/src/plugins/growl/CMakeLists.txt index 863333e..d117a2e 100644 --- a/src/plugins/growl/CMakeLists.txt +++ b/src/plugins/growl/CMakeLists.txt @@ -1,8 +1,10 @@ find_library(GROWL_CPP NAMES growl++ ) -set( GROWL__SRC - growl_backend.cpp - ) -automoc4_add_library(growl_backend MODULE ${GROWL__SRC} ) -target_link_libraries(growl_backend snore ${QT_QTCORE_LIBRARY} ${GROWL_CPP} ) - +if( GROWL_CPP ) + message( STATUS "Found libgrowl, adding libgrowl backend" ) + set( GROWL__SRC + growl_backend.cpp + ) + automoc4_add_library(growl_backend MODULE ${GROWL__SRC} ) + target_link_libraries(growl_backend snore ${QT_QTCORE_LIBRARY} ${GROWL_CPP} ) +endif(GROWL_CPP ) diff --git a/src/plugins/growl/growl_backend.h b/src/plugins/growl/growl_backend.h index 5c2e015..3db98d0 100644 --- a/src/plugins/growl/growl_backend.h +++ b/src/plugins/growl/growl_backend.h @@ -10,7 +10,7 @@ public: ~Growl_Backend(); bool isPrimaryNotificationBackend(){return true;} private: - int id; + uint id; class Growl *growl; public slots: int notify(QSharedPointernotification);