Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 1144:a4282bc67a8b
(issue99) Make OK button in message box notification configurable and change it for list updates
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 18 Sep 2014 11:08:57 +0200 |
parents | 1a5f9e260099 |
children | a41338b18273 |
comparison
equal
deleted
inserted
replaced
1141:05d4e882fe18 | 1144:a4282bc67a8b |
---|---|
172 * and becoming visible may be delayed on some desktop environments | 172 * and becoming visible may be delayed on some desktop environments |
173 * the message will pop up somehere on the screen and not over | 173 * the message will pop up somehere on the screen and not over |
174 * the trayicon. So we delay here.*/ | 174 * the trayicon. So we delay here.*/ |
175 QTimer::singleShot(2000, this, SLOT(showMessage())); | 175 QTimer::singleShot(2000, this, SLOT(showMessage())); |
176 } else if (mCurState == NewSoftwareAvailable || !isVisible()) { | 176 } else if (mCurState == NewSoftwareAvailable || !isVisible()) { |
177 mTrayIcon->showMessage(QApplication::applicationName(), mCurMessage, | 177 if (mCurState == NewListAvailable) { |
178 QSystemTrayIcon::Information, 10000); | 178 mTrayIcon->showMessage(QApplication::applicationName(), mCurMessage, |
179 QSystemTrayIcon::Information, 10000, | |
180 tr("Show recommendations")); | |
181 } else if (mCurState == NewSoftwareAvailable || !mTrayIcon->isAlternative()) { | |
182 /* Only show new list or new software in alternative as | |
183 * the current tray icon alternative is too invasive for pure | |
184 * informational messages. */ | |
185 mTrayIcon->showMessage(QApplication::applicationName(), mCurMessage, | |
186 QSystemTrayIcon::Information, 10000); | |
187 } | |
179 mMessageTimer->start(); // Restart the timer so that we don't spam | 188 mMessageTimer->start(); // Restart the timer so that we don't spam |
180 } | 189 } |
181 } | 190 } |
182 | 191 |
183 void MainWindow::verifyListData() | 192 void MainWindow::verifyListData() |