forked from PsychoticNinja/irssi
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:
parent
5c91508b78
commit
c1b446e5ed
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "chat-protocols.h"
|
#include "chat-protocols.h"
|
||||||
#include "servers.h"
|
#include "servers.h"
|
||||||
|
#include "channels.h"
|
||||||
#include "queries.h"
|
#include "queries.h"
|
||||||
|
|
||||||
#include "module-formats.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, "chat_type", proto->name);
|
||||||
iconfig_node_set_str(subnode, "name", item->visible_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);
|
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);
|
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)
|
if (window->theme_name != NULL)
|
||||||
iconfig_node_set_str(node, "theme", window->theme_name);
|
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)
|
if (window->items != NULL)
|
||||||
window_save_items(window, node);
|
window_save_items(window, node);
|
||||||
|
|
||||||
@ -231,7 +236,6 @@ void windows_layout_save(void)
|
|||||||
|
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE,
|
||||||
TXT_WINDOWS_LAYOUT_SAVED);
|
TXT_WINDOWS_LAYOUT_SAVED);
|
||||||
sig_layout_restore();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void windows_layout_reset(void)
|
void windows_layout_reset(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user