diff options
author | Timo Sirainen <cras@irssi.org> | 2000-12-02 07:55:55 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-12-02 07:55:55 +0000 |
commit | e881761d8658dfc4b815f145d4c7bb6e18e94f0a (patch) | |
tree | 0a222aa9afa0e26eb3a5adc78d1169ab853def7b /src/fe-common/core/fe-queries.c | |
parent | cfd50ce9cdbeab86ac5d25499f081326481584fc (diff) | |
download | irssi-e881761d8658dfc4b815f145d4c7bb6e18e94f0a.zip |
"window item remove" signal: destroy the channel/query record _last_
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@919 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-queries.c')
-rw-r--r-- | src/fe-common/core/fe-queries.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index 81caf2c6..83d0f087 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -163,7 +163,6 @@ static void cmd_unquery(const char *data, SERVER_REC *server, WI_ITEM_REC *item) static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { GHashTable *optlist; - WINDOW_REC *window; QUERY_REC *query; char *nick; void *free_arg; @@ -200,12 +199,9 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item) if (query == NULL) query_create(server->chat_type, server, nick, FALSE); else { - /* query already existed - change to query window */ - window = window_item_window((WI_ITEM_REC *) query); - g_return_if_fail(window != NULL); - - window_set_active(window); - window_item_set_active(window, (WI_ITEM_REC *) query); + /* query already existed - set query active / move it to this + window */ + window_item_set_active(active_win, (WI_ITEM_REC *) query); } if (g_hash_table_lookup(optlist, "window") != NULL) { @@ -293,7 +289,7 @@ void fe_queries_init(void) signal_add("query created", (SIGNAL_FUNC) signal_query_created); signal_add("query destroyed", (SIGNAL_FUNC) signal_query_destroyed); - signal_add("window item remove", (SIGNAL_FUNC) signal_window_item_removed); + signal_add_last("window item remove", (SIGNAL_FUNC) signal_window_item_removed); signal_add("server connected", (SIGNAL_FUNC) sig_server_connected); signal_add("window changed", (SIGNAL_FUNC) sig_window_changed); signal_add_first("message private", (SIGNAL_FUNC) sig_message_private); |