diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog index 14b3960f9..af04f06a4 100644 --- a/capplets/background/ChangeLog +++ b/capplets/background/ChangeLog @@ -1,3 +1,13 @@ +2006-01-26 Rodney Dawes + + * gnome-wp-capplet.c (gnome_wp_capplet_scroll_to_item): If we are + passed in a NULL just return rather than using g_return_if_fail to + do it, so that we can avoid the glib CRITICAL warning (#327327) + (gnome_wp_load_stuffs): If the settings are mangled some how, and + a valid item was not duplicated, duplicated the "No Wallpaper" item + + Fixes #327327 + 2006-01-26 Rodney Dawes * gnome-background-properties.glade: Add an Apply button diff --git a/capplets/background/gnome-wp-capplet.c b/capplets/background/gnome-wp-capplet.c index 3f600368c..c54e1bf17 100644 --- a/capplets/background/gnome-wp-capplet.c +++ b/capplets/background/gnome-wp-capplet.c @@ -81,7 +81,9 @@ static void gnome_wp_capplet_scroll_to_item (GnomeWPCapplet * capplet, GtkTreePath * path; g_return_if_fail (capplet != NULL); - g_return_if_fail (item != NULL); + + if (item == NULL) + return; path = gtk_tree_row_reference_get_path (item->rowref); gtk_tree_view_set_cursor (GTK_TREE_VIEW (capplet->treeview), path, @@ -699,6 +701,9 @@ static gboolean gnome_wp_load_stuffs (void * data) { g_slist_free (capplet->uri_list); } + if (capplet->old_item == NULL && item != NULL) + capplet->old_item = gnome_wp_item_dup (item); + return FALSE; }