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:
parent
efaa1a18e7
commit
f7799dfbec
|
@ -224,6 +224,7 @@ class Config:
|
||||||
'use_gnomekeyring': [opt_bool, True, _('If True, Gajim will use Gnome Keyring (if available) to store account passwords.')],
|
'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.')],
|
'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')],
|
'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 = {
|
__options_per_key = {
|
||||||
|
|
|
@ -150,7 +150,7 @@ class RosterWindow:
|
||||||
self.add_contact_to_roster(jid, account)
|
self.add_contact_to_roster(jid, account)
|
||||||
iters = self.get_contact_iter(jid, account)
|
iters = self.get_contact_iter(jid, account)
|
||||||
path = self.tree.get_model().get_path(iters[0])
|
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
|
# do not change selection while DND'ing
|
||||||
return
|
return
|
||||||
# popup == False so we show awaiting event in roster
|
# popup == False so we show awaiting event in roster
|
||||||
|
@ -3181,7 +3181,8 @@ class RosterWindow:
|
||||||
if popup:
|
if popup:
|
||||||
if not ctrl:
|
if not ctrl:
|
||||||
self.new_chat(contact, account, resource = resource_for_chat)
|
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
|
# we curently see contact in our roster OR he
|
||||||
# is not in the roster at all.
|
# is not in the roster at all.
|
||||||
# show and select his line in roster
|
# show and select his line in roster
|
||||||
|
|
Loading…
Reference in New Issue