mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 20:00:23 +02:00
window_item_create(): when there's multiple choices where the window
item could be placed, the first window is now selected instead of the last accessed one of them (which most people think of as a random window). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1040 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
acf60a729c
commit
219c83ae6a
4 changed files with 26 additions and 19 deletions
|
|
@ -238,7 +238,7 @@ static int waiting_channels_get(WINDOW_REC *window, const char *tag)
|
|||
void window_item_create(WI_ITEM_REC *item, int automatic)
|
||||
{
|
||||
WINDOW_REC *window;
|
||||
GSList *tmp;
|
||||
GSList *tmp, *sorted;
|
||||
char *str;
|
||||
int clear_waiting, reuse_unused_windows;
|
||||
|
||||
|
|
@ -253,7 +253,8 @@ void window_item_create(WI_ITEM_REC *item, int automatic)
|
|||
|
||||
clear_waiting = TRUE;
|
||||
window = NULL;
|
||||
for (tmp = windows; tmp != NULL; tmp = tmp->next) {
|
||||
sorted = windows_get_sorted();
|
||||
for (tmp = sorted; tmp != NULL; tmp = tmp->next) {
|
||||
WINDOW_REC *rec = tmp->data;
|
||||
|
||||
if (reuse_unused_windows &&
|
||||
|
|
@ -274,6 +275,7 @@ void window_item_create(WI_ITEM_REC *item, int automatic)
|
|||
}
|
||||
}
|
||||
}
|
||||
g_slist_free(sorted);
|
||||
g_free_not_null(str);
|
||||
|
||||
if (window == NULL && !settings_get_bool("autocreate_windows")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue