im.pidgin.pidgin: a3da14876c865437f0916509629a649308081104

datallah at pidgin.im datallah at pidgin.im
Mon Nov 26 00:35:50 EST 2007


-----------------------------------------------------------------
Revision: a3da14876c865437f0916509629a649308081104
Ancestor: 3951f7df209afb2e8cf75ec6092de91ab080ae8e
Author: datallah at pidgin.im
Date: 2007-11-26T05:30:36
Branch: im.pidgin.pidgin

Modified files:
        pidgin/gtkscrollbook.c

ChangeLog: 

I'm pretty sure this is what was intended.

-------------- next part --------------
============================================================
--- pidgin/gtkscrollbook.c	5a53af6d62a64b4ca8b24af84decf0161fb1dbcc
+++ pidgin/gtkscrollbook.c	db63fdbc4349d775cf0b5a9e9c1bc4479aa5e03b
@@ -146,15 +146,13 @@ pidgin_scroll_book_add(GtkContainer *con
 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 @@ pidgin_scroll_book_remove(GtkContainer *
 		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);


More information about the Commits mailing list