diff options
author | Timo Sirainen <cras@irssi.org> | 2001-06-11 00:15:38 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-06-11 00:15:38 +0000 |
commit | 0192a6fb97dbabb7a16e4013834712100ab25c2b (patch) | |
tree | 0947b78b96b22a6e865726318a488eb6b7c625bc /src/fe-common | |
parent | 4da53bb5f4945238b01c2f1390f03c3899779781 (diff) | |
download | irssi-0192a6fb97dbabb7a16e4013834712100ab25c2b.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/windows-layout.c | 16 |
1 files changed, 16 insertions, 0 deletions
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); } } |