mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Set window binds for channel items as sticky when re-creating window
binds as part of /layout save. This addresses the problem of previously saved channel window items forgetting their windows upon reconnection, which resulted in them being opened in new windows. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5194 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e959bd36d4
commit
c488c3e58b
@ -152,6 +152,7 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
|
||||
CONFIG_NODE *subnode;
|
||||
CHAT_PROTOCOL_REC *proto;
|
||||
const char *type;
|
||||
WINDOW_BIND_REC *rec;
|
||||
|
||||
type = module_find_id_str("WINDOW ITEM TYPE", item->type);
|
||||
if (type == NULL)
|
||||
@ -168,8 +169,11 @@ static void sig_layout_save_item(WINDOW_REC *window, WI_ITEM_REC *item,
|
||||
|
||||
if (item->server != NULL) {
|
||||
iconfig_node_set_str(subnode, "tag", item->server->tag);
|
||||
if (IS_CHANNEL(item))
|
||||
window_bind_add(window, item->server->tag, item->visible_name);
|
||||
if (IS_CHANNEL(item)) {
|
||||
rec = window_bind_add(window, item->server->tag, item->visible_name);
|
||||
if (rec != NULL)
|
||||
rec->sticky = TRUE;
|
||||
}
|
||||
} else if (IS_QUERY(item)) {
|
||||
iconfig_node_set_str(subnode, "tag", QUERY(item)->server_tag);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user