summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-12 16:21:36 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-12 21:39:01 (GMT)
commit3ae8cccfe9c6bfed5dda5f024a5cb046ccfc9793 (patch)
treecf58a21d66725dead1cda2d029b19b04d5f30e0c /Swift
parent326c0620a103d621bcdd74341cd0117816acca03 (diff)
downloadswift-contrib-3ae8cccfe9c6bfed5dda5f024a5cb046ccfc9793.zip
swift-contrib-3ae8cccfe9c6bfed5dda5f024a5cb046ccfc9793.tar.bz2
Move Notifier to SwifTools
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/MainController.cpp2
-rw-r--r--Swift/Controllers/MainController.h3
-rw-r--r--Swift/QtUI/QtSwift.cpp11
-rw-r--r--Swift/QtUI/QtSwift.h2
-rw-r--r--Swift/QtUI/SConscript3
5 files changed, 21 insertions, 0 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index d4222e3..834dacd 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -83,6 +83,7 @@ MainController::MainController(
CapsStorage* capsStorage,
VCardStorageFactory* vcardStorageFactory,
Dock* dock,
+ Notifier* notifier,
bool useDelayForLatency) :
timerFactory_(&boostIOServiceThread_.getIOService()),
idleDetector_(&idleQuerier_, &timerFactory_, 100),
@@ -114,6 +115,7 @@ MainController::MainController(
mucSearchWindowFactory_ = mucSearchWindowFactory;
eventWindowFactory_ = eventWindowFactory;
dock_ = dock;
+ notifier_ = notifier;
chatListWindowFactory_ = chatListWindowFactory;
uiEventStream_ = new UIEventStream();
diff --git a/Swift/Controllers/MainController.h b/Swift/Controllers/MainController.h
index 7aad4a0..7fbf54f 100644
--- a/Swift/Controllers/MainController.h
+++ b/Swift/Controllers/MainController.h
@@ -54,6 +54,7 @@ namespace Swift {
class SoftwareVersionResponder;
class LoginWindowFactory;
class MUCController;
+ class Notifier;
class PresenceOracle;
class SystemTray;
class SystemTrayController;
@@ -88,6 +89,7 @@ namespace Swift {
CapsStorage* capsStorage,
VCardStorageFactory* vcardStorageFactory,
Dock* dock,
+ Notifier* notifier,
bool useDelayForLatency);
~MainController();
@@ -134,6 +136,7 @@ namespace Swift {
VCardStorageFactory* vcardStorageFactory_;
VCardManager* vcardManager_;
Dock* dock_;
+ Notifier* notifier_;
ChatController* chatController_;
XMPPRosterController* xmppRosterController_;
RosterController* rosterController_;
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"])