From 0192a6fb97dbabb7a16e4013834712100ab25c2b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 11 Jun 2001 00:15:38 +0000 Subject: 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 --- src/fe-common/core/windows-layout.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/fe-common') diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 814127fb..447ed44b 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -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); } } -- cgit v1.2.3