diff options
author | Daniel Molkentin <danimo@owncloud.com> | 2013-11-23 03:05:50 +0400 |
---|---|---|
committer | Daniel Molkentin <danimo@owncloud.com> | 2013-11-25 18:34:16 +0400 |
commit | 67132326d2b4733a9926a5f3ae347c21ee8441fe (patch) | |
tree | 383de74d8e4953009a7690927be7b099555225ce /src/mirall | |
parent | ea2b5fb29cfe511bff8d5a7ae6e0bfa4c55738ea (diff) |
Prefix tooltips with app name
Diffstat (limited to 'src/mirall')
-rw-r--r-- | src/mirall/systray.cpp | 6 | ||||
-rw-r--r-- | src/mirall/systray.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mirall/systray.cpp b/src/mirall/systray.cpp index 04b79d31e..617d1408b 100644 --- a/src/mirall/systray.cpp +++ b/src/mirall/systray.cpp @@ -13,6 +13,7 @@ */ #include "systray.h" +#include "mirall/theme.h" #ifdef USE_FDO_NOTIFICATIONS #include <QDBusConnection> @@ -43,4 +44,9 @@ void Systray::showMessage(const QString & title, const QString & message, Messag } } +void Systray::setToolTip(const QString &tip) +{ + QSystemTrayIcon::setToolTip(tr("%1: %2").arg(Theme::instance()->appNameGUI(), tip)); +} + } // namespace Mirall diff --git a/src/mirall/systray.h b/src/mirall/systray.h index 4a4a70c17..827f7c020 100644 --- a/src/mirall/systray.h +++ b/src/mirall/systray.h @@ -26,7 +26,7 @@ class Systray : public QSystemTrayIcon Q_OBJECT public: void showMessage(const QString & title, const QString & message, MessageIcon icon = Information, int millisecondsTimeoutHint = 10000); - + void setToolTip(const QString &tip); }; } // namespace Mirall |