diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-04 04:35:11 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-04 04:35:11 +0000 |
commit | dfa60cf38f39006475359ede7b4c1c866c3c3b7e (patch) | |
tree | a99d559fd9d758a6397285212cac6b4060718074 | |
parent | cf8323634699c3dc9db670f2570179951152b6b3 (diff) | |
download | irssi-dfa60cf38f39006475359ede7b4c1c866c3c3b7e.zip |
Use the server tag printing with queries now too.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2389 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-common/core/fe-queries.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index 39191e5a..44d7ef01 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -57,6 +57,8 @@ QUERY_REC *privmsg_get_query(SERVER_REC *server, const char *nick, static void signal_query_created(QUERY_REC *query, gpointer automatic) { + TEXT_DEST_REC dest; + g_return_if_fail(IS_QUERY(query)); if (window_item_window(query) == NULL) { @@ -64,8 +66,10 @@ static void signal_query_created(QUERY_REC *query, gpointer automatic) GPOINTER_TO_INT(automatic)); } - printformat(query->server, query->name, MSGLEVEL_CLIENTNOTICE, - TXT_QUERY_START, query->name, query->server_tag); + format_create_dest_tag(&dest, query->server, query->server_tag, + query->name, MSGLEVEL_CLIENTNOTICE, NULL); + printformat_dest(&dest, TXT_QUERY_START, + query->name, query->server_tag); } static void signal_query_created_curwin(QUERY_REC *query) @@ -78,19 +82,22 @@ static void signal_query_created_curwin(QUERY_REC *query) static void signal_query_destroyed(QUERY_REC *query) { WINDOW_REC *window; + TEXT_DEST_REC dest; g_return_if_fail(IS_QUERY(query)); window = window_item_window((WI_ITEM_REC *) query); - if (window != NULL) { - printformat(query->server, query->name, MSGLEVEL_CLIENTNOTICE, - TXT_QUERY_STOP, query->name); + if (window == NULL) + return; - window_item_destroy((WI_ITEM_REC *) query); + format_create_dest_tag(&dest, query->server, query->server_tag, + query->name, MSGLEVEL_CLIENTNOTICE, NULL); + printformat_dest(&dest, TXT_QUERY_STOP, query->name); - if (!query->unwanted) - window_auto_destroy(window); - } + window_item_destroy((WI_ITEM_REC *) query); + + if (!query->unwanted) + window_auto_destroy(window); } static void signal_query_server_changed(QUERY_REC *query) @@ -106,10 +113,14 @@ static void signal_query_server_changed(QUERY_REC *query) static void signal_query_nick_changed(QUERY_REC *query, const char *oldnick) { + TEXT_DEST_REC dest; + g_return_if_fail(query != NULL); - printformat(query->server, query->name, MSGLEVEL_NICKS, - TXT_NICK_CHANGED, oldnick, query->name, query->name); + format_create_dest_tag(&dest, query->server, query->server_tag, + query->name, MSGLEVEL_CLIENTNOTICE, NULL); + printformat_dest(&dest, TXT_NICK_CHANGED, oldnick, + query->name, query->name); signal_emit("window item changed", 2, window_item_window((WI_ITEM_REC *) query), query); @@ -149,6 +160,7 @@ static void cmd_window_server(const char *data) { SERVER_REC *server; QUERY_REC *query; + TEXT_DEST_REC dest; g_return_if_fail(data != NULL); @@ -158,10 +170,12 @@ static void cmd_window_server(const char *data) return; /* /WINDOW SERVER used in a query window */ + format_create_dest_tag(&dest, query->server, query->server_tag, + query->name, MSGLEVEL_CLIENTNOTICE, NULL); + printformat_dest(&dest, TXT_QUERY_SERVER_CHANGED, + query->name, server->tag); + query_change_server(query, server); - printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - TXT_QUERY_SERVER_CHANGED, - query->name, server->tag); signal_stop(); } |