Commit 507a3cf1 authored by Philipp Hörist's avatar Philipp Hörist

XMLConsole: Show stanza generated by the AccountWizard

parent 8b95c66a
Pipeline #5570 passed with stages
in 2 minutes and 44 seconds
......@@ -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...'))
......
......@@ -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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment