summaryrefslogtreecommitdiff
path: root/portato/gui/qt
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/qt')
-rw-r--r--portato/gui/qt/dialogs.py3
-rw-r--r--portato/gui/qt/windows.py12
2 files changed, 15 insertions, 0 deletions
diff --git a/portato/gui/qt/dialogs.py b/portato/gui/qt/dialogs.py
index 7b5609e..6a80164 100644
--- a/portato/gui/qt/dialogs.py
+++ b/portato/gui/qt/dialogs.py
@@ -12,6 +12,9 @@
from PyQt4.QtGui import QMessageBox
+def queue_not_empty_dialog(parent):
+ return QMessageBox.question(parent, "Portato", "There are some packages in the emerge queue and/or an emerge process is running.\nDo you really want to quit?", QMessageBox.Ok | QMessageBox.Cancel)
+
def io_ex_dialog (parent, ex):
string = ex.strerror
if ex.filename:
diff --git a/portato/gui/qt/windows.py b/portato/gui/qt/windows.py
index 3fa93cf..edb1873 100644
--- a/portato/gui/qt/windows.py
+++ b/portato/gui/qt/windows.py
@@ -852,3 +852,15 @@ class MainWindow (Window):
def cb_pkg_list_selected (self, index, prev):
if not index is None:
self.pkgDetails.update(self.selCatName+"/"+str(index.text()), self.queue)
+
+ def closeEvent (self, event):
+ if not self.queue.is_empty():
+ ret = queue_not_empty_dialog(self)
+ if ret == Qt.QMessageBox.Cancel:
+ event.ignore()
+ return
+ else:
+ self.queue.kill_emerge()
+
+ event.accept()
+
class='deletions'>-7/+31 2016-03-25images are now rendered inline, no need for the multipart handlingmailRené 'Necoro' Neumann1-22/+6 2016-03-25image uri's may contain spacesRené 'Necoro' Neumann1-1/+6 2016-03-25Only one instance of the fetcher neededRené 'Necoro' Neumann1-1/+1 2016-03-25Replace RMail by Mail. This also reduces the handling we have to do ourselves.René 'Necoro' Neumann2-62/+65 2016-03-25Use debug mode for testingRené 'Necoro' Neumann1-1/+1 2016-03-25Add mail to the dependenciesRené 'Necoro' Neumann1-0/+1 2015-06-09itemtomail: embed images using data: URLsHEADmasterAntonio Terceiro1-18/+2 2015-05-10Bump versionAntonio Terceiro1-1/+1 2015-05-10Fix regression in `include-images` optionAntonio Terceiro3-8/+16 test/tc_httpfetcher.rb can't still be re-enabled because it hits the network, and a hostname that is no longer valid. 2015-05-03Bump versionAntonio Terceiro1-1/+1 2015-05-03Fix usage of filtersAntonio Terceiro2-16/+24 - avoid accessing $? unless it is actually available - when calling a filter, make sure to release the mutex even if there is an exception during the filter handling. The long term solution is to drastically reorganize concurrency code. 2015-01-13Handle being given numbers as feed nameAntonio Terceiro2-0/+16 Force feed names to be strings because they will be handled as strings later. 2015-01-13Rakefile: remove wrong (and thus unused) flagAntonio Terceiro1-1/+0 2015-01-13Remove deprecated 'test suite' fileAntonio Terceiro1-12/+0 I want to always run all tests 2015-01-13Rakefile: re-indentAntonio Terceiro1-35/+35 2015-01-13Rakefile: run tests in verbose modeAntonio Terceiro1-1/+2 2014-10-071.2.3 releaseAntonio Terceiro1-1/+1 2014-10-07Fix cleanup of maildirsAntonio Terceiro3-1/+16 Thanks to Sylvain L. Sauvage for the bug report 2014-05-18feed2imap-test: reuse cache dir/protect configAntonio Terceiro1-1/+1 this reduces the noise in the output and helps testing feed updates 2014-02-13feed2imap-test: can now take a feed URL as argumentAntonio Terceiro1-3/+22 2014-02-13update .gitignoreAntonio Terceiro1-0/+2 2014-02-13fix dependency on ruby-feedparserAntonio Terceiro1-1/+1 2014-02-05Release 1.2.2Antonio Terceiro2-2/+2 2014-02-05config: fix regression with arrays as targetAntonio Terceiro2-1/+17 2013-08-28Fix teardown method nameAntonio Terceiro1-1/+1