about summary refs log tree commit diff stats
path: root/src/command/cmd_funcs.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2021-05-08 19:33:58 +0200
committerMichael Vetter <jubalh@iodoru.org>2021-05-08 19:38:40 +0200
commit1d8061e89b23f896035fdd62e777dd9343b35bb5 (patch)
tree0cf9969d157e282d0a2cc14048806e18a49bb248 /src/command/cmd_funcs.c
parent1ef700f918f706da2098460ead880b2538aaf262 (diff)
downloadprofani-tty-1d8061e89b23f896035fdd62e777dd9343b35bb5.tar.gz
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
Diffstat (limited to 'src/command/cmd_funcs.c')
-rw-r--r--src/command/cmd_funcs.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index 351f7b98..ab212975 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -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;
 }