diff ui/main.cpp @ 158:fb3b2d77518f

Merged
author Sascha Wilde <wilde@intevation.de>
date Tue, 25 Mar 2014 09:30:51 +0100
parents 3349c9596043
children 75f7288ad67b
line wrap: on
line diff
--- a/ui/main.cpp	Tue Mar 25 09:30:42 2014 +0100
+++ b/ui/main.cpp	Tue Mar 25 09:30:51 2014 +0100
@@ -28,6 +28,9 @@
 {
     QApplication app (argc, argv);
 
+    QStringList arguments = QApplication::arguments();
+    bool trayMode = arguments.contains("--tray");
+
     if (!QSystemTrayIcon::isSystemTrayAvailable() ||
             !QSystemTrayIcon::supportsMessages()) {
         QMessageBox::critical(0, QString::fromLatin1(APPNAME),
@@ -44,6 +47,9 @@
     QSettings::setDefaultFormat(QSettings::IniFormat);
 
     MainWindow mainWin;
+    if (!trayMode) {
+        mainWin.show();
+    }
 
     return app.exec();
 }

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