1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-08 04:26:01 -04:00

Saner fix for bug #35.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4642 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2007-11-17 21:50:31 +00:00 committed by exg
parent 5c91508b78
commit c1b446e5ed

View File

@ -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)