Add option to display MUC name or JID in titlebar

Add `/titlebar use [name|jid]`.
This commit is contained in:
Michael Vetter
2020-01-23 19:42:22 +01:00
parent 0401412c64
commit 56b7482b08
9 changed files with 77 additions and 9 deletions

View File

@@ -1293,7 +1293,8 @@ static struct cmd_t command_defs[] =
parse_args, 1, 2, &cons_titlebar_setting,
CMD_SUBFUNCS(
{ "show", cmd_titlebar_show_hide },
{ "hide", cmd_titlebar_show_hide }
{ "hide", cmd_titlebar_show_hide },
{ "use", cmd_titlebar_use }
)
CMD_MAINFUNC(cmd_titlebar)
CMD_TAGS(
@@ -1301,7 +1302,9 @@ static struct cmd_t command_defs[] =
CMD_SYN(
"/titlebar up",
"/titlebar down",
"/titlebar show|hide [encwarn|resource|tls]")
"/titlebar show|hide [encwarn|resource|tls]",
"/titlebar use [name|jid]"
)
CMD_DESC(
"Titlebar settings.")
CMD_ARGS(
@@ -1309,12 +1312,15 @@ static struct cmd_t command_defs[] =
{ "down", "Move the title bar down the screen." },
{ "show tls", "Show or hide TLS indicator in the titlebar." },
{ "show encwarn", "Enable or disable the unencrypted warning message in the titlebar." },
{ "show resource", "Show or hide the current resource in the titlebar." }
{ "show resource", "Show or hide the current resource in the titlebar." },
{ "use name", "In case of a MUC. Use the MUC name as title." },
{ "use jid", "In case of a MUC. Use the JID as title." }
)
CMD_EXAMPLES(
"/titlebar up",
"/titlebar show tls",
"/titlebar hide encwarn")
"/titlebar hide encwarn",
"/titlebar use name")
},
{ "/mainwin",