about summary refs log tree commit diff stats
path: root/src/command/command.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2016-01-17 02:17:12 +0000
committerJames Booth <boothj5@gmail.com>2016-01-17 02:17:12 +0000
commitcce01f1d75a43b943237a11f9695e8426425210a (patch)
tree1914184d93bfe801aa3dea3f16ea2db7a24b73be /src/command/command.c
parente58be44f8185a0fbb43a3ee902acf21c89b158b6 (diff)
downloadprofani-tty-cce01f1d75a43b943237a11f9695e8426425210a.tar.gz
Added /roster unread preferrence
closes #712
Diffstat (limited to 'src/command/command.c')
-rw-r--r--src/command/command.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/command/command.c b/src/command/command.c
index b6c00803..f3c4d3bb 100644
--- a/src/command/command.c
+++ b/src/command/command.c
@@ -282,6 +282,7 @@ static struct cmd_t command_defs[] =
             "/roster hide [offline|resource|presence|status|empty|count|priority|rooms]",
             "/roster by group|presence|none",
             "/roster order name|presence",
+            "/roster unread before|after|off",
             "/roster room order name|unread",
             "/roster room unread before|after|off",
             "/roster header char <char>|none",
@@ -326,11 +327,14 @@ static struct cmd_t command_defs[] =
             { "by none",                    "No grouping in the roster panel." },
             { "order name",                 "Order roster items by name only." },
             { "order presence",             "Order roster items by presence, and then by name." },
+            { "unread before",              "Show unread message count before contact in roster." },
+            { "unread after",               "Show unread message count after contact in roster." },
+            { "unread off",                 "Do not show unread message count for contacts in roster." },
             { "room order name",            "Order roster rooms by name." },
             { "room order unread",          "Order roster rooms by unread messages, and then by name." },
             { "room unread before",         "Show unread message count before room in roster." },
             { "room unread after",          "Show unread message count after room in roster." },
-            { "room unread off",            "Do not show unread message count for rooms in rosters." },
+            { "room unread off",            "Do not show unread message count for rooms in roster." },
             { "header char <char>",         "Prefix roster headers with specified character." },
             { "header char none",           "Remove roster header character prefix." },
             { "contact char <char>",        "Prefix roster contacts with specified character." },
@@ -2172,6 +2176,7 @@ cmd_init(void)
     autocomplete_add(roster_ac, "hide");
     autocomplete_add(roster_ac, "by");
     autocomplete_add(roster_ac, "order");
+    autocomplete_add(roster_ac, "unread");
     autocomplete_add(roster_ac, "room");
     autocomplete_add(roster_ac, "size");
     autocomplete_add(roster_ac, "wrap");
@@ -3169,6 +3174,10 @@ _roster_autocomplete(ProfWin *window, const char *const input)
     if (result) {
         return result;
     }
+    result = autocomplete_param_with_ac(input, "/roster unread", roster_unread_ac, TRUE);
+    if (result) {
+        return result;
+    }
     result = autocomplete_param_with_ac(input, "/roster room", roster_room_ac, TRUE);
     if (result) {
         return result;