summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-14 20:41:57 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-14 20:45:34 (GMT)
commitddc0ef9f5520d1e1e18e134f1a8fbdb678bbbc94 (patch)
treea2c6780381a627186c871f2aefbcc1c48ee8b0a1 /Swift/QtUI
parent704d14b48f1baaa9b037787451e0239fdc7f0daa (diff)
downloadswift-ddc0ef9f5520d1e1e18e134f1a8fbdb678bbbc94.zip
swift-ddc0ef9f5520d1e1e18e134f1a8fbdb678bbbc94.tar.bz2
Added initial Growl for Windows notifier (GNTP).
The notifier doesn't handle callbacks yet. Release-Notes: Replaced Snarl notifications with Growl for Windows notifications.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp8
-rw-r--r--Swift/QtUI/QtSwift.h7
2 files changed, 7 insertions, 8 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 04b9d02..65eb534 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -42,7 +42,7 @@
#include "SwifTools/Notifier/GrowlNotifier.h"
#elif defined(HAVE_SNARL)
#include "QtWin32NotifierWindow.h"
-#include "SwifTools/Notifier/SnarlNotifier.h"
+#include "SwifTools/Notifier/GNTPNotifier.h"
#elif defined(SWIFTEN_PLATFORM_LINUX)
#include "FreeDesktopNotifier.h"
#else
@@ -76,7 +76,7 @@ po::options_description QtSwift::getOptionsDescription() {
}
-QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
+QtSwift::QtSwift(po::variables_map options) : networkFactories_(&clientMainThreadCaller_), autoUpdater_(NULL) {
if (options.count("netbook-mode")) {
splitter_ = new QSplitter();
} else {
@@ -109,8 +109,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
#if defined(HAVE_GROWL)
notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME);
#elif defined(HAVE_SNARL)
- notifierWindow_ = new QtWin32NotifierWindow();
- notifier_ = new SnarlNotifier(SWIFT_APPLICATION_NAME, notifierWindow_, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png"));
+ notifier_ = new GNTPNotifier(SWIFT_APPLICATION_NAME, applicationPathProvider_->getResourcePath("/images/logo-icon-128.png"), networkFactories_.getConnectionFactory());
#elif defined(SWIFTEN_PLATFORM_LINUX)
notifier_ = new FreeDesktopNotifier(SWIFT_APPLICATION_NAME);
#else
@@ -144,6 +143,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
mucSearchWindowFactories_.push_back(mucSearchWindowFactory);
MainController* mainController = new MainController(
&clientMainThreadCaller_,
+ &networkFactories_,
chatWindowFactory_,
rosterWindowFactory,
loginWindowFactory,
diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h
index a41e2d1..68933dd 100644
--- a/Swift/QtUI/QtSwift.h
+++ b/Swift/QtUI/QtSwift.h
@@ -10,6 +10,7 @@
#include <boost/program_options/options_description.hpp>
#include <Swiften/TLS/PlatformTLSFactories.h>
+#include <Swiften/Network/BoostNetworkFactories.h>
#include "Swiften/Base/String.h"
#include "Swiften/Base/Platform.h"
#include "Swiften/EventLoop/Qt/QtEventLoop.h"
@@ -56,7 +57,9 @@ namespace Swift {
static po::options_description getOptionsDescription();
~QtSwift();
private:
+ QtEventLoop clientMainThreadCaller_;
PlatformTLSFactories tlsFactories_;
+ BoostNetworkFactories networkFactories_;
std::vector<MainController*> mainControllers_;
QtChatWindowFactory *chatWindowFactory_;
std::vector<QtMainWindowFactory*> rosterWindowFactories_;
@@ -66,7 +69,6 @@ namespace Swift {
std::vector<QtSystemTray*> systemTrays_;
std::vector<QtChatListWindowFactory*> chatListWindowFactories_;
std::vector<QtMUCSearchWindowFactory*> mucSearchWindowFactories_;
- QtEventLoop clientMainThreadCaller_;
QtSettingsProvider *settings_;
QSplitter* splitter_;
QtSoundPlayer* soundPlayer_;
@@ -80,8 +82,5 @@ namespace Swift {
#if defined(SWIFTEN_PLATFORM_MACOSX)
CocoaApplication cocoaApplication_;
#endif
-#if defined(HAVE_SNARL)
- Win32NotifierWindow* notifierWindow_;
-#endif
};
}