[gnome-control-center] background: Set the flags for the pictures source



commit 9e3903a8280e39237b5dde86c291ecb4108c5eb0
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Feb 11 03:49:49 2011 +0000

    background: Set the flags for the pictures source

 panels/background/bg-pictures-source.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/panels/background/bg-pictures-source.c b/panels/background/bg-pictures-source.c
index c7e362d..e363b75 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]