remove bookmark and close muc when destroying the room. Fixes #8862
This commit is contained in:
parent
a884ba6762
commit
c2184aaf8c
2 changed files with 11 additions and 1 deletions
|
@ -2731,6 +2731,13 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
if jid:
|
if jid:
|
||||||
destroy.setAttr('jid', jid)
|
destroy.setAttr('jid', jid)
|
||||||
self.connection.send(iq)
|
self.connection.send(iq)
|
||||||
|
i = 0
|
||||||
|
for bm in self.bookmarks:
|
||||||
|
if bm['jid'] == room_jid:
|
||||||
|
del self.bookmarks[i]
|
||||||
|
break
|
||||||
|
i += 1
|
||||||
|
self.store_bookmarks()
|
||||||
|
|
||||||
def send_gc_status(self, nick, jid, show, status, auto=False):
|
def send_gc_status(self, nick, jid, show, status, auto=False):
|
||||||
if not app.account_is_connected(self.name):
|
if not app.account_is_connected(self.name):
|
||||||
|
|
|
@ -631,7 +631,6 @@ class GroupchatControl(ChatControlBase):
|
||||||
'send-file-httpupload-' + self.control_id)
|
'send-file-httpupload-' + self.control_id)
|
||||||
httpupload.set_enabled(
|
httpupload.set_enabled(
|
||||||
online and app.connections[self.account].httpupload)
|
online and app.connections[self.account].httpupload)
|
||||||
|
|
||||||
win.lookup_action('send-file-' + self.control_id).set_enabled(
|
win.lookup_action('send-file-' + self.control_id).set_enabled(
|
||||||
httpupload.get_enabled())
|
httpupload.get_enabled())
|
||||||
|
|
||||||
|
@ -688,6 +687,10 @@ class GroupchatControl(ChatControlBase):
|
||||||
return
|
return
|
||||||
app.connections[self.account].destroy_gc_room(
|
app.connections[self.account].destroy_gc_room(
|
||||||
self.room_jid, reason, jid)
|
self.room_jid, reason, jid)
|
||||||
|
gui_menu_builder.build_bookmark_menu(self.account)
|
||||||
|
self.force_non_minimizable = True
|
||||||
|
self.parent_win.remove_tab(self, self.parent_win.CLOSE_COMMAND)
|
||||||
|
self.force_non_minimizable = False
|
||||||
|
|
||||||
# Ask for a reason
|
# Ask for a reason
|
||||||
dialogs.DoubleInputDialog(_('Destroying %s') % '\u200E' + \
|
dialogs.DoubleInputDialog(_('Destroying %s') % '\u200E' + \
|
||||||
|
|
Loading…
Add table
Reference in a new issue