From 9e3903a8280e39237b5dde86c291ecb4108c5eb0 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Fri, 11 Feb 2011 03:49:49 +0000 Subject: [PATCH] background: Set the flags for the pictures source --- panels/background/bg-pictures-source.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c index c7e362d36..e363b7567 100644 --- a/panels/background/bg-pictures-source.c +++ b/panels/background/bg-pictures-source.c @@ -220,7 +220,6 @@ file_info_async_ready (GObject *source, parent = g_file_enumerator_get_container (G_FILE_ENUMERATOR (source)); path = g_file_get_path (parent); - /* iterate over the available files */ for (l = files; l; l = g_list_next (l)) { @@ -244,13 +243,8 @@ file_info_async_ready (GObject *source, /* create a new CcBackgroundItem */ item = cc_background_item_new (filename); - cc_background_item_load (item, info); - if (!item) - { - g_warning ("Could not load picture \"%s\"", filename); - g_free (filename); - continue; - } + g_object_set (G_OBJECT (item), "flags", CC_BACKGROUND_ITEM_HAS_FNAME, NULL); + cc_background_item_load (item, info); /* FIXME use asynchronous load, and remove if failed */ file = g_file_new_for_path (filename); g_free (filename);