[goffice] plot_distrib: embed icons into plugin.xml



commit a5594b1ce78fa5df35a54b469e4bf645021c9220
Author: Morten Welinder <terra gnome org>
Date:   Tue Dec 6 15:24:43 2011 -0500

    plot_distrib: embed icons into plugin.xml

 pixmaps/Makefile.am                        |    1 -
 plugins/plot_distrib/Makefile.am           |   11 ++++++++++-
 {pixmaps => plugins/plot_distrib}/dist.xpm |    0
 plugins/plot_distrib/plot-types.xml.in     |    2 +-
 plugins/plot_distrib/plugin.xml.in         |    4 ++++
 5 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index e115d65..74043b6 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -1,6 +1,5 @@
 icondir = $(goffice_icondir)
 dist_icon_DATA = \
-	dist.xpm	\
 	doughnut.xpm	\
 	pie.xpm		\
 	radar.xpm	\
diff --git a/plugins/plot_distrib/Makefile.am b/plugins/plot_distrib/Makefile.am
index 371ea76..f883d2e 100644
--- a/plugins/plot_distrib/Makefile.am
+++ b/plugins/plot_distrib/Makefile.am
@@ -23,6 +23,15 @@ if WITH_GTK
 endif
 @INTLTOOL_XML_RULE@
 
+plugin_resources = dist.xpm
+pofiles = $(wildcard $(top_srcdir)/po/*.po)
+
+plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/embedder
+	LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $  tmp
+	cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/resource-embedder \
+		$  tmp $@
+	rm -f $  tmp
+
 # Do not use the intl-tool stuff to merge the text back;
 # it's simpler to just use gettext directly
 plot-types.xml : plot-types.xml.in
@@ -60,7 +69,7 @@ embedded-stuff.c: $(top_srcdir)/tools/embedder $(embedded_stuff)
 BUILT_SOURCES =	embedded-stuff.c
 CLEANFILES = $(BUILT_SOURCES)
 
-EXTRA_DIST = $(xml_in_files) $(ui_DATA)
+EXTRA_DIST = $(xml_in_files) $(ui_DATA) $(plugin_resources)
 DISTCLEANFILES = $(xml_in_files:.xml.in=.xml)
 
 include $(top_srcdir)/goffice-plugins.mk
diff --git a/pixmaps/dist.xpm b/plugins/plot_distrib/dist.xpm
similarity index 100%
rename from pixmaps/dist.xpm
rename to plugins/plot_distrib/dist.xpm
diff --git a/plugins/plot_distrib/plot-types.xml.in b/plugins/plot_distrib/plot-types.xml.in
index 3d574ea..6277740 100644
--- a/plugins/plot_distrib/plot-types.xml.in
+++ b/plugins/plot_distrib/plot-types.xml.in
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Types xmlns:graph="http://www.gnumeric.org/graph_v2.dtd";>
-	<Family _name="Statistics"	sample_image_file="dist.xpm" axis_set="xy"/>
+	<Family _name="Statistics"	sample_image_file="res:go:plot_distrib/dist.xpm" axis_set="xy"/>
 
 	<Type _name="HBoxPlots" row="1" col="1"
 		engine="GogBoxPlot" family="Statistics"
diff --git a/plugins/plot_distrib/plugin.xml.in b/plugins/plot_distrib/plugin.xml.in
index f1fb53f..027b1f4 100644
--- a/plugins/plot_distrib/plugin.xml.in
+++ b/plugins/plot_distrib/plugin.xml.in
@@ -11,6 +11,10 @@
 		<attribute name="module_file" value="distrib"/>
 	</loader>
 	<services>
+		<service type="resource"
+			 id="go:plot_distrib/dist.xpm"
+			 file="dist.xpm"/>
+
 		<service type="plot_engine" id="GogBoxPlot">
 			<information>
 				<_description>Box-plot plotting engine</_description>



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