mirror of
https://github.com/irssi/irssi.git
synced 2026-08-23 02:22:36 +02:00
Add an option to create windows at the end
I prefer to group my windows by topic, with occasional gaps between them to start the next group at a multiple of 10. This new option avoids irssi filling those gaps.
This commit is contained in:
parent
0e5a32fb62
commit
a8978726b6
1 changed files with 19 additions and 6 deletions
|
|
@ -49,6 +49,17 @@ static int window_get_new_refnum(void)
|
||||||
|
|
||||||
refnum = 1;
|
refnum = 1;
|
||||||
tmp = windows;
|
tmp = windows;
|
||||||
|
if(settings_get_bool("window_create_at_end")) {
|
||||||
|
while (tmp != NULL) {
|
||||||
|
win = tmp->data;
|
||||||
|
if(win->refnum > refnum)
|
||||||
|
refnum = win->refnum;
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
refnum++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
while (tmp != NULL) {
|
while (tmp != NULL) {
|
||||||
win = tmp->data;
|
win = tmp->data;
|
||||||
|
|
||||||
|
|
@ -60,6 +71,7 @@ static int window_get_new_refnum(void)
|
||||||
refnum++;
|
refnum++;
|
||||||
tmp = windows;
|
tmp = windows;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return refnum;
|
return refnum;
|
||||||
}
|
}
|
||||||
|
|
@ -712,6 +724,7 @@ void windows_init(void)
|
||||||
daycheck = 0; daytag = -1;
|
daycheck = 0; daytag = -1;
|
||||||
settings_add_bool("lookandfeel", "window_auto_change", FALSE);
|
settings_add_bool("lookandfeel", "window_auto_change", FALSE);
|
||||||
settings_add_bool("lookandfeel", "windows_auto_renumber", TRUE);
|
settings_add_bool("lookandfeel", "windows_auto_renumber", TRUE);
|
||||||
|
settings_add_bool("lookandfeel", "window_create_at_end", FALSE);
|
||||||
settings_add_bool("lookandfeel", "window_check_level_first", FALSE);
|
settings_add_bool("lookandfeel", "window_check_level_first", FALSE);
|
||||||
settings_add_level("lookandfeel", "window_default_level", "NONE");
|
settings_add_level("lookandfeel", "window_default_level", "NONE");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue