Philipp Hörist pushed to branch master at gajim / gajim
Commits: 507a3cf1 by lovetox at 2020-05-06T17:42:56+02:00 XMLConsole: Show stanza generated by the AccountWizard
- - - - -
2 changed files:
- gajim/gtk/account_wizard.py - gajim/gtk/xml_console.py
Changes:
===================================== gajim/gtk/account_wizard.py ===================================== @@ -31,6 +31,7 @@ from nbxmpp.util import is_error_result from gajim.common import app from gajim.common import configpaths from gajim.common import helpers +from gajim.common.nec import NetworkEvent from gajim.common.helpers import open_uri from gajim.common.helpers import validate_jid from gajim.common.helpers import get_proxy @@ -236,6 +237,8 @@ class AccountWizard(Assistant):
client.subscribe('disconnected', self._on_disconnected) client.subscribe('connection-failed', self._on_connection_failed) + client.subscribe('stanza-sent', self._on_stanza_sent) + client.subscribe('stanza-received', self._on_stanza_received) return client
def _disconnect(self): @@ -245,6 +248,18 @@ class AccountWizard(Assistant): self._client.disconnect() self._client = None
+ @staticmethod + def _on_stanza_sent(_client, _signal_name, stanza): + app.nec.push_incoming_event(NetworkEvent('stanza-sent', + account='AccountWizard', + stanza=stanza)) + + @staticmethod + def _on_stanza_received(_client, _signal_name, stanza): + app.nec.push_incoming_event(NetworkEvent('stanza-received', + account='AccountWizard', + stanza=stanza)) + def _test_credentials(self, ignore_all_errors=False): self._show_progress_page(_('Connecting...'), _('Connecting to server...'))
===================================== gajim/gtk/xml_console.py ===================================== @@ -267,6 +267,7 @@ class XMLConsoleWindow(Gtk.ApplicationWindow, EventHelper): for account in accounts: label = app.get_account_label(account) combo_accounts.append((account, label)) + combo_accounts.append(('AccountWizard', 'Account Wizard')) return combo_accounts
def _on_filter_options(self, *args):
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/commit/507a3cf11a04b37c596c80b70e7a79d08...