Add option to color MUC history like regular messages
`/logging group color` has: * `unanimous` which will color it with one unanimous color. Like it was done always. * `regular` which colors it like regular incoming messages. Regards https://github.com/profanity-im/profanity/issues/1261
This commit is contained in:
@@ -238,6 +238,8 @@ static Autocomplete invite_ac;
|
||||
static Autocomplete status_ac;
|
||||
static Autocomplete status_state_ac;
|
||||
static Autocomplete logging_ac;
|
||||
static Autocomplete logging_group_ac;
|
||||
static Autocomplete logging_group_color_ac;
|
||||
static Autocomplete color_ac;
|
||||
static Autocomplete correction_ac;
|
||||
|
||||
@@ -944,6 +946,15 @@ cmd_ac_init(void)
|
||||
autocomplete_add(logging_ac, "chat");
|
||||
autocomplete_add(logging_ac, "group");
|
||||
|
||||
logging_group_ac = autocomplete_new();
|
||||
autocomplete_add(logging_group_ac, "on");
|
||||
autocomplete_add(logging_group_ac, "off");
|
||||
autocomplete_add(logging_group_ac, "color");
|
||||
|
||||
logging_group_color_ac = autocomplete_new();
|
||||
autocomplete_add(logging_group_color_ac, "unanimous");
|
||||
autocomplete_add(logging_group_color_ac, "regular");
|
||||
|
||||
color_ac = autocomplete_new();
|
||||
autocomplete_add(color_ac, "on");
|
||||
autocomplete_add(color_ac, "off");
|
||||
@@ -1261,6 +1272,8 @@ cmd_ac_reset(ProfWin *window)
|
||||
autocomplete_reset(status_ac);
|
||||
autocomplete_reset(status_state_ac);
|
||||
autocomplete_reset(logging_ac);
|
||||
autocomplete_reset(logging_group_ac);
|
||||
autocomplete_reset(logging_group_color_ac);
|
||||
autocomplete_reset(color_ac);
|
||||
autocomplete_reset(correction_ac);
|
||||
|
||||
@@ -1412,6 +1425,8 @@ cmd_ac_uninit(void)
|
||||
autocomplete_free(status_ac);
|
||||
autocomplete_free(status_state_ac);
|
||||
autocomplete_free(logging_ac);
|
||||
autocomplete_free(logging_group_ac);
|
||||
autocomplete_free(logging_group_color_ac);
|
||||
autocomplete_free(color_ac);
|
||||
autocomplete_free(correction_ac);
|
||||
}
|
||||
@@ -3727,7 +3742,12 @@ _logging_autocomplete(ProfWin *window, const char *const input, gboolean previou
|
||||
return result;
|
||||
}
|
||||
|
||||
result = autocomplete_param_with_func(input, "/logging group", prefs_autocomplete_boolean_choice, previous, NULL);
|
||||
result = autocomplete_param_with_ac(input, "/logging group", logging_group_ac, TRUE, previous);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
result = autocomplete_param_with_ac(input, "/logging group color", logging_group_color_ac, TRUE, previous);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user