From 37d134fe8582af0a62afed77871837490e918719 Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Thu, 30 Dec 2010 01:52:40 +0100 Subject: [PATCH] disabled some warnings in growl stuff, added version number --- 3party/CMakeLists.txt | 8 ++++++-- CMakeLists.txt | 2 ++ src/trayicon.cpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/3party/CMakeLists.txt b/3party/CMakeLists.txt index 71c8cf6..674c8eb 100644 --- a/3party/CMakeLists.txt +++ b/3party/CMakeLists.txt @@ -1,19 +1,23 @@ if(WITH_GROWL_BACKEND) +add_definitions("-DGROWL_CPP_STATIC -DGROWL_STATIC") + if( WIN32 ) link_libraries ( ws2_32 ) + if(MSVC) + add_definitions("-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1 -D_CRT_NONSTDC_NO_WARNINGS") + endif(MSVC) endif( WIN32 ) + set( GROWL_SEND_SRC gntp-send/source/growl.c gntp-send/source/tcp.c gntp-send/source/md5.c ) add_library( growl STATIC ${GROWL_SEND_SRC} ) -set_target_properties( growl PROPERTIES DEFINE_SYMBOL "GROWL_STATIC" ) add_library( growl_cpp STATIC gntp-send/source/growl++.cpp) -set_target_properties( growl_cpp PROPERTIES DEFINE_SYMBOL "DGROWL_CPP_STATIC" ) target_link_libraries ( growl_cpp growl) endif(WITH_GROWL_BACKEND) diff --git a/CMakeLists.txt b/CMakeLists.txt index 443bf40..6264aee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,6 +42,8 @@ if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:wchar_t-") endif(MSVC) +add_definitions("-DSNORE_VERSION=\"0.2\"") + option(WITH_FREEDESKTOP_FRONTEND "Build the freedesktop frontend" OFF) option(WITH_GROWL_BACKEND "Build the Growl backend" ON) diff --git a/src/trayicon.cpp b/src/trayicon.cpp index 4603614..223c0d0 100644 --- a/src/trayicon.cpp +++ b/src/trayicon.cpp @@ -30,7 +30,7 @@ TrayIcon::TrayIcon(QSystemTrayIcon *trayIcon, SnoreServer *snore ): void TrayIcon::initConextMenu(){ _trayMenu = new QMenu("SnoreNotify"); - _trayMenu->addAction("SnoreNotify"); + _trayMenu->addAction(QString("SnoreNotify ").append(SNORE_VERSION)); _trayMenu->addSeparator(); foreach(Notification_Backend *back,_snore->primaryNotificationBackends()){ QAction *b= new QAction(back->name(),this);