From 6233d6d9bfafd1b630ae97e18ae3f75ea26ee266 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 1 Jun 2000 17:08:30 +0000 Subject: Leaving from some channel didn't update status bar. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@261 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/window-items.c | 4 ++-- src/fe-common/irc/fe-channels.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fe-common/core/window-items.c b/src/fe-common/core/window-items.c index b8633461..ba02fd2d 100644 --- a/src/fe-common/core/window-items.c +++ b/src/fe-common/core/window-items.c @@ -71,8 +71,8 @@ void window_remove_item(WINDOW_REC *window, WI_ITEM_REC *item) window->items = g_slist_remove(window->items, item); if (window->active == item) { - window->active = window->items == NULL ? NULL : - window->items->data; + window_item_set_active(window, window->items == NULL ? NULL : + window->items->data); } signal_emit("window item remove", 2, window, item); diff --git a/src/fe-common/irc/fe-channels.c b/src/fe-common/irc/fe-channels.c index 6403412a..272f954c 100644 --- a/src/fe-common/irc/fe-channels.c +++ b/src/fe-common/irc/fe-channels.c @@ -87,7 +87,8 @@ static void sig_disconnected(IRC_SERVER_REC *server) static void signal_window_item_changed(WINDOW_REC *window, WI_ITEM_REC *item) { - g_return_if_fail(item != NULL); + g_return_if_fail(window != NULL); + if (item == NULL) return; if (g_slist_length(window->items) > 1 && irc_item_channel(item)) { printformat(item->server, item->name, MSGLEVEL_CLIENTNOTICE, -- cgit v1.2.3