diff options
author | Tim Janik <timj@src.gnome.org> | 1998-02-28 20:19:20 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-02-28 20:19:20 +0000 |
commit | c4c1c1ea5563a4158308a41174aee07d3c8efcc8 (patch) | |
tree | 39bd1200e0733556bb4e4721872fe05dda14c8a1 /gtk/gtklist.c | |
parent | 6d3ef70d1eacd0d7d6b167d4b869ed71b92a88b6 (diff) | |
download | gtk+-c4c1c1ea5563a4158308a41174aee07d3c8efcc8.tar.gz |
more fixups -timj
more fixups
-timj
Diffstat (limited to 'gtk/gtklist.c')
-rw-r--r-- | gtk/gtklist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtklist.c b/gtk/gtklist.c index 81c7ffdc30..948c7df563 100644 --- a/gtk/gtklist.c +++ b/gtk/gtklist.c @@ -411,13 +411,14 @@ gtk_list_clear_items (GtkList *list, if ((end < 0) || (end > nchildren)) end = nchildren; - g_return_if_fail (start < end); + if (start >= end) + return; start_list = g_list_nth (list->children, start); end_list = g_list_nth (list->children, end); if (start_list->prev) - start_list->prev->next = end_list; + start_list->prev->next = end_list; if (end_list && end_list->prev) end_list->prev->next = NULL; if (end_list) @@ -441,17 +442,16 @@ gtk_list_clear_items (GtkList *list, gtk_widget_unref (widget); } - /* list->children = g_list_remove (list->children, widget); */ - /* gtk_widget_unparent (widget); */ - gtk_widget_unparent (widget); } + g_list_free (start_list); + if (list->children && !list->selection && (list->selection_mode == GTK_SELECTION_BROWSE)) { - gtk_list_select_child (list, widget); widget = list->children->data; + gtk_list_select_child (list, widget); } if (selection_changed) |