summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSwift.cpp')
-rw-r--r--Swift/QtUI/QtSwift.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index ef87aab..2c1f2bf 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -32,11 +32,11 @@
#include "Swift/Controllers/BuildVersion.h"
#include "SwifTools/AutoUpdater/AutoUpdater.h"
#include "SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.h"
+#if defined(SWIFTEN_PLATFORM_WINDOWS)
+#include "WindowsNotifier.h"
+#endif
#if defined(HAVE_GROWL)
#include "SwifTools/Notifier/GrowlNotifier.h"
-#elif defined(HAVE_SNARL)
-#include "QtWin32NotifierWindow.h"
-#include "SwifTools/Notifier/SnarlNotifier.h"
#elif defined(SWIFTEN_PLATFORM_LINUX)
#include "FreeDesktopNotifier.h"
#else
@@ -44,11 +44,8 @@
#endif
#if defined(SWIFTEN_PLATFORM_MACOSX)
#include "SwifTools/Dock/MacOSXDock.h"
-#elif defined(SWIFTEN_PLATFORM_WINDOWS)
-#include "SwifTools/Dock/WindowsDock.h"
-#else
-#include "SwifTools/Dock/NullDock.h"
#endif
+#include "SwifTools/Dock/NullDock.h"
namespace Swift{
@@ -104,26 +101,24 @@ QtSwift::QtSwift(po::variables_map options) : networkFactories_(&clientMainThrea
certificateStorageFactory_ = new CertificateFileStorageFactory(applicationPathProvider_->getDataDir(), tlsFactories_.getCertificateFactory());
chatWindowFactory_ = new QtChatWindowFactory(splitter_, settings_, tabs_, "");
soundPlayer_ = new QtSoundPlayer(applicationPathProvider_);
+
+ // Ugly, because the dock depends on the tray, but the temporary
+ // multi-account hack creates one tray per account.
+ QtSystemTray* systemTray = new QtSystemTray();
+ systemTrays_.push_back(systemTray);
+
#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"));
+#elif defined(SWIFTEN_PLATFORM_WINDOWS)
+ notifier_ = new WindowsNotifier(SWIFT_APPLICATION_NAME, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png"), systemTray->getQSystemTrayIcon());
#elif defined(SWIFTEN_PLATFORM_LINUX)
notifier_ = new FreeDesktopNotifier(SWIFT_APPLICATION_NAME);
#else
notifier_ = new NullNotifier();
#endif
- // Ugly, because the dock depends on the tray, but the temporary
- // multi-account hack creates one tray per account.
- QtSystemTray* systemTray = new QtSystemTray();
- systemTrays_.push_back(systemTray);
-
#if defined(SWIFTEN_PLATFORM_MACOSX)
dock_ = new MacOSXDock(&cocoaApplication_);
-#elif defined(SWIFTEN_PLATFORM_WINDOWS)
- dock_ = new WindowsDock(systemTray->getQSystemTrayIcon(), notifier_);
#else
dock_ = new NullDock();
#endif
@@ -164,9 +159,6 @@ QtSwift::QtSwift(po::variables_map options) : networkFactories_(&clientMainThrea
QtSwift::~QtSwift() {
delete notifier_;
-#if defined(HAVE_SNARL)
- delete notifierWindow_;
-#endif
delete autoUpdater_;
foreach (QtUIFactory* factory, uiFactories_) {
delete factory;