summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-15 17:42:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-15 17:43:04 (GMT)
commit7c6ca6948f81dc4ee6430d46aeae7f7de806a251 (patch)
treeed46e0e3b2e58a70533dc2d2089a851710096d07 /SwifTools
parent8e596c2c0c9155830bb6e00204301bb0333274a5 (diff)
downloadswift-contrib-7c6ca6948f81dc4ee6430d46aeae7f7de806a251.zip
swift-contrib-7c6ca6948f81dc4ee6430d46aeae7f7de806a251.tar.bz2
Attempt to show icon in Snarl config dialog.
Doesn't work though. Need to find out why.
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/Notifier/SnarlNotifier.cpp5
-rw-r--r--SwifTools/Notifier/SnarlNotifier.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/SwifTools/Notifier/SnarlNotifier.cpp b/SwifTools/Notifier/SnarlNotifier.cpp
index 86069c9..ccdf26c 100644
--- a/SwifTools/Notifier/SnarlNotifier.cpp
+++ b/SwifTools/Notifier/SnarlNotifier.cpp
@@ -17,9 +17,10 @@
namespace Swift {
-SnarlNotifier::SnarlNotifier(const String& name, Win32NotifierWindow* window) : window(window) {
+SnarlNotifier::SnarlNotifier(const String& name, Win32NotifierWindow* window, const boost::filesystem::path& icon) : window(window) {
window->onMessageReceived.connect(boost::bind(&SnarlNotifier::handleMessageReceived, this, _1));
- snarl.RegisterConfig(window->getID(), name.getUTF8Data(), 0);
+ // FIXME: Not sure why the icon doesn't show
+ snarl.RegisterConfig2(window->getID(), name.getUTF8Data(), 0, icon.string().c_str());
foreach(Notifier::Type type, getAllTypes()) {
snarl.RegisterAlert(name.getUTF8Data(), typeToString(type).getUTF8Data());
}
diff --git a/SwifTools/Notifier/SnarlNotifier.h b/SwifTools/Notifier/SnarlNotifier.h
index 45408ec..d744023 100644
--- a/SwifTools/Notifier/SnarlNotifier.h
+++ b/SwifTools/Notifier/SnarlNotifier.h
@@ -16,7 +16,7 @@ namespace Swift {
class SnarlNotifier : public Notifier {
public:
- SnarlNotifier(const String& name, Win32NotifierWindow* window);
+ SnarlNotifier(const String& name, Win32NotifierWindow* window, const boost::filesystem::path& icon);
~SnarlNotifier();
virtual void showMessage(Type type, const String& subject, const String& description, const boost::filesystem::path& picture, boost::function<void()> callback);