[gnumeric] iocontext: load splash from glib resources.



commit 635d8e7a0fbc67e966d74ce231c89fa5ed2cee33
Author: Morten Welinder <terra gnome org>
Date:   Mon Jan 19 19:30:31 2015 -0500

    iocontext: load splash from glib resources.

 src/Makefile.am       |    1 -
 src/gnm.gresource.xml |    1 +
 src/io-context-gtk.c  |    8 ++------
 3 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index cabe6e8..765c298 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -437,7 +437,6 @@ gnumeric_app_libs =                         \
 
 embedded_imgs =                                                \
        gnumeric.css                                    \
-       pixmaps/gnumeric_splash_1.4.png                 \
        pixmaps/sheet_move_marker.xpm                   \
        pixmaps/unknown_image.png
 
diff --git a/src/gnm.gresource.xml b/src/gnm.gresource.xml
index 4250e40..9085ef8 100644
--- a/src/gnm.gresource.xml
+++ b/src/gnm.gresource.xml
@@ -177,5 +177,6 @@
     <file preprocess='to-pixdata' 
alias="images/line_pattern_thin.xpm">src/pixmaps/line_pattern_thin.xpm</file>
     <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>
   </gresource>
 </gresources>
diff --git a/src/io-context-gtk.c b/src/io-context-gtk.c
index 325825a..cbd77fb 100644
--- a/src/io-context-gtk.c
+++ b/src/io-context-gtk.c
@@ -126,13 +126,9 @@ icg_show_gui (GnmIOContextGtk *icg)
        GtkWidget *frame;
 
        box = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 0));
-       if (icg->show_splash) {
-               GdkPixbuf *pixbuf = go_gdk_pixbuf_load_from_file
-                       ("res:gnm:pixmaps/gnumeric_splash_1.4.png");
-               gtk_box_pack_start (box, gtk_image_new_from_pixbuf (pixbuf),
+       if (icg->show_splash)
+               gtk_box_pack_start (box, gtk_image_new_from_resource 
("/org/gnumeric/gnumeric/images/gnumeric_splash_1.4.png"),
                                    TRUE, FALSE, 0);
-               g_object_unref (pixbuf);
-       }
 
        /* Don't show this unless we need it. */
        if (icg->files_total > 1) {


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