add an ACE option to disable the fact that gajim auto-expand and selects the contact who sent last message. fixes #2911

This commit is contained in:
Yann Leboulanger 2007-03-17 08:14:25 +00:00
parent efaa1a18e7
commit f7799dfbec
2 changed files with 4 additions and 2 deletions

View File

@ -224,6 +224,7 @@ class Config:
'use_gnomekeyring': [opt_bool, True, _('If True, Gajim will use Gnome Keyring (if available) to store account passwords.')],
'show_contacts_number': [opt_bool, True, _('If True, Gajim will show number of online and total contacts in account and group rows.')],
'treat_incoming_messages': [ opt_str, '', _('Can be empty, \'chat\' or \'normal\'. If not empty, treat all incoming messages as if they were of this type')],
'scroll_roster_to_last_message': [opt_bool, True, _('If True, Gajim will scroll and select the contact who sent you the last message, if chat window is not already opened.')],
}
__options_per_key = {

View File

@ -150,7 +150,7 @@ class RosterWindow:
self.add_contact_to_roster(jid, account)
iters = self.get_contact_iter(jid, account)
path = self.tree.get_model().get_path(iters[0])
if self.dragging:
if self.dragging or not gajim.config.get('scroll_roster_to_last_message'):
# do not change selection while DND'ing
return
# popup == False so we show awaiting event in roster
@ -3181,7 +3181,8 @@ class RosterWindow:
if popup:
if not ctrl:
self.new_chat(contact, account, resource = resource_for_chat)
if path and not self.dragging:
if path and not self.dragging and gajim.config.get(
'scroll_roster_to_last_message'):
# we curently see contact in our roster OR he
# is not in the roster at all.
# show and select his line in roster