summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Alejandro <ivanalejandro0@gmail.com>2014-04-10 17:01:42 -0300
committerIvan Alejandro <ivanalejandro0@gmail.com>2014-04-10 17:03:07 -0300
commitd0797917bc516a44b2201251c2032d7231637d8a (patch)
tree9d5dd2c9f4dea40150418ded00d08853ce78bcaf
parentc3a21a28ba3b3a8200959ec67b0447c982448941 (diff)
Hide mainwindow on quit and show tooltip.
-rw-r--r--changes/feature_hide-mainwindow-on-quit1
-rw-r--r--src/leap/bitmask/gui/mainwindow.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/changes/feature_hide-mainwindow-on-quit b/changes/feature_hide-mainwindow-on-quit
new file mode 100644
index 00000000..abd1df7a
--- /dev/null
+++ b/changes/feature_hide-mainwindow-on-quit
@@ -0,0 +1 @@
+- Hide the main window on quit as first thing and show a tooltip to inform that we are closing.
diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py
index 5abfaa67..f097faca 100644
--- a/src/leap/bitmask/gui/mainwindow.py
+++ b/src/leap/bitmask/gui/mainwindow.py
@@ -2041,6 +2041,15 @@ class MainWindow(QtGui.QMainWindow):
# TODO separate the shutting down of services from the
# UI stuff.
+ # first thing to do quitting, hide the mainwindow and show tooltip.
+ self.hide()
+ self._systray.showMessage(
+ self.tr('Quitting...'),
+ self.tr('The app is quitting, please wait.'))
+
+ # explicitly process events to display tooltip immediately
+ QtCore.QCoreApplication.processEvents()
+
# Set this in case that the app is hidden
QtGui.QApplication.setQuitOnLastWindowClosed(True)