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:
Michael Vetter
2020-05-21 16:04:26 +02:00
parent e41ae21bea
commit cb78ee4665
7 changed files with 55 additions and 13 deletions

View File

@@ -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;
}