only install the dbus interface if the freedesktop frontend is build

This commit is contained in:
Patrick von Reth 2011-08-12 17:23:17 +02:00
parent 98b9f23434
commit 29f9f677f8
5 changed files with 14 additions and 13 deletions

View File

@ -1,13 +1,5 @@
set(SNORE_LOCATION ${CMAKE_INSTALL_PREFIX}/bin/snorenotify)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.Notifications.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service
DESTINATION share/dbus-1/services/)
install(FILES FindLibsnore.cmake DESTINATION share/apps/cmake/modules)
if(KDE4_FOUND)
install(FILES snorenotify.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
endif(KDE4_FOUND)
endif(KDE4_FOUND)

View File

@ -152,6 +152,7 @@ void SnoreServer::applicationIsInitialized ( Application *application )
void SnoreServer::removeApplication ( const QString& appName )
{
qDebug()<<"Remove Application"<<appName;
emit applicationRemoved ( _applications.value ( appName ) );
_applications.take ( appName )->deleteLater();
}

View File

@ -11,9 +11,18 @@ if(QT_QTDBUS_FOUND AND WITH_FREEDESKTOP_FRONTEND)
automoc4_add_library(freedesktop_frontend MODULE ${FREEDESKTOP_NOTIFICATION_FRONTEND_SRC} )
target_link_libraries(freedesktop_frontend snorecore ${QT_QTDBUS_LIBRARY} ${QT_QTGUI_LIBRARY} )
if(KDE4_FOUND)
target_link_libraries(freedesktop_frontend ${KDE4_KDEUI_LIBRARY})
endif(KDE4_FOUND)
if(KDE4_FOUND)
target_link_libraries(freedesktop_frontend ${KDE4_KDEUI_LIBRARY})
endif(KDE4_FOUND)
#install the dbus interface
set(SNORE_LOCATION ${CMAKE_INSTALL_PREFIX}/bin/snorenotify)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/org.freedesktop.Notifications.service.cmake ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.freedesktop.Notifications.service
DESTINATION share/dbus-1/services/)
install(TARGETS freedesktop_frontend ${PLUGIN_INSTALL_PATH})
endif(QT_QTDBUS_FOUND AND WITH_FREEDESKTOP_FRONTEND)

View File

@ -96,7 +96,6 @@ uint Snarl_Backend::notify(Notification notification){
}
uint id = notification.id();
qDebug()<<"Snarl is localfile"<<notification.icon().isLocalFile();
if(id == 0){
id = snarlInterface->Notify(notification.alert().toUtf8().constData(),
Notification::toPlainText(notification.title()).toUtf8().constData(),