# HG changeset patch # User Daniel Atallah # Date 1196055036 0 # Node ID fa5d1f42633227677a3196c75d28af9ea86871ed # Parent dc9d0141a35f33837828224612638443be15d62f I'm pretty sure this is what was intended. diff -r dc9d0141a35f -r fa5d1f426332 pidgin/gtkscrollbook.c --- a/pidgin/gtkscrollbook.c Mon Nov 26 01:25:29 2007 +0000 +++ b/pidgin/gtkscrollbook.c Mon Nov 26 05:30:36 2007 +0000 @@ -146,15 +146,13 @@ static void pidgin_scroll_book_add(GtkContainer *container, GtkWidget *widget) { - GList *children; PidginScrollBook *scroll_book; g_return_if_fail(GTK_IS_WIDGET (widget)); g_return_if_fail (widget->parent == NULL); scroll_book = PIDGIN_SCROLL_BOOK(container); - children = scroll_book->children; - children = g_list_append(children, widget); + scroll_book->children = g_list_append(scroll_book->children, widget); gtk_widget_show(widget); gtk_notebook_append_page(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), widget, NULL); page_count_change_cb(PIDGIN_SCROLL_BOOK(container)); @@ -176,10 +174,10 @@ child = children->data; if (child == widget) { gtk_widget_unparent (widget); - children = g_list_remove_link (scroll_book->children, children); - g_list_free(children); + scroll_book->children = g_list_delete_link(scroll_book->children, children); break; } + children = children->next; } page = gtk_notebook_page_num(GTK_NOTEBOOK(PIDGIN_SCROLL_BOOK(container)->notebook), widget);