reenabled some backends, if an other primary abckend is loaded the current one is qued to the others

This commit is contained in:
theonering 2010-03-06 18:44:25 +01:00
parent 787f62d6ea
commit 7b45723f4c
5 changed files with 23 additions and 16 deletions

View File

@ -43,9 +43,14 @@ void SnoreServer::publicatePlugin(QObject *plugin){
Notification_Backend * nb=qobject_cast<Notification_Backend *>(plugin); Notification_Backend * nb=qobject_cast<Notification_Backend *>(plugin);
if(nb){ if(nb){
qDebug()<<plugin->property("name").value<QString>()<<"is a Notification_Backend"; qDebug()<<plugin->property("name").value<QString>()<<"is a Notification_Backend";
if(nb->isPrimaryNotificationBackend()) if(nb->isPrimaryNotificationBackend()){
if(primaryNotificationBackend){
notyfier.append(primaryNotificationBackend);
connect(this,SIGNAL(notify(QSharedPointer<Notification>)),primaryNotificationBackend,SLOT(notify(QSharedPointer<Notification>)));
}
primaryNotificationBackend=nb; primaryNotificationBackend=nb;
else{ }else{
notyfier.append(nb); notyfier.append(nb);
connect(this,SIGNAL(notify(QSharedPointer<Notification>)),nb,SLOT(notify(QSharedPointer<Notification>))); connect(this,SIGNAL(notify(QSharedPointer<Notification>)),nb,SLOT(notify(QSharedPointer<Notification>)));
} }

View File

@ -1,12 +1,12 @@
SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/plugins) SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH}/plugins)
#add_subdirectory(freedesktopnotification) add_subdirectory(freedesktopnotification)
add_subdirectory(freedesktopfrontend) add_subdirectory(freedesktopfrontend)
add_subdirectory(redirector) add_subdirectory(redirector)
add_subdirectory(webposter) add_subdirectory(webposter)
add_subdirectory(registredapps) add_subdirectory(registredapps)
add_subdirectory(snarlnetwork) add_subdirectory(snarlnetwork)
#add_subdirectory(snarl) add_subdirectory(snarl)
#add_subdirectory(dbusbinding) add_subdirectory(dbusbinding)
add_subdirectory(growl) add_subdirectory(growl)

View File

@ -1,4 +1,4 @@
if(QT_QTDBUS_FOUND) if(QT_QTDBUS_FOUND AND UNIX AND NOT APPLE)
message(STATUS "Adding Freedesktop notification backend") message(STATUS "Adding Freedesktop notification backend")
set ( FREEDESKTOP_NOTIFICATION_SRC set ( FREEDESKTOP_NOTIFICATION_SRC
freedesktopnotification_backend.cpp freedesktopnotification_backend.cpp
@ -6,7 +6,7 @@ if(QT_QTDBUS_FOUND)
) )
automoc4_add_library(freedesktop_backend MODULE ${FREEDESKTOP_NOTIFICATION_SRC} ) automoc4_add_library(freedesktop_backend MODULE ${FREEDESKTOP_NOTIFICATION_SRC} )
target_link_libraries(freedesktop_backend snore ${QT_QTGUI_LIBRARY} ${QT_QTDBUS_LIBRARY} ) target_link_libraries(freedesktop_backend snore ${QT_QTGUI_LIBRARY} ${QT_QTDBUS_LIBRARY} )
else(QT_QTDBUS_FOUND) else(QT_QTDBUS_FOUND AND UNIX AND NOT APPLE)
message(STATUS "Adding Freedesktop notification backend.... for Freedesktop notification backend support QDBus is needed") message(STATUS "Adding Freedesktop notification backend.... ")
endif(QT_QTDBUS_FOUND) endif(QT_QTDBUS_FOUND AND UNIX AND NOT APPLE)

View File

@ -1,8 +1,10 @@
find_library(GROWL_CPP NAMES growl++ ) find_library(GROWL_CPP NAMES growl++ )
set( GROWL__SRC if( GROWL_CPP )
growl_backend.cpp message( STATUS "Found libgrowl, adding libgrowl backend" )
) set( GROWL__SRC
automoc4_add_library(growl_backend MODULE ${GROWL__SRC} ) growl_backend.cpp
target_link_libraries(growl_backend snore ${QT_QTCORE_LIBRARY} ${GROWL_CPP} ) )
automoc4_add_library(growl_backend MODULE ${GROWL__SRC} )
target_link_libraries(growl_backend snore ${QT_QTCORE_LIBRARY} ${GROWL_CPP} )
endif(GROWL_CPP )

View File

@ -10,7 +10,7 @@ public:
~Growl_Backend(); ~Growl_Backend();
bool isPrimaryNotificationBackend(){return true;} bool isPrimaryNotificationBackend(){return true;}
private: private:
int id; uint id;
class Growl *growl; class Growl *growl;
public slots: public slots:
int notify(QSharedPointer<Notification>notification); int notify(QSharedPointer<Notification>notification);