summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp11
-rw-r--r--Swift/QtUI/QtSwift.h2
-rw-r--r--Swift/QtUI/SConscript3
3 files changed, 16 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 758fe29..ee97fc6 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -36,6 +36,11 @@
#include "Swift/Controllers/BuildVersion.h"
#include "SwifTools/AutoUpdater/AutoUpdater.h"
#include "SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.h"
+#if defined(HAVE_GROWL)
+#include "SwifTools/Notifier/GrowlNotifier.h"
+#else
+#include "SwifTools/Notifier/NullNotifier.h"
+#endif
#if defined(SWIFTEN_PLATFORM_MACOSX)
#include "SwifTools/Dock/MacOSXDock.h"
#else
@@ -90,6 +95,11 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
capsStorage_ = new CapsFileStorage(applicationPathProvider_->getDataDir() / "caps");
chatWindowFactory_ = new QtChatWindowFactory(splitter_, settings_, tabs_, "");
soundPlayer_ = new QtSoundPlayer(applicationPathProvider_);
+#if defined(HAVE_GROWL)
+ notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME);
+#else
+ notifier_ = new NullNotifier();
+#endif
#if defined(SWIFTEN_PLATFORM_MACOSX)
dock_ = new MacOSXDock(&cocoaApplication_);
@@ -131,6 +141,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
capsStorage_,
vcardStorageFactory_,
dock_,
+ notifier_,
options.count("latency-debug") > 0);
mainControllers_.push_back(mainController);
}
diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h
index 657b749..abc8c75 100644
--- a/Swift/QtUI/QtSwift.h
+++ b/Swift/QtUI/QtSwift.h
@@ -27,6 +27,7 @@ class QSplitter;
namespace Swift {
class Dock;
+ class Notifier;
class VCardStorageFactory;
class AutoUpdater;
class ApplicationPathProvider;
@@ -70,6 +71,7 @@ namespace Swift {
CapsStorage* capsStorage_;
VCardStorageFactory* vcardStorageFactory_;
AutoUpdater* autoUpdater_;
+ Notifier* notifier_;
#if defined(SWIFTEN_PLATFORM_MACOSX)
CocoaApplication cocoaApplication_;
#endif
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 9f08f4f..bf9e5cf 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -35,6 +35,9 @@ myenv.MergeFlags(env["ZLIB_FLAGS"])
myenv.MergeFlags(env["OPENSSL_FLAGS"])
myenv.MergeFlags(env.get("LIBXML_FLAGS", ""))
myenv.MergeFlags(env.get("EXPAT_FLAGS", ""))
+if myenv.get("HAVE_GROWL", False) :
+ myenv.MergeFlags(myenv["GROWL_FLAGS"])
+ myenv.Append(CPPDEFINES = ["HAVE_GROWL"])
myenv.MergeFlags(myenv["PLATFORM_FLAGS"])
myenv.Tool("qt4", toolpath = ["#/BuildTools/SCons/Tools"])