diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-12-22 09:14:15 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-12-22 19:49:03 (GMT) |
commit | 9e35dfd2f3a1fbc88bb800c8bf167035b0bd0582 (patch) | |
tree | 216d1f7637166bce76d027f2d3e243c6f675bf1f /SwifTools/Notifier | |
parent | c868a4d587ea8ebbdbe5ef4ccc525af9811acbf9 (diff) | |
download | swift-9e35dfd2f3a1fbc88bb800c8bf167035b0bd0582.zip swift-9e35dfd2f3a1fbc88bb800c8bf167035b0bd0582.tar.bz2 |
Use a default balloons notifier on Windows.
Diffstat (limited to 'SwifTools/Notifier')
-rw-r--r-- | SwifTools/Notifier/SnarlNotifier.cpp | 6 | ||||
-rw-r--r-- | SwifTools/Notifier/SnarlNotifier.h | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/SwifTools/Notifier/SnarlNotifier.cpp b/SwifTools/Notifier/SnarlNotifier.cpp index 709128b..8d7407a 100644 --- a/SwifTools/Notifier/SnarlNotifier.cpp +++ b/SwifTools/Notifier/SnarlNotifier.cpp @@ -17,9 +17,9 @@ namespace Swift { -SnarlNotifier::SnarlNotifier(const String& name, Win32NotifierWindow* window, const boost::filesystem::path& icon) : window(window) { +SnarlNotifier::SnarlNotifier(const String& name, Win32NotifierWindow* window, const boost::filesystem::path& icon) : window(window), available(false) { window->onMessageReceived.connect(boost::bind(&SnarlNotifier::handleMessageReceived, this, _1)); - snarl.RegisterApp(name.getUTF8Data(), name.getUTF8Data(), icon.string().c_str(), window->getID(), SWIFT_SNARLNOTIFIER_MESSAGE_ID); + available = snarl.RegisterApp(name.getUTF8Data(), name.getUTF8Data(), icon.string().c_str(), window->getID(), SWIFT_SNARLNOTIFIER_MESSAGE_ID); foreach(Notifier::Type type, getAllTypes()) { snarl.AddClass(typeToString(type).getUTF8Data(), typeToString(type).getUTF8Data()); } @@ -34,7 +34,7 @@ SnarlNotifier::~SnarlNotifier() { } bool SnarlNotifier::isAvailable() const { - return false; + return available; } diff --git a/SwifTools/Notifier/SnarlNotifier.h b/SwifTools/Notifier/SnarlNotifier.h index d03882a..9aa75f6 100644 --- a/SwifTools/Notifier/SnarlNotifier.h +++ b/SwifTools/Notifier/SnarlNotifier.h @@ -28,6 +28,7 @@ namespace Swift { private: Snarl::V41::SnarlInterface snarl; Win32NotifierWindow* window; + bool available; typedef std::map<int, boost::function<void()> > NotificationsMap; NotificationsMap notifications; }; |