diff options
| -rw-r--r-- | src/leap/bitmask/gui/eip_status.py | 11 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/login.py | 3 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/mail_status.py | 16 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 85 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/preferenceswindow.py | 10 | ||||
| -rw-r--r-- | src/leap/bitmask/gui/wizard.py | 41 | ||||
| -rw-r--r-- | src/leap/bitmask/services/mail/conductor.py | 2 | 
7 files changed, 101 insertions, 67 deletions
diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py index 2ced7dc7..8f4d64b4 100644 --- a/src/leap/bitmask/gui/eip_status.py +++ b/src/leap/bitmask/gui/eip_status.py @@ -91,8 +91,9 @@ class EIPStatusWidget(QtGui.QWidget):      @QtCore.Slot()      def _on_VPN_status_clicked(self):          """ -        TRIGGER: self.ui.btnUpload.clicked -                 self.ui.btnDownload.clicked +        TRIGGERS: +            self.ui.btnUpload.clicked +            self.ui.btnDownload.clicked          Toggles between rate and total throughput display for vpn          status figures. @@ -350,7 +351,8 @@ class EIPStatusWidget(QtGui.QWidget):      @QtCore.Slot(dict)      def update_vpn_status(self, data=None):          """ -            TRIGGER: Signaler.eip_status_changed +        TRIGGERS: +            Signaler.eip_status_changed          Updates the download/upload labels based on the data provided by the          VPN thread. @@ -384,7 +386,8 @@ class EIPStatusWidget(QtGui.QWidget):      @QtCore.Slot(dict)      def update_vpn_state(self, vpn_state):          """ -            TRIGGER: Signaler.eip_state_changed +        TRIGGERS: +            Signaler.eip_state_changed          Updates the displayed VPN state based on the data provided by          the VPN thread. diff --git a/src/leap/bitmask/gui/login.py b/src/leap/bitmask/gui/login.py index 4a9626a6..681c0915 100644 --- a/src/leap/bitmask/gui/login.py +++ b/src/leap/bitmask/gui/login.py @@ -262,7 +262,8 @@ class LoginWidget(QtGui.QWidget):      def _current_provider_changed(self, param):      @QtCore.Slot(int)          """ -        TRIGGERS: self.ui.cmbProviders.currentIndexChanged +        TRIGGERS: +            self.ui.cmbProviders.currentIndexChanged          """          if param == (self.ui.cmbProviders.count() - 1):              self.show_wizard.emit() diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py index 059e5d68..d3346780 100644 --- a/src/leap/bitmask/gui/mail_status.py +++ b/src/leap/bitmask/gui/mail_status.py @@ -187,7 +187,7 @@ class MailStatusWidget(QtGui.QWidget):      @QtCore.Slot()      def set_soledad_failed(self):          """ -        TRIGGER: +        TRIGGERS:              SoledadBootstrapper.soledad_failed          This method is called whenever soledad has a failure. @@ -198,7 +198,7 @@ class MailStatusWidget(QtGui.QWidget):      @QtCore.Slot()      def set_soledad_invalid_auth_token(self):          """ -        TRIGGER: +        TRIGGERS:              SoledadBootstrapper.soledad_invalid_token          This method is called when the auth token is invalid @@ -253,7 +253,8 @@ class MailStatusWidget(QtGui.QWidget):      @QtCore.Slot(object)      def _mail_handle_soledad_events_slot(self, req):          """ -        TRIGGER: _mail_handle_soledad_events +        TRIGGERS: +            _mail_handle_soledad_events          Reacts to an Soledad event @@ -287,7 +288,8 @@ class MailStatusWidget(QtGui.QWidget):      @QtCore.Slot(object)      def _mail_handle_keymanager_events_slot(self, req):          """ -        TRIGGER: _mail_handle_keymanager_events +        TRIGGERS: +            _mail_handle_keymanager_events          Reacts to an KeyManager event @@ -333,7 +335,8 @@ class MailStatusWidget(QtGui.QWidget):      @QtCore.Slot(object)      def _mail_handle_smtp_events_slot(self, req):          """ -        TRIGGER: _mail_handle_smtp_events +        TRIGGERS: +            _mail_handle_smtp_events          Reacts to an SMTP event @@ -367,7 +370,8 @@ class MailStatusWidget(QtGui.QWidget):      @QtCore.Slot(object)      def _mail_handle_imap_events_slot(self, req):          """ -        TRIGGER: _mail_handle_imap_events +        TRIGGERS: +            _mail_handle_imap_events          Reacts to an IMAP event diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 6bdfe7c0..708ecf7f 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -460,7 +460,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _rejected_wizard(self):          """ -        TRIGGERS: self._wizard.rejected +        TRIGGERS: +            self._wizard.rejected          Called if the wizard has been cancelled or closed before          finishing. @@ -485,8 +486,8 @@ class MainWindow(QtGui.QMainWindow):      def _launch_wizard(self):          """          TRIGGERS: -          self._login_widget.show_wizard -          self.ui.action_wizard.triggered +            self._login_widget.show_wizard +            self.ui.action_wizard.triggered          Also called in first run. @@ -512,8 +513,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _wizard_finished(self):          """ -        TRIGGERS -          self._wizard.finished +        TRIGGERS: +            self._wizard.finished          Called when the wizard has finished.          """ @@ -538,7 +539,7 @@ class MainWindow(QtGui.QMainWindow):      def _show_logger_window(self):          """          TRIGGERS: -          self.ui.action_show_logs.triggered +            self.ui.action_show_logs.triggered          Displays the window with the history of messages logged until now          and displays the new ones on arrival. @@ -573,8 +574,8 @@ class MainWindow(QtGui.QMainWindow):      def _show_preferences(self):          """          TRIGGERS: -          self.ui.btnPreferences.clicked (disabled for now) -          self.ui.action_preferences +            self.ui.btnPreferences.clicked (disabled for now) +            self.ui.action_preferences          Displays the preferences window.          """ @@ -626,8 +627,8 @@ class MainWindow(QtGui.QMainWindow):      def _show_eip_preferences(self):          """          TRIGGERS: -          self.ui.btnEIPPreferences.clicked -          self.ui.action_eip_preferences (disabled for now) +            self.ui.btnEIPPreferences.clicked +            self.ui.action_eip_preferences (disabled for now)          Displays the EIP preferences window.          """ @@ -650,7 +651,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot(object)      def _react_to_new_updates(self, req):          """ -        TRIGGER: self._new_updates_available +        TRIGGERS: +            self._new_updates_available          Displays the new updates label and sets the updates_content          """ @@ -662,7 +664,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _updates_details(self):          """ -        TRIGGER: self.ui.btnMore.clicked +        TRIGGERS: +            self.ui.btnMore.clicked          Parses and displays the updates details          """ @@ -690,7 +693,7 @@ class MainWindow(QtGui.QMainWindow):      def _finish_init(self):          """          TRIGGERS: -          self._wizard.accepted +            self._wizard.accepted          Also called at the end of the constructor if not first run. @@ -835,7 +838,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot(int)      def _tray_activated(self, reason=None):          """ -        TRIGGER: self._systray.activated +        TRIGGERS: +            self._systray.activated          Displays the context menu from the tray icon          """ @@ -865,7 +869,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _toggle_visible(self):          """ -        TRIGGER: self._action_visible.triggered +        TRIGGERS: +            self._action_visible.triggered          Toggles the window visibility          """ @@ -912,7 +917,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _about(self):          """ -        TRIGGERS: self.ui.action_about_leap.triggered +        TRIGGERS: +            self.ui.action_about_leap.triggered          Display the About Bitmask dialog          """ @@ -939,7 +945,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _help(self):          """ -        TRIGGERS: self.ui.action_help.triggered +        TRIGGERS: +            self.ui.action_help.triggered          Display the Bitmask help dialog.          """ @@ -1039,7 +1046,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot(dict)      def _load_provider_config(self, data):          """ -        TRIGGER: self._backend.signaler.prov_download_provider_info +        TRIGGERS: +            self._backend.signaler.prov_download_provider_info          Once the provider config has been downloaded, this loads the          self._provider_config instance with it and starts the second @@ -1068,7 +1076,7 @@ class MainWindow(QtGui.QMainWindow):      def _login(self):          """          TRIGGERS: -          self._login_widget.login +            self._login_widget.login          Starts the login sequence. Which involves bootstrapping the          selected provider if the selection is valid (not empty), then @@ -1114,7 +1122,7 @@ class MainWindow(QtGui.QMainWindow):      def _cancel_login(self):          """          TRIGGERS: -          self._login_widget.cancel_login +            self._login_widget.cancel_login          Stops the login sequence.          """ @@ -1150,7 +1158,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot(dict)      def _provider_config_loaded(self, data):          """ -        TRIGGER: self._backend.signaler.prov_check_api_certificate +        TRIGGERS: +            self._backend.signaler.prov_check_api_certificate          Once the provider configuration is loaded, this starts the SRP          authentication @@ -1174,7 +1183,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _authentication_finished(self):          """ -        TRIGGER: self._srp_auth.authentication_finished +        TRIGGERS: +            self._srp_auth.authentication_finished          Once the user is properly authenticated, try starting the EIP          service @@ -1290,7 +1300,7 @@ class MainWindow(QtGui.QMainWindow):          # TODO missing param docstring          """          TRIGGERS: -          self._soledad_bootstrapper.download_config +            self._soledad_bootstrapper.download_config          If there was a problem, displays it, otherwise it does nothing.          This is used for intermediate bootstrapping stages, in case @@ -1324,8 +1334,8 @@ class MainWindow(QtGui.QMainWindow):      def _soledad_bootstrapped_stage(self, data):          """          TRIGGERS: -          self._soledad_bootstrapper.gen_key -          self._soledad_bootstrapper.local_only_ready +            self._soledad_bootstrapper.gen_key +            self._soledad_bootstrapper.local_only_ready          If there was a problem, displays it, otherwise it does nothing.          This is used for intermediate bootstrapping stages, in case @@ -1484,6 +1494,7 @@ class MainWindow(QtGui.QMainWindow):          """          TRIGGERS:              self._eip_status.eip_connection_connected +          Emits the EIPConnection.qtsigs.connected_signal          This is a little workaround for connecting the vpn-connected @@ -1703,7 +1714,7 @@ class MainWindow(QtGui.QMainWindow):      def _do_eip_restart(self):          # XXX Should move to EIP Conductor          """ -        TRIGGER: +        TRIGGERS:              self._eip_connection.qtsigs.process_restart          Restart the connection. @@ -1817,7 +1828,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot(dict)      def _finish_eip_bootstrap(self, data):          """ -        TRIGGER: self._backend.signaler.eip_client_certificate_ready +        TRIGGERS: +            self._backend.signaler.eip_client_certificate_ready          Starts the VPN thread if the eip configuration is properly          loaded @@ -1839,7 +1851,7 @@ class MainWindow(QtGui.QMainWindow):          # TODO missing param          """          TRIGGERS: -          self._backend.signaler.eip_config_ready +            self._backend.signaler.eip_config_ready          If there was a problem, displays it, otherwise it does nothing.          This is used for intermediate bootstrapping stages, in case @@ -1881,7 +1893,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _logout(self):          """ -        TRIGGER: self._login_widget.logout +        TRIGGERS: +            self._login_widget.logout          Starts the logout sequence          """ @@ -1901,7 +1914,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _logout_error(self):          """ -        TRIGGER: self._srp_auth.logout_error +        TRIGGER: +            self._srp_auth.logout_error          Inform the user about a logout error.          """ @@ -1913,7 +1927,8 @@ class MainWindow(QtGui.QMainWindow):      @QtCore.Slot()      def _logout_ok(self):          """ -        TRIGGER: self._srp_auth.logout_ok +        TRIGGER: +            self._srp_auth.logout_ok          Switches the stackedWidget back to the login stage after          logging out @@ -1930,10 +1945,10 @@ class MainWindow(QtGui.QMainWindow):          # TODO this method name is confusing as hell.          """          TRIGGERS: -          self._backend.signaler.prov_name_resolution -          self._backend.signaler.prov_https_connection -          self._backend.signaler.prov_download_ca_cert -          self._backend.signaler.eip_config_ready +            self._backend.signaler.prov_name_resolution +            self._backend.signaler.prov_https_connection +            self._backend.signaler.prov_download_ca_cert +            self._backend.signaler.eip_config_ready          If there was a problem, displays it, otherwise it does nothing.          This is used for intermediate bootstrapping stages, in case diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py index 111ec6d2..014a0a4f 100644 --- a/src/leap/bitmask/gui/preferenceswindow.py +++ b/src/leap/bitmask/gui/preferenceswindow.py @@ -211,7 +211,7 @@ class PreferencesWindow(QtGui.QDialog):      def _change_password_ok(self):          """          TRIGGERS: -          self._backend.signaler.srp_password_change_ok +            self._backend.signaler.srp_password_change_ok          Callback used to display a successfully changed password.          """ @@ -233,8 +233,8 @@ class PreferencesWindow(QtGui.QDialog):      def _change_password_problem(self, msg):          """          TRIGGERS: -          self._backend.signaler.srp_password_change_error -          self._backend.signaler.srp_password_change_badpw +            self._backend.signaler.srp_password_change_error +            self._backend.signaler.srp_password_change_badpw          Callback used to display an error on changing password. @@ -290,7 +290,9 @@ class PreferencesWindow(QtGui.QDialog):      @QtCore.Slot(str, int)      def _service_selection_changed(self, service, state):          """ -        TRIGGER: service_checkbox.stateChanged +        TRIGGERS: +            service_checkbox.stateChanged +          Adds the service to the state if the state is checked, removes          it otherwise diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index 52cbab48..957a67e0 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -145,7 +145,7 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot()      def _wizard_finished(self):          """ -        TRIGGER: +        TRIGGERS:              self.finished          This method is called when the wizard is accepted or rejected. @@ -212,7 +212,7 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(unicode)      def _enable_check(self, reset=True):          """ -        TRIGGER: +        TRIGGERS:              self.ui.lnProvider.textChanged          Enables/disables the 'check' button in the SELECT_PROVIDER_PAGE @@ -284,7 +284,7 @@ class Wizard(QtGui.QWizard):      def _registration_finished(self):          """          TRIGGERS: -          self._backend.signaler.srp_registration_finished +            self._backend.signaler.srp_registration_finished          The registration has finished successfully, so we do some final steps.          """ @@ -310,7 +310,7 @@ class Wizard(QtGui.QWizard):      def _registration_failed(self):          """          TRIGGERS: -          self._backend.signaler.srp_registration_failed +            self._backend.signaler.srp_registration_failed          The registration has failed, so we report the problem.          """ @@ -324,7 +324,7 @@ class Wizard(QtGui.QWizard):      def _registration_taken(self):          """          TRIGGERS: -          self._backend.signaler.srp_registration_taken +            self._backend.signaler.srp_registration_taken          The requested username is taken, warn the user about that.          """ @@ -370,8 +370,8 @@ class Wizard(QtGui.QWizard):      def _check_provider(self):          """          TRIGGERS: -          self.ui.btnCheck.clicked -          self.ui.lnProvider.returnPressed +            self.ui.btnCheck.clicked +            self.ui.lnProvider.returnPressed          Starts the checks for a given provider          """ @@ -404,7 +404,7 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(bool)      def _skip_provider_checks(self, skip):          """ -        Triggered: +        TRIGGERS:              self.ui.rbExistingProvider.toggled          Allows the user to move to the next page without make any checks, @@ -448,7 +448,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(dict)      def _name_resolution(self, data):          """ -        TRIGGER: self._backend.signaler.prov_name_resolution +        TRIGGERS: +            self._backend.signaler.prov_name_resolution          Sets the status for the name resolution check          """ @@ -467,7 +468,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(dict)      def _https_connection(self, data):          """ -        TRIGGER: self._backend.signaler.prov_https_connection +        TRIGGERS: +            self._backend.signaler.prov_https_connection          Sets the status for the https connection check          """ @@ -486,7 +488,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(dict)      def _download_provider_info(self, data):          """ -        TRIGGER: self._backend.signaler.prov_download_provider_info +        TRIGGERS: +            self._backend.signaler.prov_download_provider_info          Sets the status for the provider information download          check. Since this check is the last of this set, it also @@ -520,7 +523,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(dict)      def _download_ca_cert(self, data):          """ -        TRIGGER: self._backend.signaler.prov_download_ca_cert +        TRIGGERS: +            self._backend.signaler.prov_download_ca_cert          Sets the status for the download of the CA certificate check          """ @@ -532,7 +536,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(dict)      def _check_ca_fingerprint(self, data):          """ -        TRIGGER: self._backend.signaler.prov_check_ca_fingerprint +        TRIGGERS: +            self._backend.signaler.prov_check_ca_fingerprint          Sets the status for the CA fingerprint check          """ @@ -544,7 +549,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(dict)      def _check_api_certificate(self, data):          """ -        TRIGGER: self._backend.signaler.prov_check_api_certificate +        TRIGGERS: +            self._backend.signaler.prov_check_api_certificate          Sets the status for the API certificate check. Also finishes          the provider bootstrapper thread since it's not needed anymore @@ -557,7 +563,9 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(str, int)      def _service_selection_changed(self, service, state):          """ -        TRIGGER: service_checkbox.stateChanged +        TRIGGERS: +            service_checkbox.stateChanged +          Adds the service to the state if the state is checked, removes          it otherwise @@ -605,7 +613,8 @@ class Wizard(QtGui.QWizard):      @QtCore.Slot(int)      def _current_id_changed(self, pageId):          """ -        TRIGGER: self.currentIdChanged +        TRIGGERS: +            self.currentIdChanged          Prepares the pages when they appear          """ diff --git a/src/leap/bitmask/services/mail/conductor.py b/src/leap/bitmask/services/mail/conductor.py index 4448d5d0..c1761afa 100644 --- a/src/leap/bitmask/services/mail/conductor.py +++ b/src/leap/bitmask/services/mail/conductor.py @@ -242,7 +242,7 @@ class SMTPControl(object):      def smtp_bootstrapped_stage(self, data):          """          TRIGGERS: -          self.smtp_bootstrapper.download_config +            self.smtp_bootstrapper.download_config          If there was a problem, displays it, otherwise it does nothing.          This is used for intermediate bootstrapping stages, in case  | 
