Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mesonium
gajim
Commits
fbe8c156
Commit
fbe8c156
authored
4 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Client: Use NetworkEvent instead of OurShowEvent
parent
995b0172
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/common/client.py
+8
-9
8 additions, 9 deletions
gajim/common/client.py
with
8 additions
and
9 deletions
gajim/common/client.py
+
8
−
9
View file @
fbe8c156
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
from
gajim.common.i18n
import
_
from
gajim.common.i18n
import
_
from
gajim.common.connection_handlers
import
ConnectionHandlers
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.common.connection_handlers_events
import
MessageSentEvent
from
gajim.gtk.util
import
open_window
from
gajim.gtk.util
import
open_window
...
@@ -216,8 +215,8 @@ def process_ssl_errors(self):
...
@@ -216,8 +215,8 @@ def process_ssl_errors(self):
def
_on_resume_failed
(
self
,
_client
,
_signal_name
):
def
_on_resume_failed
(
self
,
_client
,
_signal_name
):
log
.
info
(
'
Resume failed
'
)
log
.
info
(
'
Resume failed
'
)
app
.
nec
.
push_incoming_event
(
OurShow
Event
(
app
.
nec
.
push_incoming_event
(
Network
Event
(
None
,
conn
=
self
,
show
=
'
offline
'
))
'
our-show
'
,
conn
=
self
,
show
=
'
offline
'
))
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
def
_on_resume_successful
(
self
,
_client
,
_signal_name
):
def
_on_resume_successful
(
self
,
_client
,
_signal_name
):
...
@@ -260,8 +259,8 @@ def _on_disconnected(self, _client, _signal_name):
...
@@ -260,8 +259,8 @@ def _on_disconnected(self, _client, _signal_name):
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
self
.
_reconnect
=
False
self
.
_reconnect
=
False
self
.
_after_disconnect
()
self
.
_after_disconnect
()
app
.
nec
.
push_incoming_event
(
OurShow
Event
(
app
.
nec
.
push_incoming_event
(
Network
Event
(
None
,
conn
=
self
,
show
=
'
offline
'
))
'
our-show
'
,
conn
=
self
,
show
=
'
offline
'
))
self
.
process_ssl_errors
()
self
.
process_ssl_errors
()
elif
domain
in
(
StreamError
.
STREAM
,
StreamError
.
BIND
):
elif
domain
in
(
StreamError
.
STREAM
,
StreamError
.
BIND
):
...
@@ -293,12 +292,12 @@ def _on_password(password):
...
@@ -293,12 +292,12 @@ def _on_password(password):
self
.
_after_disconnect
()
self
.
_after_disconnect
()
self
.
_schedule_reconnect
()
self
.
_schedule_reconnect
()
app
.
nec
.
push_incoming_event
(
app
.
nec
.
push_incoming_event
(
OurShowEvent
(
None
,
conn
=
self
,
show
=
'
error
'
))
NetworkEvent
(
'
our-show
'
,
conn
=
self
,
show
=
'
error
'
))
else
:
else
:
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
self
.
get_module
(
'
Chatstate
'
).
enabled
=
False
app
.
nec
.
push_incoming_event
(
OurShow
Event
(
app
.
nec
.
push_incoming_event
(
Network
Event
(
None
,
conn
=
self
,
show
=
'
offline
'
))
'
our-show
'
,
conn
=
self
,
show
=
'
offline
'
))
self
.
_after_disconnect
()
self
.
_after_disconnect
()
def
_after_disconnect
(
self
):
def
_after_disconnect
(
self
):
...
@@ -536,7 +535,7 @@ def _abort_reconnect(self):
...
@@ -536,7 +535,7 @@ def _abort_reconnect(self):
self
.
_set_state
(
ClientState
.
DISCONNECTED
)
self
.
_set_state
(
ClientState
.
DISCONNECTED
)
self
.
_disable_reconnect_timer
()
self
.
_disable_reconnect_timer
()
app
.
nec
.
push_incoming_event
(
app
.
nec
.
push_incoming_event
(
OurShowEvent
(
None
,
conn
=
self
,
show
=
'
offline
'
))
NetworkEvent
(
'
our-show
'
,
conn
=
self
,
show
=
'
offline
'
))
if
self
.
_destroy_client
:
if
self
.
_destroy_client
:
self
.
_client
.
destroy
()
self
.
_client
.
destroy
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment