Wire up /SET DOUBLE_STATUS_LINES so it actually does something
The DOUBLE_STATUS_LINES /SET has existed for a long while, but setting it has never actually had an effect. This change causes it to affect the /window double setting of new windows: 0 means new windows are created without double status lines, 1 means only the first window is created with double status lines and subsequent windows aren't (this is the default) and 2 means that all windows are created with double status lines. Note that setting this variable in your .ircrc can't actually affect the first window, because that's created before the .ircrc is loaded. The compiled-in default value (DEFAULT_DOUBLE_STATUS_LINES in config.h) is the only thing that can affect the first window. Reported by presi.
This commit is contained in:
@@ -215,7 +215,7 @@ static IrcVariable irc_variable[] =
|
||||
{ "DISPLAY",0, BOOL_TYPE_VAR, DEFAULT_DISPLAY, NULL, NULL, 0, 0 },
|
||||
{ "DISPLAY_ANSI",0, BOOL_TYPE_VAR, DEFAULT_DISPLAY_ANSI, NULL, toggle_reverse_status, 0, 0 },
|
||||
{ "DISPLAY_PC_CHARACTERS",0, INT_TYPE_VAR, DEFAULT_DISPLAY_PC_CHARACTERS, NULL, reinit_screen, 0, VIF_BITCHX },
|
||||
{ "DOUBLE_STATUS_LINE",0, INT_TYPE_VAR, DEFAULT_DOUBLE_STATUS_LINE, NULL, reinit_status, 0, VIF_BITCHX },
|
||||
{ "DOUBLE_STATUS_LINE",0, INT_TYPE_VAR, DEFAULT_DOUBLE_STATUS_LINE, NULL, NULL, 0, VIF_BITCHX },
|
||||
{ "EIGHT_BIT_CHARACTERS",0, BOOL_TYPE_VAR, DEFAULT_EIGHT_BIT_CHARACTERS, NULL, eight_bit_characters, 0, VIF_BITCHX },
|
||||
{ "EXEC_PROTECTION",0, BOOL_TYPE_VAR, DEFAULT_EXEC_PROTECTION, NULL, exec_warning, 0, VF_NODAEMON },
|
||||
{ "FAKE_SPLIT_PATTERNS",0, STR_TYPE_VAR, 0, NULL, NULL, 0, 0 },
|
||||
|
||||
@@ -147,14 +147,20 @@ Window *BX_new_window(Screen *screen)
|
||||
new->status_split = 1;
|
||||
new->scratch_line = -1;
|
||||
|
||||
#ifdef DEFAULT_DOUBLE_STATUS
|
||||
new->double_status = DEFAULT_DOUBLE_STATUS;
|
||||
#else
|
||||
if (new->refnum == 1)
|
||||
new->double_status = 1;
|
||||
else
|
||||
switch (get_int_var(DOUBLE_STATUS_LINE_VAR))
|
||||
{
|
||||
case 0:
|
||||
new->double_status = 0;
|
||||
#endif
|
||||
break;
|
||||
case 1:
|
||||
if (new->refnum == 1)
|
||||
new->double_status = 1;
|
||||
else
|
||||
new->double_status = 0;
|
||||
break;
|
||||
default:
|
||||
new->double_status = 1;
|
||||
}
|
||||
|
||||
#ifdef DEFAULT_STATUS_LINES
|
||||
new->status_lines = DEFAULT_STATUS_LINES;
|
||||
|
||||
Reference in New Issue
Block a user