diff options
-rw-r--r-- | changes/bug-4148_wizard-ui-providers-back | 2 | ||||
-rw-r--r-- | changes/bug_4379_osx_fixes | 1 | ||||
-rwxr-xr-x | pkg/scripts/bootstrap_develop.sh | 26 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 10 | ||||
-rw-r--r-- | src/leap/bitmask/gui/statemachines.py | 2 | ||||
-rw-r--r-- | src/leap/bitmask/gui/wizard.py | 25 |
6 files changed, 45 insertions, 21 deletions
diff --git a/changes/bug-4148_wizard-ui-providers-back b/changes/bug-4148_wizard-ui-providers-back new file mode 100644 index 00000000..9c96400f --- /dev/null +++ b/changes/bug-4148_wizard-ui-providers-back @@ -0,0 +1,2 @@ +- Wizard now behaves correctly in provider selection after click 'cancel' or + 'back'. Closes #4148. 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/pkg/scripts/bootstrap_develop.sh b/pkg/scripts/bootstrap_develop.sh index 4660c499..07063a81 100755 --- a/pkg/scripts/bootstrap_develop.sh +++ b/pkg/scripts/bootstrap_develop.sh @@ -38,12 +38,21 @@ clone_repos() { echo "${cc_green}Status: $status...${cc_normal}" set -x # show commands - # clone the leap.se repos - git clone ssh://gitolite@leap.se/bitmask_client - git clone ssh://gitolite@leap.se/leap_pycommon - git clone ssh://gitolite@leap.se/soledad - git clone ssh://gitolite@leap.se/keymanager - git clone ssh://gitolite@leap.se/leap_mail + if [[ "$1" == "ro" ]]; then + # read-only remotes: + git clone https://leap.se/git/bitmask_client + git clone https://leap.se/git/leap_pycommon + git clone https://leap.se/git/soledad + git clone https://leap.se/git/keymanager + git clone https://leap.se/git/leap_mail + else + # read-write remotes: + git clone ssh://gitolite@leap.se/bitmask_client + git clone ssh://gitolite@leap.se/leap_pycommon + git clone ssh://gitolite@leap.se/soledad + git clone ssh://gitolite@leap.se/keymanager + git clone ssh://gitolite@leap.se/leap_mail + fi set +x echo "${cc_green}Status: $status done!${cc_normal}" @@ -129,7 +138,7 @@ finish(){ } initialize() { - clone_repos + clone_repos $1 checkout_develop create_venv setup_develop @@ -169,6 +178,7 @@ help() { echo "Usage: $0 {init | update | help}" echo echo " init : Initialize repositories, create virtualenv and \`python setup.py develop\` all." + echo " You can use \`init ro\` in order to use the https remotes if you don't have rw access." echo " update : Update the repositories and install new deps (if needed)." echo " run : Runs the client (any extra parameters will be sent to the app)." echo " help : Show this help" @@ -177,7 +187,7 @@ help() { case "$1" in init) - initialize + initialize $2 ;; update) update diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 2e050d44..a91f4e71 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 @@ -1659,8 +1658,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, diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index 8de5802e..5c4a6f8e 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -111,8 +111,9 @@ class Wizard(QtGui.QWizard): self.currentIdChanged.connect(self._current_id_changed) - self.ui.lnProvider.textChanged.connect( - self._enable_check) + self.ui.lnProvider.textChanged.connect(self._enable_check) + self.ui.rbNewProvider.toggled.connect( + lambda x: self._enable_check()) self.ui.lblUser.returnPressed.connect( self._focus_password) @@ -193,8 +194,19 @@ class Wizard(QtGui.QWizard): def get_services(self): return self._selected_services - def _enable_check(self, text): - self.ui.btnCheck.setEnabled(len(self.ui.lnProvider.text()) != 0) + @QtCore.Slot() + def _enable_check(self): + """ + SLOT + TRIGGER: + self.ui.lnProvider.textChanged + + Enables/disables the 'check' button in the SELECT_PROVIDER_PAGE + depending on the lnProvider content. + """ + enabled = len(self.ui.lnProvider.text()) != 0 + enabled = enabled and self.ui.rbNewProvider.isChecked() + self.ui.btnCheck.setEnabled(enabled) self._reset_provider_check() def _focus_password(self): @@ -555,8 +567,9 @@ class Wizard(QtGui.QWizard): Prepares the pages when they appear """ if pageId == self.SELECT_PROVIDER_PAGE: - self._reset_provider_check() - self._enable_check("") + skip = self.ui.rbExistingProvider.isChecked() + self._enable_check() + self._skip_provider_checks(skip) if pageId == self.SETUP_PROVIDER_PAGE: self._reset_provider_setup() |