From 8936da1f6dd69a2358d7ac88a500f74827dcc4f5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 17 Apr 2002 21:04:25 +0000 Subject: [PATCH] /QUERY existing_nick now switches to the window where it exists, instead of complaining about /window item move (same fix as to /join recently). git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2696 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/fe-queries.c | 18 ++++-------------- src/fe-common/core/module-formats.c | 1 - src/fe-common/core/module-formats.h | 1 - 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index 1ea056e9..6625bfc6 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -247,22 +247,12 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item) query = CHAT_PROTOCOL(server)-> query_create(server->tag, nick, FALSE); else { - /* query already exists */ + /* query already exists, set it active */ WINDOW_REC *window = window_item_window(query); - if (window == active_win) { - /* query is in active window, set it active */ - window_item_set_active(active_win, - (WI_ITEM_REC *) query); - } else { - /* notify user how to move the query to active - window. this was used to be done automatically - but it just confused everyone who did it - accidentally */ - printformat_window(active_win, MSGLEVEL_CLIENTNOTICE, - TXT_QUERY_MOVE_NOTIFY, query->name, - window->refnum); - } + if (window != active_win) + window_set_active(window); + window_item_set_active(active_win, (WI_ITEM_REC *) query); } if (g_hash_table_lookup(optlist, "window") != NULL) { diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index 7c866144..da84d5df 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -148,7 +148,6 @@ FORMAT_REC fecommon_core_formats[] = { { "query_stop", "Closing query with {nick $0}", 1, { 0 } }, { "no_query", "No query with {nick $0}", 1, { 0 } }, { "query_server_changed", "Query with {nick $0} changed to server {server $1}", 2, { 0, 0 } }, - { "query_move_notify", "Query with {nick $0} is already created to window $1, use \"/WINDOW ITEM MOVE $0\" to move it to this window", 2, { 0, 1 } }, /* ---- */ { NULL, "Highlighting", 0 }, diff --git a/src/fe-common/core/module-formats.h b/src/fe-common/core/module-formats.h index c442f6ba..166c5215 100644 --- a/src/fe-common/core/module-formats.h +++ b/src/fe-common/core/module-formats.h @@ -122,7 +122,6 @@ enum { TXT_QUERY_STOP, TXT_NO_QUERY, TXT_QUERY_SERVER_CHANGED, - TXT_QUERY_MOVE_NOTIFY, TXT_FILL_6,