def _SH_AcceptButtonClicked(self): if self.panel_view.currentWidget() is self.add_account_panel: account = Account(self.sip_address) account.enabled = True account.display_name = self.display_name account.auth.password = self.password call_in_auxiliary_thread(account.save) account_manager = AccountManager() account_manager.default_account = account self.accept() else: self.setEnabled(False) self.create_status_label.value = Status("Creating account on server...") self._create_sip_account(self.username, self.password, self.email_address, self.display_name)
def _AH_AudioOutputDeviceChanged(self, action): settings = SIPSimpleSettings() settings.audio.output_device = action.data().toPyObject() call_in_auxiliary_thread(settings.save)