summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-12-15 18:27:53 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-12-15 18:27:53 (GMT)
commitfd42772e5afbd3c8d70fd5fc6fabb88f2d28c390 (patch)
tree5284e0202d771b4635607b4dfc074408dda33a8d
parentc6eb5912b471c17f9bd0e8dd647a00b8a2e37d08 (diff)
downloadswift-contrib-fd42772e5afbd3c8d70fd5fc6fabb88f2d28c390.zip
swift-contrib-fd42772e5afbd3c8d70fd5fc6fabb88f2d28c390.tar.bz2
Ensure Swift name is displayed in Windows systray.
Resolves: #515
-rw-r--r--BuildTools/SCons/Tools/BuildVersion.py1
-rw-r--r--Swift/QtUI/QtSystemTray.cpp1
-rw-r--r--Swift/resources/Windows/Swift.rc36
3 files changed, 38 insertions, 0 deletions
diff --git a/BuildTools/SCons/Tools/BuildVersion.py b/BuildTools/SCons/Tools/BuildVersion.py
index 5edc79e..8b195cd 100644
--- a/BuildTools/SCons/Tools/BuildVersion.py
+++ b/BuildTools/SCons/Tools/BuildVersion.py
@@ -7,6 +7,7 @@ def generate(env) :
buildVersion = """#pragma once
static const char* buildVersion = \"%(buildVersion)s\";\n
+#define SWIFT_VERSION_STRING \"%(buildVersion)s\";\n
""" % { "buildVersion" : Version.getBuildVersion(project) }
env.WriteVal(target, env.Value(buildVersion))
diff --git a/Swift/QtUI/QtSystemTray.cpp b/Swift/QtUI/QtSystemTray.cpp
index d6180e6..123e6a3 100644
--- a/Swift/QtUI/QtSystemTray.cpp
+++ b/Swift/QtUI/QtSystemTray.cpp
@@ -13,6 +13,7 @@
namespace Swift {
QtSystemTray::QtSystemTray() : QObject(), onlineIcon_(":icons/online.png"), awayIcon_(":icons/away.png"), dndIcon_(":icons/dnd.png"), offlineIcon_(":icons/offline.png"), newMessageIcon_(":icons/new-chat.png"), throbberMovie_(":/icons/connecting.mng"), unreadMessages_(false), connecting_(false) {
trayIcon_ = new QSystemTrayIcon(offlineIcon_);
+ trayIcon_->setToolTip("Swift");
connect(trayIcon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(handleIconActivated(QSystemTrayIcon::ActivationReason)));
connect(&throbberMovie_, SIGNAL(frameChanged(int)), this, SLOT(handleThrobberFrameChanged(int)));
trayIcon_->show();
diff --git a/Swift/resources/Windows/Swift.rc b/Swift/resources/Windows/Swift.rc
index 9e96951..99201e6 100644
--- a/Swift/resources/Windows/Swift.rc
+++ b/Swift/resources/Windows/Swift.rc
@@ -1 +1,37 @@
+#include "Swift/Controllers/BuildVersion.h"
+
+1 VERSIONINFO
+// FILEVERSION 1.0
+// PRODUCTVERSION 1.0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "Swift IM Client\0"
+ VALUE "CompanyName", "Swift\0"
+ VALUE "FileDescription", "Swift\0"
+ VALUE "FileVersion", SWIFT_VERSION_STRING
+ VALUE "InternalName", "Swift\0"
+ VALUE "LegalCopyright", "Copyright (C) 2010 Swift Team\0"
+ VALUE "OriginalFilename", "Swift.exe\0"
+ VALUE "ProductName", "Swift\0"
+ VALUE "ProductVersion", SWIFT_VERSION_STRING
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
IDI_ICON1 ICON DISCARDABLE "Swift.ico"