background: Make ensure_bg() actually change filenames

Otherwise you might call it as many times as you want, the
filename won't be changed for it, or its metadata (such as whether
it is a slideshow) updated.
This commit is contained in:
Bastien Nocera 2010-12-14 17:44:35 +00:00
parent adfe6ef8fc
commit 855b7830d3

View file

@ -108,13 +108,12 @@ static void set_bg_properties (GnomeWPItem *item)
void gnome_wp_item_ensure_gnome_bg (GnomeWPItem *item)
{
if (!item->bg) {
if (!item->bg)
item->bg = gnome_bg_new ();
g_object_set_data (G_OBJECT (item->bg), "gnome-wp-item", item);
g_object_set_data (G_OBJECT (item->bg), "gnome-wp-item", item);
set_bg_properties (item);
}
set_bg_properties (item);
}
void gnome_wp_item_update (GnomeWPItem *item) {