diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-15 17:42:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-15 17:43:04 (GMT) |
commit | 7c6ca6948f81dc4ee6430d46aeae7f7de806a251 (patch) | |
tree | ed46e0e3b2e58a70533dc2d2089a851710096d07 | |
parent | 8e596c2c0c9155830bb6e00204301bb0333274a5 (diff) | |
download | swift-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.
-rw-r--r-- | SwifTools/Notifier/SnarlNotifier.cpp | 5 | ||||
-rw-r--r-- | SwifTools/Notifier/SnarlNotifier.h | 2 | ||||
-rw-r--r-- | Swift/Packaging/nsis/swift.nsi | 3 | ||||
-rw-r--r-- | Swift/QtUI/QtSwift.cpp | 2 | ||||
-rw-r--r-- | Swift/QtUI/SConscript | 2 | ||||
-rw-r--r-- | Swift/resources/images/logo-icon-32.png | bin | 0 -> 895 bytes |
6 files changed, 9 insertions, 5 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); diff --git a/Swift/Packaging/nsis/swift.nsi b/Swift/Packaging/nsis/swift.nsi index 74c987b..6a5be12 100644 --- a/Swift/Packaging/nsis/swift.nsi +++ b/Swift/Packaging/nsis/swift.nsi @@ -65,6 +65,9 @@ File "..\..\QtUI\Swift\imageformats\qtiff4.dll" SetOutPath $INSTDIR\sounds File "..\..\QtUI\Swift\sounds\message-received.wav" +SetOutPath $INSTDIR\images +File "..\..\QtUI\Swift\images\logo-icon-32.png" + # create start menu item !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateDirectory "$SMPROGRAMS\$StartMenuFolder" diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 0118416..13543af 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -102,7 +102,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) { notifier_ = new GrowlNotifier(SWIFT_APPLICATION_NAME); #elif defined(HAVE_SNARL) notifierWindow_ = new QtWin32NotifierWindow(); - notifier_ = new SnarlNotifier(SWIFT_APPLICATION_NAME, notifierWindow_); + notifier_ = new SnarlNotifier(SWIFT_APPLICATION_NAME, notifierWindow_, applicationPathProvider_->getResourcePath("/images/logo-icon-32.png")); #else notifier_ = new NullNotifier(); #endif diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript index 933133d..609eb5d 100644 --- a/Swift/QtUI/SConscript +++ b/Swift/QtUI/SConscript @@ -162,7 +162,7 @@ if env["PLATFORM"] == "win32" : myenv.WindowsBundle("Swift", resources = [ os.path.join(env["OPENSSL_DIR"], "bin", "ssleay32.dll"), os.path.join(env["OPENSSL_DIR"], "bin", "libeay32.dll"), - ] + commonResources, + ] + commonResources + ["../resources/images"], qtimageformats = ["gif", "ico", "jpeg", "mng", "svg", "tiff"], qtlibs = ["QtCore4", "QtGui4", "QtNetwork4", "QtWebKit4", "QtXMLPatterns4", "phonon4"]) diff --git a/Swift/resources/images/logo-icon-32.png b/Swift/resources/images/logo-icon-32.png Binary files differnew file mode 100644 index 0000000..156dc87 --- /dev/null +++ b/Swift/resources/images/logo-icon-32.png |