Improve titlebar flexibility

Before this change, only nickname or JID (if no nickname set) is shown in the titlebar.
Change allows to alter nickname/JID preference
using already implemented /titlebar show jid|name setting.
If both are set to "show", then it is displayed in "nickname <JID>" format.
This commit is contained in:
John Hernandez
2023-04-04 00:06:04 +02:00
parent 54cf152130
commit 0740d692dc
2 changed files with 19 additions and 11 deletions

View File

@@ -1260,8 +1260,8 @@ static const struct cmd_t command_defs[] = {
{ "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 name", "In case of a MUC. Show the MUC name in the titlebar." },
{ "show jid", "In case of a MUC. Show the JID in the titlebar." })
{ "show name", "Show the nickname or MUC name in the titlebar." },
{ "show jid", "Show the JID in the titlebar." })
CMD_EXAMPLES(
"/titlebar up",
"/titlebar show tls",