diff options
author | mathieui <mathieui@mathieui.net> | 2012-08-01 01:06:57 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-08-01 01:06:57 +0200 |
commit | 71f813af289ff4df6e4721f56c907d78aa609e69 (patch) | |
tree | 77034550713e6da64516c3bf691ef0626e9abbea /src/windows.py | |
parent | 1625a4f41fa6727e41b0546687d72a3101b2b2bf (diff) | |
download | poezio-71f813af289ff4df6e4721f56c907d78aa609e69.tar.gz poezio-71f813af289ff4df6e4721f56c907d78aa609e69.tar.bz2 poezio-71f813af289ff4df6e4721f56c907d78aa609e69.tar.xz poezio-71f813af289ff4df6e4721f56c907d78aa609e69.zip |
Add a roster_group_sort option, which works like roster_sort
- defaults to "name" (sort by group name)
- document it
- also, micro-optimize get_nb_connected_contacts()
Diffstat (limited to 'src/windows.py')
-rw-r--r-- | src/windows.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py index da80c989..4da0cff6 100644 --- a/src/windows.py +++ b/src/windows.py @@ -1610,7 +1610,8 @@ class RosterWin(Win): 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()[:]: + group_sort = config.get('roster_group_sort', 'name') or 'name' + for group in roster.get_groups(group_sort): contacts_filtered = group.get_contacts(roster.contact_filter) if (not show_offline and group.get_nb_connected_contacts() == 0) or not contacts_filtered: continue # Ignore empty groups |