[PATCH] (issue155) Set window icon to the logo on unity

Wald Commits scm-commit at wald.intevation.org
Wed Oct 15 10:05:00 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1413360228 -7200
# Node ID dd3eefda850327485c4ece866b426406118718f0
# Parent  303de3160a8322feccf4e0a0c89fc17473ea2713
(issue155) Set window icon to the logo on unity

diff -r 303de3160a83 -r dd3eefda8503 ui/mainwindow.cpp
--- 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()));


More information about the Trustbridge-commits mailing list