changeset 962:0a4f7235e759

Close the application if nothing new is available and in tray mode.
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 28 Aug 2014 11:26:09 +0200
parents 423e31ac656e
children 62b832d0b839
files ui/mainwindow.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Thu Aug 28 11:25:55 2014 +0200
+++ b/ui/mainwindow.cpp	Thu Aug 28 11:26:09 2014 +0200
@@ -1393,6 +1393,12 @@
         mLastUpdateCheck->show();
         syslog_info_printf(tr("Sucessfully checked for updates.").toUtf8().constData());
     }
+    if (getState() != NewSoftwareAvailable && getState() != NewListAvailable && mTrayMode) {
+        qDebug() << "Shutting down as no list or Software is available.";
+        closeApp();
+    } else {
+        mTrayIcon->show();
+    }
 }
 
 int MainWindow::changeCount()

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