From 8973d348ad4432ff6104a6d88e5f573256311b95 Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Mon, 13 May 2013 12:20:29 +0100 Subject: [PATCH] Application indicator show status is cleared when the application window is minimized --- src/bitmessageqt/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 0b7c9aa9..ab02bc59 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -489,6 +489,14 @@ class MyForm(QtGui.QMainWindow): self.show() self.setWindowState(self.windowState() & QtCore.Qt.WindowMaximized) + # unchecks the show item on the application indicator + def appIndicatorHide(self): + if self.actionShow == None: + return + self.actionShow.setChecked(False) + self.hide() + self.setWindowState(self.windowState() & QtCore.Qt.WindowMinimized) + # application indicator show or hide def appIndicatorShowBitmessage(self): if self.actionShow == None: @@ -738,8 +746,7 @@ class MyForm(QtGui.QMainWindow): if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: if event.type() == QtCore.QEvent.WindowStateChange: if self.windowState() & QtCore.Qt.WindowMinimized: - self.hide() - self.trayIcon.show() + self.appIndicatorHide() if 'win32' in sys.platform or 'win64' in sys.platform: self.setWindowFlags(Qt.ToolTip) elif event.oldState() & QtCore.Qt.WindowMinimized: