changeset 27b33dd6fe25 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=27b33dd6fe25 description: add option to enable / disable the remember opened chats option. Fixes #7193
diffstat:
src/common/config.py | 1 + src/message_window.py | 2 ++ src/roster_window.py | 19 +++++++++++-------- 3 files changed, 14 insertions(+), 8 deletions(-)
diffs (52 lines):
diff -r 7ed0b34c4945 -r 27b33dd6fe25 src/common/config.py --- a/src/common/config.py Sat Aug 04 17:14:34 2012 +0200 +++ b/src/common/config.py Sun Aug 05 13:34:35 2012 +0200 @@ -311,6 +311,7 @@ 'show_affiliation_in_groupchat': [opt_bool, True, _('If True, Gajim will show affiliation of groupchat occupants by adding a colored square to the status icon')], 'global_proxy': [opt_str, '', _('Proxy used for all outgoing connections if the account does not have a specific proxy configured')], 'ignore_incoming_attention': [opt_bool, False, _('If True, Gajim will ignore incoming attention requestd ("wizz").')], + 'remember_opened_chat_controls': [ opt_bool, True, _('If enabled, Gajim will reopen chat windows that were opened last time Gajim was closed.')], }, {})
__options_per_key = { diff -r 7ed0b34c4945 -r 27b33dd6fe25 src/message_window.py --- a/src/message_window.py Sat Aug 04 17:14:34 2012 +0200 +++ b/src/message_window.py Sun Aug 05 13:34:35 2012 +0200 @@ -1246,6 +1246,8 @@ mw.new_tab(ctrl)
def save_opened_controls(self): + if not gajim.config.get('remember_opened_chat_controls'): + return chat_controls = {} for acct in gajim.connections: chat_controls[acct] = [] diff -r 7ed0b34c4945 -r 27b33dd6fe25 src/roster_window.py --- a/src/roster_window.py Sat Aug 04 17:14:34 2012 +0200 +++ b/src/roster_window.py Sun Aug 05 13:34:35 2012 +0200 @@ -2609,14 +2609,17 @@ self.add_account_contacts(obj.conn.name) self.fire_up_unread_messages_events(obj.conn.name) else: - account = obj.conn.name - controls = gajim.config.get_per('accounts', account, - 'opened_chat_controls') - if controls: - for jid in controls.split(','): - contact = gajim.contacts.get_contact_with_highest_priority( - account, jid) - gajim.interface.on_open_chat_window(None, contact, account) + if gajim.config.get('remember_opened_chat_controls'): + account = obj.conn.name + controls = gajim.config.get_per('accounts', account, + 'opened_chat_controls') + if controls: + for jid in controls.split(','): + contact = \ + gajim.contacts.get_contact_with_highest_priority( + account, jid) + gajim.interface.on_open_chat_window(None, contact, + account) gobject.idle_add(self.refilter_shown_roster_items)
def _nec_anonymous_auth(self, obj):