Roster private chat preferences
This commit is contained in:
@@ -283,10 +283,12 @@ static struct cmd_t command_defs[] =
|
||||
"/roster by group|presence|none",
|
||||
"/roster order name|presence",
|
||||
"/roster unread before|after|off",
|
||||
"/roster room char <char>|none",
|
||||
"/roster room position first|last",
|
||||
"/roster room order name|unread",
|
||||
"/roster room unread before|after|off",
|
||||
"/roster private room|group|off",
|
||||
"/roster private char <char>|none",
|
||||
"/roster header char <char>|none",
|
||||
"/roster presence indent <indent>",
|
||||
"/roster contact char <char>|none",
|
||||
@@ -334,6 +336,8 @@ static struct cmd_t command_defs[] =
|
||||
{ "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 char <char>", "Prefix roster rooms with specified character." },
|
||||
{ "room char none", "Remove roster room character prefix." },
|
||||
{ "room position first", "Show rooms first in roster." },
|
||||
{ "room position last", "Show rooms last in roster." },
|
||||
{ "room order name", "Order roster rooms by name." },
|
||||
@@ -341,9 +345,11 @@ static struct cmd_t command_defs[] =
|
||||
{ "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 roster." },
|
||||
{ "room private room", "Show room private chats below the room in the roster." },
|
||||
{ "room private group", "Show room private chats as a separate roster group." },
|
||||
{ "room private off", "Do not show room private chats in the roster." },
|
||||
{ "private room", "Show room private chats below the room in the roster." },
|
||||
{ "private group", "Show room private chats as a separate roster group." },
|
||||
{ "private off", "Do not show room private chats in the roster." },
|
||||
{ "private char <char>", "Prefix roster private room chats with specified character." },
|
||||
{ "private char none", "Remove roster private room chat character prefix." },
|
||||
{ "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." },
|
||||
@@ -2209,6 +2215,7 @@ cmd_init(void)
|
||||
autocomplete_add(roster_private_ac, "room");
|
||||
autocomplete_add(roster_private_ac, "group");
|
||||
autocomplete_add(roster_private_ac, "off");
|
||||
autocomplete_add(roster_private_ac, "char");
|
||||
|
||||
roster_header_ac = autocomplete_new();
|
||||
autocomplete_add(roster_header_ac, "char");
|
||||
@@ -2254,6 +2261,7 @@ cmd_init(void)
|
||||
autocomplete_add(roster_unread_ac, "off");
|
||||
|
||||
roster_room_ac = autocomplete_new();
|
||||
autocomplete_add(roster_room_ac, "char");
|
||||
autocomplete_add(roster_room_ac, "position");
|
||||
autocomplete_add(roster_room_ac, "order");
|
||||
autocomplete_add(roster_room_ac, "unread");
|
||||
@@ -3156,6 +3164,14 @@ _roster_autocomplete(ProfWin *window, const char *const input)
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = autocomplete_param_with_ac(input, "/roster room char", roster_char_ac, TRUE);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = autocomplete_param_with_ac(input, "/roster private char", roster_char_ac, TRUE);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = autocomplete_param_with_ac(input, "/roster resource char", roster_char_ac, TRUE);
|
||||
if (result) {
|
||||
return result;
|
||||
|
||||
@@ -2409,7 +2409,20 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
|
||||
}
|
||||
|
||||
} else if (g_strcmp0(args[0], "private") == 0) {
|
||||
if (g_strcmp0(args[1], "room") == 0) {
|
||||
if (g_strcmp0(args[1], "char") == 0) {
|
||||
if (!args[2]) {
|
||||
cons_bad_cmd_usage(command);
|
||||
} else if (g_strcmp0(args[2], "none") == 0) {
|
||||
prefs_clear_roster_private_char();
|
||||
cons_show("Roster private room chat char removed.");
|
||||
rosterwin_roster();
|
||||
} else {
|
||||
prefs_set_roster_private_char(args[2][0]);
|
||||
cons_show("Roster private room chat char set to %c.", args[2][0]);
|
||||
rosterwin_roster();
|
||||
}
|
||||
return TRUE;
|
||||
} else if (g_strcmp0(args[1], "room") == 0) {
|
||||
cons_show("Showing room private chats under room.");
|
||||
prefs_set_string(PREF_ROSTER_PRIVATE, "room");
|
||||
if (conn_status == JABBER_CONNECTED) {
|
||||
@@ -2436,7 +2449,20 @@ cmd_roster(ProfWin *window, const char *const command, gchar **args)
|
||||
}
|
||||
|
||||
} else if (g_strcmp0(args[0], "room") == 0) {
|
||||
if (g_strcmp0(args[1], "position") == 0) {
|
||||
if (g_strcmp0(args[1], "char") == 0) {
|
||||
if (!args[2]) {
|
||||
cons_bad_cmd_usage(command);
|
||||
} else if (g_strcmp0(args[2], "none") == 0) {
|
||||
prefs_clear_roster_room_char();
|
||||
cons_show("Roster room char removed.");
|
||||
rosterwin_roster();
|
||||
} else {
|
||||
prefs_set_roster_room_char(args[2][0]);
|
||||
cons_show("Roster room char set to %c.", args[2][0]);
|
||||
rosterwin_roster();
|
||||
}
|
||||
return TRUE;
|
||||
} else if (g_strcmp0(args[1], "position") == 0) {
|
||||
if (g_strcmp0(args[2], "first") == 0) {
|
||||
cons_show("Showing rooms first in roster.");
|
||||
prefs_set_string(PREF_ROSTER_ROOMS_POS, "first");
|
||||
|
||||
Reference in New Issue
Block a user