From b1795101da8914b39968c771556dfbcf954980c0 Mon Sep 17 00:00:00 2001 From: me_desk Date: Sun, 13 Oct 2013 13:04:22 +0000 Subject: tooltip for systray icon git-svn-id: svn://localhost/project_picapica/trunk@282 fb96df88-216d-11de-830c-f3023f12d8ac --- pica-client/picasystray.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pica-client/picasystray.cpp b/pica-client/picasystray.cpp index ab31887..64e94b4 100644 --- a/pica-client/picasystray.cpp +++ b/pica-client/picasystray.cpp @@ -1,6 +1,13 @@ #include "picasystray.h" #include "globals.h" #include "picaactioncenter.h" +#include "accounts.h" + +#ifdef PACKAGE_VERSION +#define VERSION_STRING "v"PACKAGE_VERSION +#else +#define VERSION_STRING "" +#endif PicaSysTray::PicaSysTray(QObject *parent) : QObject(parent) @@ -13,6 +20,7 @@ PicaSysTray::PicaSysTray(QObject *parent) : systray_ = new QSystemTrayIcon(picapica_ico_sit); systray_->setContextMenu(systrayMenu_); + systray_->setToolTip("Pica Pica Messenger "VERSION_STRING); systray_->show(); connect(systray_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(systray_activated(QSystemTrayIcon::ActivationReason))); @@ -31,6 +39,7 @@ void PicaSysTray::systray_activated(QSystemTrayIcon::ActivationReason r) void PicaSysTray::skynet_became_self_aware() { systray_->setIcon(picapica_ico_fly); + systray_->setToolTip(Accounts::GetCurrentAccount().name + " - Pica Pica Messenger "VERSION_STRING); } void PicaSysTray::skynet_lost_self_awareness() -- cgit v1.2.1