Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2007-03-17 11:14:25 +0300
committerYann Leboulanger <asterix@lagaule.org>2007-03-17 11:14:25 +0300
commitf7799dfbecbfecef81a585b6040687a33e3f57f2 (patch)
tree1aa85871a12d9237a58976831c8063db25d7034a
parentefaa1a18e7bdec8d765240ddfcbce14a89b08365 (diff)
add an ACE option to disable the fact that gajim auto-expand and selects the contact who sent last message. fixes #2911
-rw-r--r--src/common/config.py1
-rw-r--r--src/roster_window.py5
2 files changed, 4 insertions, 2 deletions
diff --git a/src/common/config.py b/src/common/config.py
index c46c48c9e..b19288bec 100644
--- a/src/common/config.py
+++ b/src/common/config.py
@@ -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 = {
diff --git a/src/roster_window.py b/src/roster_window.py
index c26862289..2db627e68 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -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