From c379978f3e59043acbbc1414243b747748c67259 Mon Sep 17 00:00:00 2001 From: themighty1 Date: Wed, 7 Jan 2015 01:55:01 +0300 Subject: [PATCH] fix minimize-to-tray linux --- src/bitmessageqt/__init__.py | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index ec4452f8..c45197b6 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -1438,18 +1438,16 @@ class MyForm(QtGui.QMainWindow): self.ui.retranslateUi(self) if event.type() == QtCore.QEvent.WindowStateChange: if self.windowState() & QtCore.Qt.WindowMinimized: - self.actionShow.setChecked(False) - if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: - if event.type() == QtCore.QEvent.WindowStateChange: - if self.windowState() & QtCore.Qt.WindowMinimized: + if shared.config.getboolean('bitmessagesettings', 'minimizetotray') and not 'darwin' in sys.platform: self.appIndicatorHide() if 'win32' in sys.platform or 'win64' in sys.platform: - self.setWindowFlags(Qt.ToolTip) - elif event.oldState() & QtCore.Qt.WindowMinimized: - # The window state has just been changed to - # Normal/Maximised/FullScreen - pass - # QtGui.QWidget.changeEvent(self, event) + self.setWindowFlags(Qt.ToolTip) + elif event.oldState() & QtCore.Qt.WindowMinimized: + # The window state has just been changed to + # Normal/Maximised/FullScreen + pass + # QtGui.QWidget.changeEvent(self, event) + def __icon_activated(self, reason): if reason == QtGui.QSystemTrayIcon.Trigger: @@ -3437,9 +3435,6 @@ class settingsDialog(QtGui.QDialog): self.ui.checkBoxStartOnLogon.setDisabled(True) self.ui.checkBoxStartOnLogon.setText(_translate( "MainWindow", "Start-on-login not yet supported on your OS.")) - self.ui.checkBoxMinimizeToTray.setDisabled(True) - self.ui.checkBoxMinimizeToTray.setText(_translate( - "MainWindow", "Minimize-to-tray not yet supported on your OS.")) # On the Network settings tab: self.ui.lineEditTCPPort.setText(str( shared.config.get('bitmessagesettings', 'port')))