Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
gajim
gajim
Commits
5c04e715
Commit
5c04e715
authored
Sep 01, 2019
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Groupchat: Make sure we leave the MUC on control shutdown
parent
31a90949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
gajim/groupchat_control.py
gajim/groupchat_control.py
+14
-10
No files found.
gajim/groupchat_control.py
View file @
5c04e715
...
...
@@ -1594,10 +1594,8 @@ def got_disconnected(self):
self
.
update_actions
()
def
leave
(
self
,
reason
=
None
):
app
.
connections
[
self
.
account
].
get_module
(
'MUC'
).
leave
(
self
.
room_jid
,
reason
=
reason
)
self
.
got_disconnected
()
self
.
_close_control
()
self
.
_close_control
(
reason
=
reason
)
def
rejoin
(
self
):
if
not
self
.
autorejoin
:
...
...
@@ -2187,7 +2185,16 @@ def minimize(self, status='offline'):
del
win
.
_controls
[
self
.
account
][
self
.
contact
.
jid
]
def
shutdown
(
self
,
status
=
'offline'
):
def
shutdown
(
self
,
reason
=
None
):
# Preventing autorejoin from being activated
self
.
autorejoin
=
False
# Leave MUC if we are still joined
if
self
.
_muc_data
.
state
!=
MUCJoinedState
.
NOT_JOINED
:
self
.
got_disconnected
()
app
.
connections
[
self
.
account
].
get_module
(
'MUC'
).
leave
(
self
.
room_jid
,
reason
=
reason
)
# PluginSystem: calling shutdown of super class (ChatControlBase)
# to let it remove it's GUI extension points
super
(
GroupchatControl
,
self
).
shutdown
()
...
...
@@ -2196,9 +2203,6 @@ def shutdown(self, status='offline'):
app
.
plugin_manager
.
remove_gui_extension_point
(
'groupchat_control'
,
self
)
# Preventing autorejoin from being activated
self
.
autorejoin
=
False
# Unregister handlers
for
handler
in
self
.
_event_handlers
:
app
.
ged
.
remove_event_handler
(
*
handler
)
...
...
@@ -2282,11 +2286,11 @@ def on_cancel(is_checked):
on_yes
(
self
)
def
_close_control
(
self
):
def
_close_control
(
self
,
reason
=
None
):
if
self
.
parent_win
is
None
:
self
.
shutdown
()
self
.
shutdown
(
reason
)
else
:
self
.
parent_win
.
remove_tab
(
self
,
None
,
force
=
True
)
self
.
parent_win
.
remove_tab
(
self
,
None
,
reason
=
reason
,
force
=
True
)
def
set_control_active
(
self
,
state
):
self
.
conv_textview
.
allow_focus_out_line
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment