forked from PsychoticNinja/irssi
"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
This commit is contained in:
parent
cfd50ce9cd
commit
e881761d86
@ -294,7 +294,7 @@ void fe_channels_init(void)
|
|||||||
|
|
||||||
signal_add("channel created", (SIGNAL_FUNC) signal_channel_created);
|
signal_add("channel created", (SIGNAL_FUNC) signal_channel_created);
|
||||||
signal_add("channel destroyed", (SIGNAL_FUNC) signal_channel_destroyed);
|
signal_add("channel destroyed", (SIGNAL_FUNC) signal_channel_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_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
|
signal_add_last("window item changed", (SIGNAL_FUNC) signal_window_item_changed);
|
||||||
signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
|
signal_add_last("server disconnected", (SIGNAL_FUNC) sig_disconnected);
|
||||||
|
|
||||||
|
@ -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)
|
static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
||||||
{
|
{
|
||||||
GHashTable *optlist;
|
GHashTable *optlist;
|
||||||
WINDOW_REC *window;
|
|
||||||
QUERY_REC *query;
|
QUERY_REC *query;
|
||||||
char *nick;
|
char *nick;
|
||||||
void *free_arg;
|
void *free_arg;
|
||||||
@ -200,12 +199,9 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
|
|||||||
if (query == NULL)
|
if (query == NULL)
|
||||||
query_create(server->chat_type, server, nick, FALSE);
|
query_create(server->chat_type, server, nick, FALSE);
|
||||||
else {
|
else {
|
||||||
/* query already existed - change to query window */
|
/* query already existed - set query active / move it to this
|
||||||
window = window_item_window((WI_ITEM_REC *) query);
|
window */
|
||||||
g_return_if_fail(window != NULL);
|
window_item_set_active(active_win, (WI_ITEM_REC *) query);
|
||||||
|
|
||||||
window_set_active(window);
|
|
||||||
window_item_set_active(window, (WI_ITEM_REC *) query);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_hash_table_lookup(optlist, "window") != NULL) {
|
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 created", (SIGNAL_FUNC) signal_query_created);
|
||||||
signal_add("query destroyed", (SIGNAL_FUNC) signal_query_destroyed);
|
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("server connected", (SIGNAL_FUNC) sig_server_connected);
|
||||||
signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
|
signal_add("window changed", (SIGNAL_FUNC) sig_window_changed);
|
||||||
signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
|
signal_add_first("message private", (SIGNAL_FUNC) sig_message_private);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user