[gnome-control-center] background: Make update_size() work in _load()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Make update_size() work in _load()
- Date: Fri, 11 Feb 2011 12:51:09 +0000 (UTC)
commit 4bd51634a074456b84fbbed0f3149a15d091ad06
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 11 12:38:46 2011 +0000
background: Make update_size() work in _load()
If we never got an initial frame, it wouldn't work too well.
panels/background/cc-background-item.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/panels/background/cc-background-item.c b/panels/background/cc-background-item.c
index 7042f6f..14d5a4b 100644
--- a/panels/background/cc-background-item.c
+++ b/panels/background/cc-background-item.c
@@ -307,7 +307,14 @@ cc_background_item_load (CcBackgroundItem *item,
return FALSE;
}
- update_size (item);
+ /* 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]