mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 06:26:21 +00:00
Separate new tabmode in a setting
Return static tabmode as default, separate previous change in `dynamic` mode. Despite usefulness of the solution, it was not approved to be a new default. Vote (link below) amongst users to change default has shown inconclusive result and it was not representative, as it had low number of participants. https://github.com/profanity-im/profanity/pull/1912#issuecomment-1816232546
This commit is contained in:
@@ -1068,6 +1068,7 @@ cmd_ac_init(void)
|
||||
|
||||
statusbar_tabmode_ac = autocomplete_new();
|
||||
autocomplete_add(statusbar_tabmode_ac, "actlist");
|
||||
autocomplete_add(statusbar_tabmode_ac, "dynamic");
|
||||
autocomplete_add(statusbar_tabmode_ac, "default");
|
||||
|
||||
status_ac = autocomplete_new();
|
||||
|
||||
@@ -1289,7 +1289,7 @@ static const struct cmd_t command_defs[] = {
|
||||
"/statusbar hide name|number|read",
|
||||
"/statusbar maxtabs <value>",
|
||||
"/statusbar tablen <value>",
|
||||
"/statusbar tabmode default|actlist",
|
||||
"/statusbar tabmode default|dynamic|actlist",
|
||||
"/statusbar self user|barejid|fulljid|off",
|
||||
"/statusbar chat user|jid",
|
||||
"/statusbar room title bookmark|jid|localpart|name",
|
||||
@@ -1300,7 +1300,7 @@ static const struct cmd_t command_defs[] = {
|
||||
CMD_ARGS(
|
||||
{ "maxtabs <value>", "Set the maximum number of tabs to display, <value> must be between 0 and 10." },
|
||||
{ "tablen <value>", "Set the maximum number of characters to show as the tab name, 0 sets to unlimited." },
|
||||
{ "tabmode default|actlist", "Set the mode how the 'active tabs' are shown." },
|
||||
{ "tabmode default|dynamic|actlist", "Set the mode tabs are shown. `dynamic` is a mode that displays tabs conveniently around current tab, thus providing proper pagination. `actlist` setting shows only active tabs. `default` setting always shows tabs in 1 to max_tabs range." },
|
||||
{ "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." },
|
||||
|
||||
@@ -6273,14 +6273,11 @@ cmd_statusbar(ProfWin* window, const char* const command, gchar** args)
|
||||
}
|
||||
|
||||
if (g_strcmp0(args[0], "tabmode") == 0) {
|
||||
char* tabmode = NULL;
|
||||
if ((g_strcmp0(args[1], "default") == 0) || (g_strcmp0(args[1], "actlist") == 0)) {
|
||||
tabmode = args[1];
|
||||
}
|
||||
if (tabmode == NULL) {
|
||||
if ((g_strcmp0(args[1], "default") != 0) && (g_strcmp0(args[1], "actlist") != 0) && (g_strcmp0(args[1], "dynamic") != 0)) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
char* tabmode = args[1];
|
||||
prefs_set_string(PREF_STATUSBAR_TABMODE, tabmode);
|
||||
cons_show("Using \"%s\" tabmode for statusbar.", tabmode);
|
||||
ui_resize();
|
||||
|
||||
Reference in New Issue
Block a user