Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 965:013ca910589a
Open main window in case of error message.
Show tray icon always when the mainwindow is invisible.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 28 Aug 2014 12:56:02 +0200 |
parents | 706405a2f3e8 |
children | 9783e32e215f |
comparison
equal
deleted
inserted
replaced
964:706405a2f3e8 | 965:013ca910589a |
---|---|
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 void MainWindow::messageClicked() | 135 void MainWindow::messageClicked() |
136 { | 136 { |
137 if (mCurState == NewListAvailable) { | |
138 show(); | |
139 } | |
140 | |
141 if (mCurState == NewSoftwareAvailable) { | 137 if (mCurState == NewSoftwareAvailable) { |
142 hide(); | 138 hide(); |
143 verifySWData(); | 139 verifySWData(); |
144 QString swFileName = mSettings.value("Software/available").toString(); | 140 QString swFileName = mSettings.value("Software/available").toString(); |
145 if (swFileName.isEmpty()) { | 141 if (swFileName.isEmpty()) { |
147 mCurState = DownloadingSW; | 143 mCurState = DownloadingSW; |
148 return; | 144 return; |
149 } | 145 } |
150 installNewSW(swFileName, | 146 installNewSW(swFileName, |
151 mSettings.value("Software/availableDate").toDateTime()); | 147 mSettings.value("Software/availableDate").toDateTime()); |
148 } else { | |
149 show(); | |
152 } | 150 } |
153 } | 151 } |
154 | 152 |
155 void MainWindow::showMessage() | 153 void MainWindow::showMessage() |
156 { | 154 { |
1377 void MainWindow::closeEvent(QCloseEvent *event) | 1375 void MainWindow::closeEvent(QCloseEvent *event) |
1378 { | 1376 { |
1379 if (getState() == NewListAvailable) { | 1377 if (getState() == NewListAvailable) { |
1380 /* Only minimize to tray if there is a new list */ | 1378 /* Only minimize to tray if there is a new list */ |
1381 QMainWindow::closeEvent(event); | 1379 QMainWindow::closeEvent(event); |
1380 mTrayIcon->show(); | |
1382 return; | 1381 return; |
1383 } | 1382 } |
1384 return closeApp(); | 1383 return closeApp(); |
1385 } | 1384 } |
1386 | 1385 |