[gnumeric] SheetObjectImage: load from glib resource.



commit 5fc54a4f7c03eecd17706bf7731346645b6b4548
Author: Morten Welinder <terra gnome org>
Date:   Mon Jan 19 19:37:07 2015 -0500

    SheetObjectImage: load from glib resource.

 ChangeLog                |    3 +++
 src/Makefile.am          |    4 ++--
 src/gnm.gresource.xml    |    1 +
 src/sheet-object-image.c |    5 +++--
 4 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9658db7..7939248 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-01-19  Morten Welinder  <terra gnome org>
 
+       * src/sheet-object-image.c (gnm_soi_new_view): Load unknown-image
+       from glib resources.
+
        * src/gui-util.c (gnumeric_load_image, gnumeric_load_pixbuf):
        Delete.
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 765c298..140e6e3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -437,8 +437,8 @@ gnumeric_app_libs =                         \
 
 embedded_imgs =                                                \
        gnumeric.css                                    \
-       pixmaps/sheet_move_marker.xpm                   \
-       pixmaps/unknown_image.png
+       pixmaps/sheet_move_marker.xpm
+
 
 embedded-imgs.c: $(top_srcdir)/tools/embedder $(embedded_imgs) Makefile
        cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/embedder \
diff --git a/src/gnm.gresource.xml b/src/gnm.gresource.xml
index 9085ef8..92d9e53 100644
--- a/src/gnm.gresource.xml
+++ b/src/gnm.gresource.xml
@@ -178,5 +178,6 @@
     <file alias="images/right-down.png">src/pixmaps/right-down.png</file>
     <file alias="images/down-right.png">src/pixmaps/down-right.png</file>
     <file alias="images/gnumeric_splash_1.4.png">src/pixmaps/gnumeric_splash_1.4.png</file>
+    <file alias="images/unknown_image.png">src/pixmaps/unknown_image.png</file>
   </gresource>
 </gresources>
diff --git a/src/sheet-object-image.c b/src/sheet-object-image.c
index 2d7aa0a..9067d32 100644
--- a/src/sheet-object-image.c
+++ b/src/sheet-object-image.c
@@ -207,8 +207,9 @@ gnm_soi_new_view (SheetObject *so, SheetObjectViewContainer *container)
                        NULL));
 
        } else {
-               GdkPixbuf *placeholder = go_gdk_pixbuf_load_from_file
-                       ("res:gnm:pixmaps/unknown_image.png");
+               GdkPixbuf *placeholder =
+                       gdk_pixbuf_new_from_resource ("/org/gnumeric/gnumeric/images/unknown_image.png",
+                                                     NULL);
                GdkPixbuf *pixbuf = gdk_pixbuf_copy (placeholder);
 
                goc_item_hide (goc_item_new (GOC_GROUP (item),


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