Added option to show resource priority in roster

This commit is contained in:
James Booth
2015-11-18 02:14:11 +00:00
parent 4505102fa8
commit 8e84d160e6
6 changed files with 32 additions and 2 deletions

View File

@@ -1227,6 +1227,11 @@ cons_roster_setting(void)
else
cons_show("Roster count (/roster) : hide");
if (prefs_get_boolean(PREF_ROSTER_PRIORITY))
cons_show("Roster priority (/roster) : show");
else
cons_show("Roster priority (/roster) : hide");
char *by = prefs_get_string(PREF_ROSTER_BY);
cons_show("Roster by (/roster) : %s", by);
prefs_free_string(by);

View File

@@ -89,6 +89,9 @@ _rosterwin_resource(ProfLayoutSplit *layout, PContact contact)
wattron(layout->subwin, theme_attrs(resource_presence_colour));
GString *msg = g_string_new(" ");
g_string_append(msg, resource->name);
if (prefs_get_boolean(PREF_ROSTER_PRIORITY)) {
g_string_append_printf(msg, " [%d]", resource->priority);
}
win_printline_nowrap(layout->subwin, msg->str);
g_string_free(msg, TRUE);
wattroff(layout->subwin, theme_attrs(resource_presence_colour));