From ab5166033cf5dd55934c38ed3f6c93a2c3ef872c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 3 Mar 2001 21:57:31 +0000 Subject: [PATCH] I knew removing those checks from "channel created" and "query created" signals broke something :) -window option to /JOIN and /QUERY. This time don't check for any item with same server/name, but check that the item itself doesn't have window set yet. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1326 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-channels.c | 6 ++++-- src/fe-common/core/fe-queries.c | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/fe-common/core/fe-channels.c b/src/fe-common/core/fe-channels.c index 791ad144..4bbbcbda 100644 --- a/src/fe-common/core/fe-channels.c +++ b/src/fe-common/core/fe-channels.c @@ -39,8 +39,10 @@ static void signal_channel_created(CHANNEL_REC *channel, void *automatic) { - window_item_create((WI_ITEM_REC *) channel, - GPOINTER_TO_INT(automatic)); + if (window_item_window(channel) == NULL) { + window_item_create((WI_ITEM_REC *) channel, + GPOINTER_TO_INT(automatic)); + } } static void signal_channel_created_curwin(CHANNEL_REC *channel) diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index e7b0eb7e..23606962 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -58,9 +58,12 @@ static void signal_query_created(QUERY_REC *query, gpointer automatic) { g_return_if_fail(IS_QUERY(query)); - window_item_create((WI_ITEM_REC *) query, GPOINTER_TO_INT(automatic)); - printformat(query->server, query->name, MSGLEVEL_CLIENTNOTICE, - TXT_QUERY_STARTED, query->name); + if (window_item_window(query) == NULL) { + window_item_create((WI_ITEM_REC *) query, + GPOINTER_TO_INT(automatic)); + printformat(query->server, query->name, MSGLEVEL_CLIENTNOTICE, + TXT_QUERY_STARTED, query->name); + } } static void signal_query_created_curwin(QUERY_REC *query)