diff options
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 7 | ||||
-rw-r--r-- | src/command/commands.c | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/command/command.c b/src/command/command.c index 9052e8cf..8bda6d4b 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -278,8 +278,8 @@ static struct cmd_t command_defs[] = CMD_SYN( "/roster", "/roster online", - "/roster show [offline|resource|presence|status|empty|count|priority|rooms]", - "/roster hide [offline|resource|presence|status|empty|count|priority|rooms]", + "/roster show [offline|resource|presence|status|empty|count|priority|contacts|rooms]", + "/roster hide [offline|resource|presence|status|empty|count|priority|contacts|rooms]", "/roster by group|presence|none", "/roster order name|presence", "/roster unread before|after|off", @@ -313,6 +313,7 @@ static struct cmd_t command_defs[] = { "show empty", "When grouping by presence, show empty presence groups." }, { "show count", "Show number of contacts in group/presence." }, { "show priority", "Show resource priority." }, + { "show contacts", "Show contacts in roster panel." }, { "show rooms", "Show chat rooms in roster panel." }, { "hide", "Hide the roster panel." }, { "hide offline", "Hide offline contacts in the roster panel." }, @@ -322,6 +323,7 @@ static struct cmd_t command_defs[] = { "hide empty", "When grouping by presence, hide empty presence groups." }, { "hide count", "Hide number of contacts in group/presence." }, { "hide priority", "Hide resource priority." }, + { "hide contacts", "Hide contacts in roster panel." }, { "hide rooms", "Hide chat rooms in roster panel." }, { "by group", "Group contacts in the roster panel by roster group." }, { "by presence", "Group contacts in the roster panel by presence." }, @@ -2215,6 +2217,7 @@ cmd_init(void) autocomplete_add(roster_show_ac, "empty"); autocomplete_add(roster_show_ac, "count"); autocomplete_add(roster_show_ac, "priority"); + autocomplete_add(roster_show_ac, "contacts"); autocomplete_add(roster_show_ac, "rooms"); roster_by_ac = autocomplete_new(); diff --git a/src/command/commands.c b/src/command/commands.c index 2c42835e..ba84b4bc 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2181,6 +2181,13 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args) rosterwin_roster(); } return TRUE; + } else if (g_strcmp0(args[1], "contacts") == 0) { + cons_show("Roster contacts enabled"); + prefs_set_boolean(PREF_ROSTER_CONTACTS, TRUE); + if (conn_status == JABBER_CONNECTED) { + rosterwin_roster(); + } + return TRUE; } else if (g_strcmp0(args[1], "rooms") == 0) { cons_show("Roster rooms enabled"); prefs_set_boolean(PREF_ROSTER_ROOMS, TRUE); @@ -2249,6 +2256,13 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args) rosterwin_roster(); } return TRUE; + } else if (g_strcmp0(args[1], "contacts") == 0) { + cons_show("Roster contacts disabled"); + prefs_set_boolean(PREF_ROSTER_CONTACTS, FALSE); + if (conn_status == JABBER_CONNECTED) { + rosterwin_roster(); + } + return TRUE; } else if (g_strcmp0(args[1], "rooms") == 0) { cons_show("Roster rooms disabled"); prefs_set_boolean(PREF_ROSTER_ROOMS, FALSE); |