summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-07-31 23:40:53 +0200
committermathieui <mathieui@mathieui.net>2012-07-31 23:40:53 +0200
commit1625a4f41fa6727e41b0546687d72a3101b2b2bf (patch)
tree60ae3c82f949daff19c6bbcfaf6528dac7ba3d67 /src/windows.py
parent4096e7f42792fbd9290e937f09bd3ec387a3e557 (diff)
downloadpoezio-1625a4f41fa6727e41b0546687d72a3101b2b2bf.tar.gz
poezio-1625a4f41fa6727e41b0546687d72a3101b2b2bf.tar.bz2
poezio-1625a4f41fa6727e41b0546687d72a3101b2b2bf.tar.xz
poezio-1625a4f41fa6727e41b0546687d72a3101b2b2bf.zip
Add a roster_sort option to sort the contacts inside the roster groups
- defaults to jid_show (which means that they are sorted into sub-groups by show and are sorted by JID inside those) - See the default config file or the documentation for details
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py
index a46edb1e..da80c989 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -1609,6 +1609,7 @@ class RosterWin(Win):
self.draw_roster_information(roster)
y = 1
show_offline = config.get('roster_show_offline', 'false') == 'true'
+ sort = config.get('roster_sort', 'jid_show') or 'jid_show'
for group in roster.get_groups()[:]:
contacts_filtered = group.get_contacts(roster.contact_filter)
if (not show_offline and group.get_nb_connected_contacts() == 0) or not contacts_filtered:
@@ -1621,7 +1622,7 @@ class RosterWin(Win):
y += 1
if group.folded:
continue
- for contact in group.get_contacts(roster.contact_filter)[:]:
+ for contact in group.get_contacts(roster.contact_filter, sort):
if not show_offline and len(contact) == 0:
continue
if y-1 == self.pos: