Pass ordering to roster list functions

This commit is contained in:
James Booth
2015-11-18 00:06:00 +00:00
parent 8e8852fa9f
commit 2260e3bd6f
7 changed files with 54 additions and 92 deletions

View File

@@ -1320,13 +1320,13 @@ _who_roster(ProfWin *window, const char *const command, gchar **args)
cons_show("");
GSList *list = NULL;
if (group) {
list = roster_get_group(group);
list = roster_get_group(group, ROSTER_ORD_NAME);
if (list == NULL) {
cons_show("No such group: %s.", group);
return;
}
} else {
list = roster_get_contacts();
list = roster_get_contacts(ROSTER_ORD_NAME);
if (list == NULL) {
cons_show("No contacts in roster.");
return;
@@ -1628,7 +1628,7 @@ cmd_group(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
GSList *list = roster_get_group(group);
GSList *list = roster_get_group(group, ROSTER_ORD_NAME);
cons_show_roster_group(group, list);
return TRUE;
}
@@ -1711,7 +1711,7 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
GSList *list = roster_get_contacts();
GSList *list = roster_get_contacts(ROSTER_ORD_NAME);
cons_show_roster(list);
g_slist_free(list);
return TRUE;
@@ -1931,7 +1931,7 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
GSList *all = roster_get_contacts();
GSList *all = roster_get_contacts(ROSTER_ORD_NAME);
GSList *curr = all;
while (curr) {
PContact contact = curr->data;