Have separate settings for intype

Old: `/intype on|of`
Typing information is printed in console and titlebar.

New: `/intype titlebar|console on|off`
Typing information can be configured in more detail.

Regards https://github.com/profanity-im/profanity/issues/1516
This commit is contained in:
Michael Vetter
2021-05-08 19:33:58 +02:00
parent 1ef700f918
commit 1d8061e89b
7 changed files with 62 additions and 14 deletions

View File

@@ -6719,7 +6719,14 @@ cmd_tray(ProfWin* window, const char* const command, gchar** args)
gboolean
cmd_intype(ProfWin* window, const char* const command, gchar** args)
{
_cmd_set_boolean_preference(args[0], command, "Show contact typing", PREF_INTYPE);
if (g_strcmp0(args[0], "console") == 0) {
_cmd_set_boolean_preference(args[1], command, "Show contact typing in console", PREF_INTYPE_CONSOLE);
} else if (g_strcmp0(args[0], "titlebar") == 0) {
_cmd_set_boolean_preference(args[1], command, "Show contact typing in titlebar", PREF_INTYPE);
} else {
cons_bad_cmd_usage(command);
}
return TRUE;
}