Application indicator show status is cleared when the application window is minimized
This commit is contained in:
parent
47e7795903
commit
8973d348ad
|
@ -489,6 +489,14 @@ class MyForm(QtGui.QMainWindow):
|
||||||
self.show()
|
self.show()
|
||||||
self.setWindowState(self.windowState() & QtCore.Qt.WindowMaximized)
|
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
|
# application indicator show or hide
|
||||||
def appIndicatorShowBitmessage(self):
|
def appIndicatorShowBitmessage(self):
|
||||||
if self.actionShow == None:
|
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 shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform:
|
||||||
if event.type() == QtCore.QEvent.WindowStateChange:
|
if event.type() == QtCore.QEvent.WindowStateChange:
|
||||||
if self.windowState() & QtCore.Qt.WindowMinimized:
|
if self.windowState() & QtCore.Qt.WindowMinimized:
|
||||||
self.hide()
|
self.appIndicatorHide()
|
||||||
self.trayIcon.show()
|
|
||||||
if 'win32' in sys.platform or 'win64' in sys.platform:
|
if 'win32' in sys.platform or 'win64' in sys.platform:
|
||||||
self.setWindowFlags(Qt.ToolTip)
|
self.setWindowFlags(Qt.ToolTip)
|
||||||
elif event.oldState() & QtCore.Qt.WindowMinimized:
|
elif event.oldState() & QtCore.Qt.WindowMinimized:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user