mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 20:46:21 +00:00
Added /wins unread
This commit is contained in:
@@ -799,6 +799,8 @@ static struct cmd_t command_defs[] =
|
||||
CMD_TAGS(
|
||||
CMD_TAG_UI)
|
||||
CMD_SYN(
|
||||
"/wins",
|
||||
"/wins unread",
|
||||
"/wins tidy",
|
||||
"/wins autotidy on|off",
|
||||
"/wins prune",
|
||||
@@ -807,6 +809,7 @@ static struct cmd_t command_defs[] =
|
||||
"Manage windows. "
|
||||
"Passing no argument will list all currently active windows and information about their usage.")
|
||||
CMD_ARGS(
|
||||
{ "unread", "List windows with unread messages." },
|
||||
{ "tidy", "Move windows so there are no gaps." },
|
||||
{ "autotidy on|off", "Automatically remove gaps when closing windows." },
|
||||
{ "prune", "Close all windows with no unread messages, and then tidy so there are no gaps." },
|
||||
@@ -2079,6 +2082,7 @@ cmd_init(void)
|
||||
autocomplete_add(close_ac, "all");
|
||||
|
||||
wins_ac = autocomplete_new();
|
||||
autocomplete_add(wins_ac, "unread");
|
||||
autocomplete_add(wins_ac, "prune");
|
||||
autocomplete_add(wins_ac, "tidy");
|
||||
autocomplete_add(wins_ac, "autotidy");
|
||||
|
||||
@@ -1013,7 +1013,9 @@ gboolean
|
||||
cmd_wins(ProfWin *window, const char *const command, gchar **args)
|
||||
{
|
||||
if (args[0] == NULL) {
|
||||
cons_show_wins();
|
||||
cons_show_wins(FALSE);
|
||||
} else if (strcmp(args[0], "unread") == 0) {
|
||||
cons_show_wins(TRUE);
|
||||
} else if (strcmp(args[0], "tidy") == 0) {
|
||||
if (wins_tidy()) {
|
||||
cons_show("Windows tidied.");
|
||||
|
||||
Reference in New Issue
Block a user