background: Make update_size() work in _load()

If we never got an initial frame, it wouldn't work too well.
This commit is contained in:
Bastien Nocera 2011-02-11 12:38:46 +00:00
parent ba72b7ab18
commit 4bd51634a0

View file

@ -307,7 +307,14 @@ cc_background_item_load (CcBackgroundItem *item,
return FALSE;
}
/* FIXME we should handle XML files as well */
if (item->priv->mime_type != NULL &&
g_str_has_prefix (item->priv->mime_type, "image/")) {
gdk_pixbuf_get_file_info (item->priv->filename,
&item->priv->width,
&item->priv->height);
update_size (item);
}
return TRUE;
}