comparison ui/main.cpp @ 712:1e61903f61e2

Only exit when no tray is available and we are in tray mode.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 02 Jul 2014 15:23:44 +0200
parents 376978e9cc61
children 8de162b91a22
comparison
equal deleted inserted replaced
711:acbe75423283 712:1e61903f61e2
86 qDebug() << "Loading translations for: " << "trustbridge_" + 86 qDebug() << "Loading translations for: " << "trustbridge_" +
87 QLocale::system().name(); 87 QLocale::system().name();
88 } 88 }
89 app.installTranslator(&translator); 89 app.installTranslator(&translator);
90 90
91 if (!QSystemTrayIcon::isSystemTrayAvailable() || 91 if ((!QSystemTrayIcon::isSystemTrayAvailable() ||
92 !QSystemTrayIcon::supportsMessages()) { 92 !QSystemTrayIcon::supportsMessages()) && trayMode) {
93 QMessageBox::critical(0, QString::fromLatin1(APPNAME), 93 QMessageBox::critical(0, QString::fromLatin1(APPNAME),
94 QObject::tr("Couldn't detect any system tray " 94 QObject::tr("Couldn't detect any system tray "
95 "on this system. This software can only " 95 "on this system. This software can only "
96 "be used in a desktop environment.")); 96 "be used in a desktop environment."));
97 return 1; 97 return 1;

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