Philipp Hörist pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/gtk/account_wizard.py
    ... ... @@ -31,6 +31,7 @@ from nbxmpp.util import is_error_result
    31 31
     from gajim.common import app
    
    32 32
     from gajim.common import configpaths
    
    33 33
     from gajim.common import helpers
    
    34
    +from gajim.common.nec import NetworkEvent
    
    34 35
     from gajim.common.helpers import open_uri
    
    35 36
     from gajim.common.helpers import validate_jid
    
    36 37
     from gajim.common.helpers import get_proxy
    
    ... ... @@ -236,6 +237,8 @@ class AccountWizard(Assistant):
    236 237
     
    
    237 238
             client.subscribe('disconnected', self._on_disconnected)
    
    238 239
             client.subscribe('connection-failed', self._on_connection_failed)
    
    240
    +        client.subscribe('stanza-sent', self._on_stanza_sent)
    
    241
    +        client.subscribe('stanza-received', self._on_stanza_received)
    
    239 242
             return client
    
    240 243
     
    
    241 244
         def _disconnect(self):
    
    ... ... @@ -245,6 +248,18 @@ class AccountWizard(Assistant):
    245 248
             self._client.disconnect()
    
    246 249
             self._client = None
    
    247 250
     
    
    251
    +    @staticmethod
    
    252
    +    def _on_stanza_sent(_client, _signal_name, stanza):
    
    253
    +        app.nec.push_incoming_event(NetworkEvent('stanza-sent',
    
    254
    +                                                 account='AccountWizard',
    
    255
    +                                                 stanza=stanza))
    
    256
    +
    
    257
    +    @staticmethod
    
    258
    +    def _on_stanza_received(_client, _signal_name, stanza):
    
    259
    +        app.nec.push_incoming_event(NetworkEvent('stanza-received',
    
    260
    +                                                 account='AccountWizard',
    
    261
    +                                                 stanza=stanza))
    
    262
    +
    
    248 263
         def _test_credentials(self, ignore_all_errors=False):
    
    249 264
             self._show_progress_page(_('Connecting...'),
    
    250 265
                                      _('Connecting to server...'))
    

  • gajim/gtk/xml_console.py
    ... ... @@ -267,6 +267,7 @@ class XMLConsoleWindow(Gtk.ApplicationWindow, EventHelper):
    267 267
             for account in accounts:
    
    268 268
                 label = app.get_account_label(account)
    
    269 269
                 combo_accounts.append((account, label))
    
    270
    +        combo_accounts.append(('AccountWizard', 'Account Wizard'))
    
    270 271
             return combo_accounts
    
    271 272
     
    
    272 273
         def _on_filter_options(self, *args):