summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJase Thew <bazerka@irssi.org>2010-10-31 19:40:03 +0000
committerbazerka <bazerka@dbcabf3a-b0e7-0310-adc4-f8d773084564>2010-10-31 19:40:03 +0000
commitc488c3e58b0ead6071516dc7d396dfdd0c9481ce (patch)
tree515d1d8ac24ac9341201b6353b701d904e5f90bc /src
parente959bd36d4611adfb5ca6d68ae989832648416d9 (diff)
downloadirssi-c488c3e58b0ead6071516dc7d396dfdd0c9481ce.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/windows-layout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fe-common/core/windows-layout.c b/src/fe-common/core/windows-layout.c
index d6a462cf..e5fe6bf6 100644
--- a/src/fe-common/core/windows-layout.c
+++ b/src/fe-common/core/windows-layout.c
@@ -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);
}