mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 20:06:22 +00:00
Make option to allow hiding windows with no messages in statusbar
`statusbar.show.read` can be set to false in the config. `/statusbar show|hide read`. Implement https://github.com/profanity-im/profanity/issues/1285
This commit is contained in:
@@ -955,6 +955,7 @@ cmd_ac_init(void)
|
||||
statusbar_show_ac = autocomplete_new();
|
||||
autocomplete_add(statusbar_show_ac, "name");
|
||||
autocomplete_add(statusbar_show_ac, "number");
|
||||
autocomplete_add(statusbar_show_ac, "read");
|
||||
|
||||
status_ac = autocomplete_new();
|
||||
autocomplete_add(status_ac, "set");
|
||||
|
||||
@@ -1343,8 +1343,8 @@ static struct cmd_t command_defs[] =
|
||||
CMD_TAGS(
|
||||
CMD_TAG_UI)
|
||||
CMD_SYN(
|
||||
"/statusbar show name|number",
|
||||
"/statusbar hide name|number",
|
||||
"/statusbar show name|number|read",
|
||||
"/statusbar hide name|number|read",
|
||||
"/statusbar maxtabs <value>",
|
||||
"/statusbar tablen <value>",
|
||||
"/statusbar self user|barejid|fulljid|off",
|
||||
@@ -1359,6 +1359,7 @@ static struct cmd_t command_defs[] =
|
||||
{ "tablen <value>", "Set the maximum number of characters to show as the tab name, 0 sets to unlimited." },
|
||||
{ "show|hide name", "Show or hide names in tabs." },
|
||||
{ "show|hide number", "Show or hide numbers in tabs." },
|
||||
{ "show|hide read", "Show or hide inactive tabs." },
|
||||
{ "self user|barejid|fulljid", "Show account user name, barejid, fulljid as status bar title." },
|
||||
{ "self off", "Disable showing self as status bar title." },
|
||||
{ "chat user|jid", "Show users name, or the fulljid if no nick is present for chat tabs." },
|
||||
@@ -1370,6 +1371,7 @@ static struct cmd_t command_defs[] =
|
||||
"/statusbar tablen 5",
|
||||
"/statusbar self user",
|
||||
"/statusbar chat jid",
|
||||
"/statusbar hide read",
|
||||
"/statusbar hide name")
|
||||
},
|
||||
|
||||
|
||||
@@ -6070,6 +6070,12 @@ cmd_statusbar(ProfWin *window, const char *const command, gchar **args)
|
||||
ui_resize();
|
||||
return TRUE;
|
||||
}
|
||||
if (g_strcmp0(args[1], "read") == 0) {
|
||||
prefs_set_boolean(PREF_STATUSBAR_SHOW_READ, TRUE);
|
||||
cons_show("Enabled showing inactive tabs.");
|
||||
ui_resize();
|
||||
return TRUE;
|
||||
}
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -6097,6 +6103,12 @@ cmd_statusbar(ProfWin *window, const char *const command, gchar **args)
|
||||
ui_resize();
|
||||
return TRUE;
|
||||
}
|
||||
if (g_strcmp0(args[1], "read") == 0) {
|
||||
prefs_set_boolean(PREF_STATUSBAR_SHOW_READ, FALSE);
|
||||
cons_show("Disabled showing inactive tabs.");
|
||||
ui_resize();
|
||||
return TRUE;
|
||||
}
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user