def get_credentials(self, server_url): credentials = Keyring.get_auth(server_url) username = credentials.username if credentials else None password = credentials.password if credentials else None result = None if self.credentials_dialog.run(server_url, username, password) == Gtk.ResponseType.OK: result = self.credentials_dialog.credentials if self.credentials_dialog.save_credentials: Keyring.set_auth(server_url, result.username, result.password) self._statusbar.update(self._model) return result
def _set_history(store): for server in Keyring.get_server_history(): store.append([server])
def _save(): servers = ServerHistoryViewModel._entries() Keyring.update_server_history(list(servers))