Lines 39-44
MainWindow::MainWindow( Config::Class &
Link Here
|
39 |
wordFinder( this ), |
39 |
wordFinder( this ), |
40 |
newReleaseCheckTimer( this ) |
40 |
newReleaseCheckTimer( this ) |
41 |
{ |
41 |
{ |
|
|
42 |
force_close = false; |
42 |
applyQtStyleSheet( cfg.preferences.displayStyle ); |
43 |
applyQtStyleSheet( cfg.preferences.displayStyle ); |
43 |
|
44 |
|
44 |
ui.setupUi( this ); |
45 |
ui.setupUi( this ); |
Lines 270-275
MainWindow::MainWindow( Config::Class &
Link Here
|
270 |
|
271 |
|
271 |
prepareNewReleaseChecks(); |
272 |
prepareNewReleaseChecks(); |
272 |
|
273 |
|
|
|
274 |
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(forceClose())); |
275 |
|
273 |
// makeDictionaries() didn't do deferred init - we do it here, at the end. |
276 |
// makeDictionaries() didn't do deferred init - we do it here, at the end. |
274 |
doDeferredInit( dictionaries ); |
277 |
doDeferredInit( dictionaries ); |
275 |
} |
278 |
} |
Lines 356-362
void MainWindow::updateTrayIcon()
Link Here
|
356 |
|
359 |
|
357 |
void MainWindow::closeEvent( QCloseEvent * ev ) |
360 |
void MainWindow::closeEvent( QCloseEvent * ev ) |
358 |
{ |
361 |
{ |
359 |
if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray ) |
362 |
if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray && !force_close ) |
360 |
{ |
363 |
{ |
361 |
ev->ignore(); |
364 |
ev->ignore(); |
362 |
hide(); |
365 |
hide(); |
Lines 1479-1481
void MainWindow::applyZoomFactor()
Link Here
|
1479 |
if ( scanPopup.get() ) |
1482 |
if ( scanPopup.get() ) |
1480 |
scanPopup->applyZoomFactor(); |
1483 |
scanPopup->applyZoomFactor(); |
1481 |
} |
1484 |
} |
|
|
1485 |
|
1486 |
void MainWindow::forceClose() |
1487 |
{ |
1488 |
force_close = true; |
1489 |
} |