Commit 1b7f3f51 authored by Philipp Hörist's avatar Philipp Hörist

Groupchat: Remove include/exclude list when closing the tab

The available options regarding closing tabs should be enough
parent 80c1c1f5
......@@ -184,8 +184,6 @@ class Config:
'print_ichat_every_foo_minutes': [opt_int, 5, _('When not printing time for every message (\'print_time\'==sometimes), print it every x minutes.')],
'confirm_paste_image': [opt_bool, True, _('Ask before pasting an image.')],
'confirm_close_muc': [opt_bool, True, _('Ask before closing a group chat tab/window.')],
'confirm_close_muc_rooms': [opt_str, '', _('Always ask for confirmation before closing group chats with any of the XMPP Addresses on this list (space separated).')],
'noconfirm_close_muc_rooms': [opt_str, '', _('Never ask for confirmation before closing group chats with any of the XMPP Addresses on this list (space separated).')],
'confirm_close_multiple_tabs': [opt_bool, True, _('Ask before closing tabbed chat window if there are chats that can lose data (chat, private chat, group chat that will not be minimized).')],
'notify_on_file_complete': [opt_bool, True],
'file_transfers_port': [opt_int, 28011],
......
......@@ -2215,11 +2215,8 @@ class GroupchatControl(ChatControlBase):
def safe_shutdown(self):
if self.minimizable():
return True
includes = app.config.get('confirm_close_muc_rooms').split(' ')
excludes = app.config.get('noconfirm_close_muc_rooms').split(' ')
# whether to ask for confirmation before closing muc
if (app.config.get('confirm_close_muc') or self.room_jid in includes)\
and self.is_connected and self.room_jid not in excludes:
if app.config.get('confirm_close_muc') and self.is_connected:
return False
return True
......@@ -2233,13 +2230,9 @@ class GroupchatControl(ChatControlBase):
self.list_treeview.get_selection().unselect_all()
on_no(self)
return
includes = app.config.get('confirm_close_muc_rooms').split(' ')
excludes = app.config.get('noconfirm_close_muc_rooms').split(' ')
# whether to ask for confirmation before closing muc
if (app.config.get('confirm_close_muc') or self.room_jid in includes)\
and self.is_connected and self.room_jid \
not in excludes:
# whether to ask for confirmation before closing muc
if app.config.get('confirm_close_muc') and self.is_connected:
def on_ok(is_checked):
if is_checked:
# User does not want to be asked again
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment