background: Set the flags for the pictures source
This commit is contained in:
parent
cb2a53141d
commit
9e3903a828
1 changed files with 2 additions and 8 deletions
|
@ -220,7 +220,6 @@ file_info_async_ready (GObject *source,
|
||||||
parent = g_file_enumerator_get_container (G_FILE_ENUMERATOR (source));
|
parent = g_file_enumerator_get_container (G_FILE_ENUMERATOR (source));
|
||||||
path = g_file_get_path (parent);
|
path = g_file_get_path (parent);
|
||||||
|
|
||||||
|
|
||||||
/* iterate over the available files */
|
/* iterate over the available files */
|
||||||
for (l = files; l; l = g_list_next (l))
|
for (l = files; l; l = g_list_next (l))
|
||||||
{
|
{
|
||||||
|
@ -244,13 +243,8 @@ file_info_async_ready (GObject *source,
|
||||||
|
|
||||||
/* create a new CcBackgroundItem */
|
/* create a new CcBackgroundItem */
|
||||||
item = cc_background_item_new (filename);
|
item = cc_background_item_new (filename);
|
||||||
cc_background_item_load (item, info);
|
g_object_set (G_OBJECT (item), "flags", CC_BACKGROUND_ITEM_HAS_FNAME, NULL);
|
||||||
if (!item)
|
cc_background_item_load (item, info); /* FIXME use asynchronous load, and remove if failed */
|
||||||
{
|
|
||||||
g_warning ("Could not load picture \"%s\"", filename);
|
|
||||||
g_free (filename);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
file = g_file_new_for_path (filename);
|
file = g_file_new_for_path (filename);
|
||||||
g_free (filename);
|
g_free (filename);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue