summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp11
-rw-r--r--Swift/QtUI/QtWebView.cpp2
-rw-r--r--Swift/QtUI/SConscript2
3 files changed, 13 insertions, 2 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 13b2175..c07c485 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -43,6 +43,9 @@
#include "WindowsNotifier.h"
#elif defined(HAVE_GROWL)
#include "SwifTools/Notifier/GrowlNotifier.h"
+#if defined(HAVE_NOTIFICATION_CENTER)
+#include "SwifTools/Notifier/NotificationCenterNotifier.h"
+#endif
#elif defined(SWIFTEN_PLATFORM_LINUX)
#include "FreeDesktopNotifier.h"
#else
@@ -163,7 +166,13 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa
QtSystemTray* systemTray = new QtSystemTray();
systemTrays_.push_back(systemTray);
-#if defined(HAVE_GROWL)
+#if defined(HAVE_NOTIFICATION_CENTER) && defined(HAVE_GROWL)
+ if (NotificationCenterNotifier::isSupported()) {
+ notifier_ = new NotificationCenterNotifier(SWIFT_APPLICATION_NAME);
+ } else {
+ notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME);
+ }
+#elif defined(HAVE_GROWL)
notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME);
#elif defined(SWIFTEN_PLATFORM_WINDOWS)
notifier_ = new WindowsNotifier(SWIFT_APPLICATION_NAME, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png"), systemTray->getQSystemTrayIcon());
diff --git a/Swift/QtUI/QtWebView.cpp b/Swift/QtUI/QtWebView.cpp
index 388f06a..38ed345 100644
--- a/Swift/QtUI/QtWebView.cpp
+++ b/Swift/QtUI/QtWebView.cpp
@@ -58,7 +58,7 @@ void QtWebView::contextMenuEvent(QContextMenuEvent* ev) {
}
}
if (removeAction) {
- menu->removeAction(action);
+ //menu->removeAction(action);
}
}
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 5ab9c9e..4cd7865 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -40,6 +40,8 @@ if myenv["swift_mobile"] :
if myenv.get("HAVE_SNARL", False) :
myenv.UseFlags(myenv["SNARL_FLAGS"])
myenv.Append(CPPDEFINES = ["HAVE_SNARL"])
+if myenv.get("HAVE_NOTIFICATION_CENTER", False) :
+ myenv.Append(CPPDEFINES = ["HAVE_NOTIFICATION_CENTER"])
if env["PLATFORM"] == "win32" :
myenv.Append(LIBS = ["cryptui"])
myenv.UseFlags(myenv["PLATFORM_FLAGS"])