changeset 1326:dd3eefda8503

(issue155) Set window icon to the logo on unity
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 15 Oct 2014 10:03:48 +0200
parents 303de3160a83
children 562d66614b5c
files ui/mainwindow.cpp
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Tue Oct 14 18:33:18 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Oct 15 10:03:48 2014 +0200
@@ -674,7 +674,14 @@
     mTrayIcon->setContextMenu(mTrayMenu);
 
     mTrayIcon->setIcon(trayImg);
-    setWindowIcon(trayImg);
+
+    if (mTrayIcon->isAlternative()) {
+        /* On unity (the alternative notification usage)
+         * we want to use the logo as window icon.*/
+        setWindowIcon(QIcon(":/img/logo.png"));
+    } else {
+        setWindowIcon(trayImg);
+    }
     mTrayIcon->setToolTip(tr("TrustBridge"));
 
     connect(mTrayIcon, SIGNAL(messageClicked()), this, SLOT(messageClicked()));

http://wald.intevation.org/projects/trustbridge/