[goffice] Gtk: install an unknown_image icon.



commit a7327d81c05d2975b175c1accdf6e63645583ab0
Author: Morten Welinder <terra gnome org>
Date:   Tue May 21 23:02:38 2013 -0400

    Gtk: install an unknown_image icon.

 ChangeLog           |    5 +++++
 NEWS                |    1 +
 goffice/Makefile.am |    1 +
 goffice/goffice.c   |   14 ++++++++++++++
 4 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9bc4f75..4e7a5ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-05-21  Morten Welinder  <terra gnome org>
+
+       * goffice/goffice.c (libgoffice_init): Install the unknown_image
+       icon here.
+
 2013-05-13  Morten Welinder  <terra gnome org>
 
        * goffice/utils/go-svg.c: Try another variant of previous fix.
diff --git a/NEWS b/NEWS
index f81e93d..5627d77 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Morten:
        * Fix issue with librsvg includes.  [#695167]
        * Make linear regression handle the case where the input
           columns are not independent.  [#551457]
+       * Install the unknown_image icon from Gnumeric.  [#700742]
 
 --------------------------------------------------------------------------
 goffice 0.10.2:
diff --git a/goffice/Makefile.am b/goffice/Makefile.am
index 8acde66..840ea58 100644
--- a/goffice/Makefile.am
+++ b/goffice/Makefile.am
@@ -587,6 +587,7 @@ embedded_stuff_compress = \
 
 embedded_stuff_raw = \
        utils/svg-patterns.xml                  \
+       utils/unknown_image.png                 \
        graph/bar-none.png                      \
        graph/bar-vplus.png                     \
        graph/bar-vminus.png                    \
diff --git a/goffice/goffice.c b/goffice/goffice.c
index 26e7064..0baa817 100644
--- a/goffice/goffice.c
+++ b/goffice/goffice.c
@@ -122,6 +122,19 @@ go_sys_extern_plugin_dir (void)
        return libgoffice_extern_plugin_dir;
 }
 
+#ifdef GOFFICE_WITH_GTK
+static void
+install_icons (void)
+{
+       GdkPixbuf *pixbuf = go_gdk_pixbuf_load_from_file ("res:go:utils/unknown_image.png");
+       int size = gdk_pixbuf_get_width (pixbuf);
+       gtk_icon_theme_add_builtin_icon ("unknown_image",
+                                        size,
+                                        pixbuf);
+       g_object_unref (pixbuf);
+}
+#endif
+
 
 /**
  * libgoffice_init:
@@ -199,6 +212,7 @@ libgoffice_init (void)
        _gog_plugin_services_init ();
 #ifdef GOFFICE_WITH_GTK
        _goc_plugin_services_init ();
+       install_icons ();
 #endif
        (void) GOG_TYPE_GRAPH;
        (void) GOG_TYPE_CHART;


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