Add occupants wrap option
Wrapping for the occupants panel like already exists for the roster panel. See `/occupants wrap on`. Regards https://github.com/boothj5/profanity/issues/690
This commit is contained in:
@@ -687,6 +687,7 @@ cmd_ac_init(void)
|
||||
autocomplete_add(occupants_ac, "size");
|
||||
autocomplete_add(occupants_ac, "indent");
|
||||
autocomplete_add(occupants_ac, "header");
|
||||
autocomplete_add(occupants_ac, "wrap");
|
||||
|
||||
occupants_default_ac = autocomplete_new();
|
||||
autocomplete_add(occupants_default_ac, "show");
|
||||
@@ -2592,6 +2593,11 @@ _occupants_autocomplete(ProfWin *window, const char *const input, gboolean previ
|
||||
return found;
|
||||
}
|
||||
|
||||
found = autocomplete_param_with_func(input, "/occupants wrap", prefs_autocomplete_boolean_choice, previous);
|
||||
if (found) {
|
||||
return found;
|
||||
}
|
||||
|
||||
found = autocomplete_param_with_ac(input, "/occupants", occupants_ac, TRUE, previous);
|
||||
if (found) {
|
||||
return found;
|
||||
|
||||
@@ -4391,6 +4391,17 @@ cmd_occupants(ProfWin *window, const char *const command, gchar **args)
|
||||
}
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "wrap") == 0) {
|
||||
if (!args[1]) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
} else {
|
||||
_cmd_set_boolean_preference(args[1], command, "Occupants panel line wrap", PREF_OCCUPANTS_WRAP);
|
||||
occupantswin_occupants_all();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "default") == 0) {
|
||||
if (g_strcmp0(args[1], "show") == 0) {
|
||||
if (g_strcmp0(args[2], "jid") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user