From fd42772e5afbd3c8d70fd5fc6fabb88f2d28c390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Wed, 15 Dec 2010 19:27:53 +0100 Subject: Ensure Swift name is displayed in Windows systray. Resolves: #515 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" -- cgit v0.10.2-6-g49f6