diff --git a/gajim/common/client.py b/gajim/common/client.py index 0a078e6a31278164bd50893a70dec1851c9025a5..347cbf22cad589cd39a9b37c48923c54a3533518 100644 --- a/gajim/common/client.py +++ b/gajim/common/client.py @@ -40,7 +40,6 @@ from gajim.common.i18n import _ from gajim.common.connection_handlers import ConnectionHandlers -from gajim.common.connection_handlers_events import OurShowEvent from gajim.common.connection_handlers_events import MessageSentEvent from gajim.gtk.util import open_window @@ -216,8 +215,8 @@ def process_ssl_errors(self): def _on_resume_failed(self, _client, _signal_name): log.info('Resume failed') - app.nec.push_incoming_event(OurShowEvent( - None, conn=self, show='offline')) + app.nec.push_incoming_event(NetworkEvent( + 'our-show', conn=self, show='offline')) self.get_module('Chatstate').enabled = False def _on_resume_successful(self, _client, _signal_name): @@ -260,8 +259,8 @@ def _on_disconnected(self, _client, _signal_name): self.get_module('Chatstate').enabled = False self._reconnect = False self._after_disconnect() - app.nec.push_incoming_event(OurShowEvent( - None, conn=self, show='offline')) + app.nec.push_incoming_event(NetworkEvent( + 'our-show', conn=self, show='offline')) self.process_ssl_errors() elif domain in (StreamError.STREAM, StreamError.BIND): @@ -293,12 +292,12 @@ def _on_password(password): self._after_disconnect() self._schedule_reconnect() app.nec.push_incoming_event( - OurShowEvent(None, conn=self, show='error')) + NetworkEvent('our-show', conn=self, show='error')) else: self.get_module('Chatstate').enabled = False - app.nec.push_incoming_event(OurShowEvent( - None, conn=self, show='offline')) + app.nec.push_incoming_event(NetworkEvent( + 'our-show', conn=self, show='offline')) self._after_disconnect() def _after_disconnect(self): @@ -536,7 +535,7 @@ def _abort_reconnect(self): self._set_state(ClientState.DISCONNECTED) self._disable_reconnect_timer() app.nec.push_incoming_event( - OurShowEvent(None, conn=self, show='offline')) + NetworkEvent('our-show', conn=self, show='offline')) if self._destroy_client: self._client.destroy()