summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-03-03 21:57:31 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-03-03 21:57:31 +0000
commitab5166033cf5dd55934c38ed3f6c93a2c3ef872c (patch)
tree12c2c03eb62350691132b7b43f892db9c1f53ac8 /src
parentf71afe835a36d53644fff6ad4673059f1282cee5 (diff)
downloadirssi-ab5166033cf5dd55934c38ed3f6c93a2c3ef872c.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/fe-channels.c6
-rw-r--r--src/fe-common/core/fe-queries.c9
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)