[goffice] plot_radar: embed icons into plugin.xml
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] plot_radar: embed icons into plugin.xml
- Date: Tue, 6 Dec 2011 20:48:14 +0000 (UTC)
commit 3c9e5a07963b1230a1278d80ca545e3bb1fa4dc6
Author: Morten Welinder <terra gnome org>
Date: Tue Dec 6 15:45:58 2011 -0500
plot_radar: embed icons into plugin.xml
pixmaps/Makefile.am | 2 -
plugins/plot_radar/Makefile.am | 11 +++++++-
plugins/plot_radar/plot-types.xml.in | 4 +-
plugins/plot_radar/plugin.xml.in | 7 +++++
{pixmaps => plugins/plot_radar}/polar.png | Bin 470 -> 470 bytes
{pixmaps => plugins/plot_radar}/polar.svg | 0
plugins/plot_radar/polar.xpm | 43 +++++++++++++++++++++++++++++
{pixmaps => plugins/plot_radar}/radar.xpm | 0
8 files changed, 62 insertions(+), 5 deletions(-)
---
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index e32d0d1..b6ec456 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -1,5 +1,3 @@
icondir = $(goffice_icondir)
dist_icon_DATA = \
- radar.xpm \
- polar.png \
stock.xpm
diff --git a/plugins/plot_radar/Makefile.am b/plugins/plot_radar/Makefile.am
index b76fe89..439682a 100644
--- a/plugins/plot_radar/Makefile.am
+++ b/plugins/plot_radar/Makefile.am
@@ -14,6 +14,15 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
+plugin_resources = radar.xpm polar.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
@@ -46,7 +55,7 @@ embedded-stuff.c: $(top_srcdir)/tools/embedder $(embedded_stuff)
BUILT_SOURCES = embedded-stuff.c
CLEANFILES = $(BUILT_SOURCES)
-EXTRA_DIST = $(xml_in_files) $(embedded_stuff)
+EXTRA_DIST = $(xml_in_files) $(embedded_stuff) $(plugin_resources)
DISTCLEANFILES = $(xml_in_files:.xml.in=.xml)
include $(top_srcdir)/goffice-plugins.mk
diff --git a/plugins/plot_radar/plot-types.xml.in b/plugins/plot_radar/plot-types.xml.in
index 288dbe9..f5456eb 100644
--- a/plugins/plot_radar/plot-types.xml.in
+++ b/plugins/plot_radar/plot-types.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Types xmlns:graph="http://www.gnumeric.org/graph_v2.dtd">
- <Family _name="Radar" sample_image_file="radar.xpm" axis_set="radar"/>
- <Family _name="Polar" sample_image_file="polar.png" axis_set="radar"/>
+ <Family _name="Radar" sample_image_file="res:go:plot_radar/radar.xpm" axis_set="radar"/>
+ <Family _name="Polar" sample_image_file="res:go:plot_radar/polar.xpm" axis_set="radar"/>
<Type _name="Radar" row="1" col="1"
engine="GogRadarPlot" family="Radar"
diff --git a/plugins/plot_radar/plugin.xml.in b/plugins/plot_radar/plugin.xml.in
index 0b604b2..dc267ec 100644
--- a/plugins/plot_radar/plugin.xml.in
+++ b/plugins/plot_radar/plugin.xml.in
@@ -8,6 +8,13 @@
<attribute name="module_file" value="radar"/>
</loader>
<services>
+ <service type="resource"
+ id="go:plot_radar/radar.xpm"
+ file="radar.xpm"/>
+ <service type="resource"
+ id="go:plot_radar/polar.xpm"
+ file="polar.xpm"/>
+
<service type="plot_engine" id="GogRadarPlot">
<information>
<_description>Radar plotting engine</_description>
diff --git a/pixmaps/polar.png b/plugins/plot_radar/polar.png
similarity index 100%
rename from pixmaps/polar.png
rename to plugins/plot_radar/polar.png
diff --git a/pixmaps/polar.svg b/plugins/plot_radar/polar.svg
similarity index 100%
rename from pixmaps/polar.svg
rename to plugins/plot_radar/polar.svg
diff --git a/plugins/plot_radar/polar.xpm b/plugins/plot_radar/polar.xpm
new file mode 100644
index 0000000..6468333
--- /dev/null
+++ b/plugins/plot_radar/polar.xpm
@@ -0,0 +1,43 @@
+/* XPM */
+static char *polar[] = {
+/* columns rows colors chars-per-pixel */
+"18 18 19 1 ",
+" c black",
+". c #030000",
+"X c #090000",
+"o c #2C0000",
+"O c #380000",
+"+ c #3B0000",
+"@ c #5A0000",
+"# c #5D0000",
+"$ c #6D0000",
+"% c #9C0000",
+"& c #AB0000",
+"* c #BC0000",
+"= c #C10000",
+"- c #CB0000",
+"; c #D50000",
+": c #D80000",
+"> c #F80000",
+", c red",
+"< c None",
+/* pixels */
+"<<<<<<<<<<<<<<<<<<",
+"<<<<<< <<<<<<<",
+"<<<< << << <<<<<",
+"<<< <<<o<<< <<<<",
+"<< <<<,:,,,< <<<",
+"<< <<,,< <<,,< <<<",
+"< <<<,<<O<<<,<< <<",
+"< <<<,<,;,<<<,< <<",
+"< #& *= - >X <<",
+"< <<<,<<O<,<<,< <<",
+"< <<<<,,$,<<<,< <<",
+"<< <<<<,%<<<<< <<<",
+"<< <<<< <<<< <<<",
+"<<< <<< <<< <<<<",
+"<<<< << << <<<<<",
+"<<<<<< <<<<<<<",
+"<<<<<<<<<<<<<<<<<<",
+"<<<<<<<<<<<<<<<<<<"
+};
diff --git a/pixmaps/radar.xpm b/plugins/plot_radar/radar.xpm
similarity index 100%
rename from pixmaps/radar.xpm
rename to plugins/plot_radar/radar.xpm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]