1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Removed window parameter from window_item_remove() and

window_item_destroy()


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1079 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-06 21:58:28 +00:00 committed by cras
parent 28465db59c
commit dd68c2fa5f
5 changed files with 16 additions and 10 deletions

View File

@ -58,7 +58,7 @@ static void signal_channel_destroyed(CHANNEL_REC *channel)
window = window_item_window((WI_ITEM_REC *) channel);
if (window != NULL) {
window_item_destroy(window, (WI_ITEM_REC *) channel);
window_item_destroy((WI_ITEM_REC *) channel);
if (window->items == NULL && windows->next != NULL &&
(!channel->joined || channel->left) &&

View File

@ -80,7 +80,7 @@ static void signal_query_destroyed(QUERY_REC *query)
window = window_item_window((WI_ITEM_REC *) query);
if (window != NULL) {
window_item_destroy(window, (WI_ITEM_REC *) query);
window_item_destroy((WI_ITEM_REC *) query);
if (window->items == NULL && windows->next != NULL &&
!query->unwanted && settings_get_bool("autoclose_windows"))

View File

@ -114,7 +114,7 @@ void window_destroy(WINDOW_REC *window)
}
while (window->items != NULL)
window_item_destroy(window, window->items->data);
window_item_destroy(window->items->data);
if (settings_get_bool("windows_auto_renumber"))
windows_pack(window->refnum);

View File

@ -58,11 +58,14 @@ void window_item_add(WINDOW_REC *window, WI_ITEM_REC *item, int automatic)
}
}
void window_item_remove(WINDOW_REC *window, WI_ITEM_REC *item)
void window_item_remove(WI_ITEM_REC *item)
{
g_return_if_fail(window != NULL);
WINDOW_REC *window;
g_return_if_fail(item != NULL);
window = window_item_window(item);
if (g_slist_find(window->items, item) == NULL)
return;
@ -77,9 +80,12 @@ void window_item_remove(WINDOW_REC *window, WI_ITEM_REC *item)
signal_emit("window item remove", 2, window, item);
}
void window_item_destroy(WINDOW_REC *window, WI_ITEM_REC *item)
void window_item_destroy(WI_ITEM_REC *item)
{
window_item_remove(window, item);
WINDOW_REC *window;
window = window_item_window(item);
window_item_remove(item);
signal_emit("window item destroy", 2, window, item);
}
@ -103,7 +109,7 @@ void window_item_set_active(WINDOW_REC *window, WI_ITEM_REC *item)
if (item != NULL && window_item_window(item) != window) {
/* move item to different window */
window_item_remove(window_item_window(item), item);
window_item_remove(item);
window_item_add(window, item, FALSE);
}

View File

@ -5,8 +5,8 @@
/* Add/remove/destroy window item from `window' */
void window_item_add(WINDOW_REC *window, WI_ITEM_REC *item, int automatic);
void window_item_remove(WINDOW_REC *window, WI_ITEM_REC *item);
void window_item_destroy(WINDOW_REC *window, WI_ITEM_REC *item);
void window_item_remove(WI_ITEM_REC *item);
void window_item_destroy(WI_ITEM_REC *item);
/* Find a window for `item' and call window_item_add(). */
void window_item_create(WI_ITEM_REC *item, int automatic);