Add /titlebar show presence command

Additionally to `/presence titlebar on` we now allow the setting via
/titlebar show|hide presence` since it's about the titlebar.

Regards https://github.com/profanity-im/profanity/issues/1116
This commit is contained in:
Michael Vetter
2019-11-05 21:06:07 +01:00
parent 68843f2448
commit 40dc5932f7
3 changed files with 13 additions and 0 deletions

View File

@@ -5960,6 +5960,9 @@ cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args)
} else if (g_strcmp0(args[1], "resource") == 0) {
cons_show("Showing resource in titlebar enabled.");
prefs_set_boolean(PREF_RESOURCE_TITLE , TRUE);
} else if (g_strcmp0(args[1], "presence") == 0) {
cons_show("Showing contact presence in titlebar enabled.");
prefs_set_boolean(PREF_PRESENCE , TRUE);
} else {
cons_bad_cmd_usage(command);
}
@@ -5974,6 +5977,9 @@ cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args)
} else if (g_strcmp0(args[1], "resource") == 0) {
cons_show("Showing resource in titlebar disabled.");
prefs_set_boolean(PREF_RESOURCE_TITLE , FALSE);
} else if (g_strcmp0(args[1], "presence") == 0) {
cons_show("Showing contact presence in titlebar enabled.");
prefs_set_boolean(PREF_PRESENCE , FALSE);
} else {
cons_bad_cmd_usage(command);
}