Add option to display MUC name or JID in titlebar
Add `/titlebar use [name|jid]`.
This commit is contained in:
@@ -5942,6 +5942,31 @@ cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_titlebar_use(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
if (args[1] == NULL) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "use") == 0) {
|
||||
if (g_strcmp0(args[1], "jid") == 0) {
|
||||
cons_show("Using MUC JID in titlebar as title.");
|
||||
prefs_set_string(PREF_TITLEBAR_MUC_TITLE, "jid");
|
||||
} else if (g_strcmp0(args[1], "name") == 0) {
|
||||
cons_show("Using MUC name in titlebar as title.");
|
||||
prefs_set_string(PREF_TITLEBAR_MUC_TITLE, "name");
|
||||
} else {
|
||||
cons_bad_cmd_usage(command);
|
||||
}
|
||||
} else {
|
||||
cons_bad_cmd_usage(command);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
cmd_mainwin(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user