1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

Multiple /LAYOUT SAVEd queries in same window didn't get restored to the

same window.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1550 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-06-11 00:15:38 +00:00 committed by cras
parent 4da53bb5f4
commit 0192a6fb97

View File

@ -35,6 +35,15 @@
#include "fe-windows.h"
#include "window-items.h"
static WINDOW_REC *restore_win;
static void signal_query_created_curwin(QUERY_REC *query)
{
g_return_if_fail(IS_QUERY(query));
window_item_add(restore_win, (WI_ITEM_REC *) query, FALSE);
}
static void sig_window_restore_item(WINDOW_REC *window, const char *type,
CONFIG_NODE *node)
{
@ -53,7 +62,14 @@ static void sig_window_restore_item(WINDOW_REC *window, const char *type,
rec->sticky = TRUE;
} else if (g_strcasecmp(type, "QUERY") == 0 && chat_type != NULL) {
/* create query immediately */
signal_add("query created",
(SIGNAL_FUNC) signal_query_created_curwin);
restore_win = window;
chat_protocol_find(chat_type)->query_create(tag, name, TRUE);
signal_remove("query created",
(SIGNAL_FUNC) signal_query_created_curwin);
}
}