summaryrefslogtreecommitdiff
path: root/src/fe-text/statusbar-items.c
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-04-06 19:19:46 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-04-06 19:19:46 +0000
commitb2c8ba134b37d89cc8b5568954c861551cf39e68 (patch)
tree7668de9a9a5dd9cada00974d4262b20df28134ae /src/fe-text/statusbar-items.c
parent2e78cb54e096f17ac980a53767b92bb4ae844398 (diff)
downloadirssi-b2c8ba134b37d89cc8b5568954c861551cf39e68.zip
Slightly optimize update of activity list when a window is destroyed.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4801 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/statusbar-items.c')
-rw-r--r--src/fe-text/statusbar-items.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c
index 9df76b73..fd10c315 100644
--- a/src/fe-text/statusbar-items.c
+++ b/src/fe-text/statusbar-items.c
@@ -216,10 +216,13 @@ static void sig_statusbar_activity_hilight(WINDOW_REC *window, gpointer oldlevel
static void sig_statusbar_activity_window_destroyed(WINDOW_REC *window)
{
+ GList *node;
+
g_return_if_fail(window != NULL);
- if (g_list_find(activity_list, window) != NULL)
- activity_list = g_list_remove(activity_list, window);
+ node = g_list_find(activity_list, window);
+ if (node != NULL)
+ activity_list = g_list_delete_link(activity_list, node);
statusbar_items_redraw("act");
}