Changed window->waiting_channels ("servertag name" format) to

bound_items containing WINDOW_BIND_REC structures. If you now use
/SAVEWINDOWS, the item will _always_ be restored to saved window even
if there was already some other item.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1204 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-02-10 09:12:53 +00:00 committed by cras
commit ddf6810b0e
5 changed files with 98 additions and 52 deletions

View file

@ -38,20 +38,19 @@
static void sig_window_restore_item(WINDOW_REC *window, const char *type,
CONFIG_NODE *node)
{
char *name, *tag, *chat_type, *str;
char *name, *tag, *chat_type;
chat_type = config_node_get_str(node, "chat_type", NULL);
name = config_node_get_str(node, "name", NULL);
tag = config_node_get_str(node, "tag", NULL);
if (name == NULL) return;
if (name == NULL || tag == NULL)
return;
if (g_strcasecmp(type, "CHANNEL") == 0) {
/* add channel to "waiting channels" list */
str = tag == NULL ? g_strdup(name) :
g_strdup_printf("%s %s", tag, name);
window->waiting_channels =
g_slist_append(window->waiting_channels, str);
/* bind channel to window */
WINDOW_BIND_REC *rec = window_bind_add(window, tag, name);
rec->sticky = TRUE;
} else if (g_strcasecmp(type, "QUERY") == 0 && chat_type != NULL) {
/* create query immediately */
query_create(chat_protocol_lookup(chat_type),