ALT Linux Bugzilla
– Attachment 3624 Details for
Bug 20572
GoldenDict блокирует выход из системы
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
goldendict-0.9-alt-allow-to-quit.patch
goldendict-0.9-alt-allow-to-quit.patch (text/plain), 1.51 KB, created by
Sergey V Turchin
on 2009-06-25 17:41:05 MSD
(
hide
)
Description:
goldendict-0.9-alt-allow-to-quit.patch
Filename:
MIME Type:
Creator:
Sergey V Turchin
Created:
2009-06-25 17:41:05 MSD
Size:
1.51 KB
patch
obsolete
>--- mainwindow.cc~ 2009-05-25 11:16:03 +0000 >+++ mainwindow.cc 2009-06-25 17:38:54 +0000 >@@ -39,6 +39,7 @@ MainWindow::MainWindow( Config::Class & > wordFinder( this ), > newReleaseCheckTimer( this ) > { >+ force_close = false; > applyQtStyleSheet( cfg.preferences.displayStyle ); > > ui.setupUi( this ); >@@ -270,6 +271,8 @@ MainWindow::MainWindow( Config::Class & > > prepareNewReleaseChecks(); > >+ connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(forceClose())); >+ > // makeDictionaries() didn't do deferred init - we do it here, at the end. > doDeferredInit( dictionaries ); > } >@@ -356,7 +359,7 @@ void MainWindow::updateTrayIcon() > > void MainWindow::closeEvent( QCloseEvent * ev ) > { >- if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray ) >+ if ( cfg.preferences.enableTrayIcon && cfg.preferences.closeToTray && !force_close ) > { > ev->ignore(); > hide(); >@@ -1479,3 +1482,8 @@ void MainWindow::applyZoomFactor() > if ( scanPopup.get() ) > scanPopup->applyZoomFactor(); > } >+ >+void MainWindow::forceClose() >+{ >+ force_close = true; >+} >--- mainwindow.hh~ 2009-05-25 11:16:03 +0000 >+++ mainwindow.hh 2009-06-25 17:27:48 +0000 >@@ -34,7 +34,7 @@ public: > ~MainWindow(); > > private: >- >+ bool force_close; > QSystemTrayIcon * trayIcon; > > Ui::MainWindow ui; >@@ -111,6 +111,7 @@ private: > private slots: > > void hotKeyActivated( int ); >+ void forceClose(); > > /// If new release checks are on, santizies the next check time and starts > /// the timer. Does nothing otherwise.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20572
: 3624