Allow hiding of empty presence groups: /roster {show,hide} empty (default is show)

This commit is contained in:
Daniel
2015-07-08 13:11:56 +02:00
parent 5e324e407f
commit 806afcc014
7 changed files with 36 additions and 4 deletions

View File

@@ -1578,6 +1578,13 @@ cmd_roster(ProfWin *window, gchar **args, struct cmd_help_t help)
rosterwin_roster();
}
return TRUE;
} else if (g_strcmp0(args[1], "empty") == 0) {
cons_show("Roster empty enabled");
prefs_set_boolean(PREF_ROSTER_EMPTY, TRUE);
if (conn_status == JABBER_CONNECTED) {
rosterwin_roster();
}
return TRUE;
} else {
cons_show("Usage: %s", help.usage);
return TRUE;
@@ -1604,6 +1611,13 @@ cmd_roster(ProfWin *window, gchar **args, struct cmd_help_t help)
rosterwin_roster();
}
return TRUE;
} else if (g_strcmp0(args[1], "empty") == 0) {
cons_show("Roster empty disabled");
prefs_set_boolean(PREF_ROSTER_EMPTY, FALSE);
if (conn_status == JABBER_CONNECTED) {
rosterwin_roster();
}
return TRUE;
} else {
cons_show("Usage: %s", help.usage);
return TRUE;