summaryrefslogtreecommitdiff
path: root/portato/gui/qt/windows.py
diff options
context:
space:
mode:
authornecoro <>2007-04-24 14:36:36 +0000
committernecoro <>2007-04-24 14:36:36 +0000
commit13f5b071027e5aed0f9ae5eec88f4095f2246f98 (patch)
treeba0d292dc1710d211dda699968f4c95ed907150f /portato/gui/qt/windows.py
parent7a6f5b2c1d83fe62c62f0c30cad28eb091d52dfe (diff)
downloadportato-13f5b071027e5aed0f9ae5eec88f4095f2246f98.tar.gz
portato-13f5b071027e5aed0f9ae5eec88f4095f2246f98.tar.bz2
portato-13f5b071027e5aed0f9ae5eec88f4095f2246f98.zip
added dialogs to warn you when the queue is running on quitting portato
Diffstat (limited to 'portato/gui/qt/windows.py')
-rw-r--r--portato/gui/qt/windows.py12
1 files changed, 12 insertions, 0 deletions
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()
+