diff options
author | Tomás Touceda <chiiph@leap.se> | 2013-11-06 11:18:49 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2013-11-06 11:18:49 -0300 |
commit | f04c992c2d06185aaca3f06bcb72a434fae33acf (patch) | |
tree | 1a83ca7ff95da91bf712701cac9e8e4668cbee84 | |
parent | 11ce60c63730f9aa827c4b93ba3046deea93f55b (diff) |
Various minor OSX fixes
-rw-r--r-- | changes/bug_4379_osx_fixes | 1 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 10 | ||||
-rw-r--r-- | src/leap/bitmask/gui/statemachines.py | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/changes/bug_4379_osx_fixes b/changes/bug_4379_osx_fixes new file mode 100644 index 00000000..d2a83338 --- /dev/null +++ b/changes/bug_4379_osx_fixes @@ -0,0 +1 @@ +- Improve compatibility with OSX Mavericks. Fixes #4379.
\ No newline at end of file diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 5eb9e6dc..549097ae 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -334,7 +334,7 @@ class MainWindow(QtGui.QMainWindow): self.eip_machine = None # start event machines self.start_eip_machine() - self._mail_conductor.start_mail_machine(parent=self) + self._mail_conductor.start_mail_machine() if self._first_run(): self._wizard_firstrun = True @@ -674,10 +674,9 @@ class MainWindow(QtGui.QMainWindow): Toggles the window visibility """ visible = self.isVisible() and self.isActiveWindow() - qApp = QtCore.QCoreApplication.instance() if not visible: - qApp.setQuitOnLastWindowClosed(True) + QtGui.QApplication.setQuitOnLastWindowClosed(True) self.show() self.activateWindow() self.raise_() @@ -685,7 +684,7 @@ class MainWindow(QtGui.QMainWindow): # We set this in order to avoid dialogs shutting down the # app on close, as they will be the only visible window. # e.g.: PreferencesWindow, LoggerWindow - qApp.setQuitOnLastWindowClosed(False) + QtGui.QApplication.setQuitOnLastWindowClosed(False) self.hide() # Wait a bit until the window visibility has changed so @@ -1657,8 +1656,7 @@ class MainWindow(QtGui.QMainWindow): # UI stuff. # Set this in case that the app is hidden - qApp = QtCore.QCoreApplication.instance() - qApp.setQuitOnLastWindowClosed(True) + QtGui.QApplication.setQuitOnLastWindowClosed(True) self._cleanup_and_quit() diff --git a/src/leap/bitmask/gui/statemachines.py b/src/leap/bitmask/gui/statemachines.py index 386cb75f..93731ce0 100644 --- a/src/leap/bitmask/gui/statemachines.py +++ b/src/leap/bitmask/gui/statemachines.py @@ -357,7 +357,7 @@ class ConnectionMachineBuilder(object): parent = kwargs.get('parent', None) # 1. create machine - machine = CompositeMachine(parent=parent) + machine = CompositeMachine() # 2. create states off = States.Off(conn.qtsigs.disconnected_signal, |