From c1b446e5eda6fbb898ce8eb5f47ff7907288435b Mon Sep 17 00:00:00 2001 From: Emanuele Giaquinta Date: Sat, 17 Nov 2007 21:50:31 +0000 Subject: [PATCH] Saner fix for bug #35. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4642 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/windows-layout.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c index 33527e73..9285f3bd 100644 --- a/src/fe-common/core/windows-layout.c +++ b/src/fe-common/core/windows-layout.c @@ -27,6 +27,7 @@ #include "chat-protocols.h" #include "servers.h" +#include "channels.h" #include "queries.h" #include "module-formats.h" @@ -165,9 +166,11 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item, iconfig_node_set_str(subnode, "chat_type", proto->name); iconfig_node_set_str(subnode, "name", item->visible_name); - if (item->server != NULL) + if (item->server != NULL) { iconfig_node_set_str(subnode, "tag", item->server->tag); - else if (IS_QUERY(item)) { + if (IS_CHANNEL(item)) + window_bind_add(window, item->server->tag, item->visible_name); + } else if (IS_QUERY(item)) { iconfig_node_set_str(subnode, "tag", QUERY(item)->server_tag); } } @@ -210,6 +213,8 @@ static void window_save(WINDOW_REC *window, CONFIG_NODE *node) if (window->theme_name != NULL) iconfig_node_set_str(node, "theme", window->theme_name); + while (window->bound_items != NULL) + window_bind_destroy(window, window->bound_items->data); if (window->items != NULL) window_save_items(window, node); @@ -231,7 +236,6 @@ void windows_layout_save(void) printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, TXT_WINDOWS_LAYOUT_SAVED); - sig_layout_restore(); } void windows_layout_reset(void)