[goffice] plot_surface: embed stuff like plot_xy
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] plot_surface: embed stuff like plot_xy
- Date: Sat, 3 Dec 2011 21:31:16 +0000 (UTC)
commit e7b0f3e200620afb6c1abee3bc74a421a1fb241a
Author: Morten Welinder <terra gnome org>
Date: Sat Dec 3 16:30:54 2011 -0500
plot_surface: embed stuff like plot_xy
ChangeLog | 4 ++
pixmaps/Makefile.am | 2 -
plugins/plot_surface/.gitignore | 1 +
plugins/plot_surface/Makefile.am | 34 +++++++++++++++----
.../plot_surface}/chart_contour_1_1.png | Bin 2487 -> 2487 bytes
.../plot_surface}/chart_contour_1_1.svg | 0
.../plot_surface}/chart_contour_1_2.png | Bin 2611 -> 2611 bytes
.../plot_surface}/chart_contour_1_2.svg | 0
.../plot_surface}/chart_contour_2_1.png | Bin 2861 -> 2861 bytes
.../plot_surface}/chart_contour_2_1.svg | 0
.../plot_surface}/chart_surface_2_1.png | Bin 3819 -> 3819 bytes
.../plot_surface}/chart_surface_2_1.svg | 0
.../plot_surface}/chart_surface_2_2.png | Bin 4183 -> 4183 bytes
.../plot_surface}/chart_surface_2_2.svg | 0
plugins/plot_surface/gog-xyz.c | 5 +++
plugins/plot_surface/plot-types.xml.in | 8 ++--
16 files changed, 41 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a8dd660..7b50d87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-03 Morten Welinder <terra gnome org>
+
+ * plugins/plot_surface: embed stuff like plot_xy.
+
2011-12-02 Morten Welinder <terra gnome org>
* plugins/plot_xy: Move icon files here...
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index e0442ee..f8d17fd 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -27,7 +27,6 @@ dist_icon_DATA = \
chart_pie_2_1.png chart_pie_2_2.png chart_pie_2_3.png \
chart_pie_3_1.png chart_pie_3_2.png \
chart_ring_1_1.png chart_ring_1_2.png \
- chart_contour_1_1.png chart_contour_2_1.png \
chart_boxplot_1_1.png chart_boxplot_1_2.png \
chart_boxplot_2_1.png chart_boxplot_2_2.png \
chart_dropbar_1_1.png chart_dropbar_1_2.png \
@@ -35,7 +34,6 @@ dist_icon_DATA = \
chart_minmax_2_1.png chart_minmax_2_2.png \
chart_histogram_1_1.png chart_histogram_2_1.png \
chart_histogram_1_3.png chart_histogram_1_4.png \
- chart_surface_2_1.png chart_surface_2_2.png \
chart_prob_1_1.png \
\
area.xpm \
diff --git a/plugins/plot_surface/.gitignore b/plugins/plot_surface/.gitignore
index 51eb861..2b4cdcd 100644
--- a/plugins/plot_surface/.gitignore
+++ b/plugins/plot_surface/.gitignore
@@ -7,3 +7,4 @@ plugin.xml
*.loT
*.la
.libs
+embedded-stuff.c
diff --git a/plugins/plot_surface/Makefile.am b/plugins/plot_surface/Makefile.am
index 5eb8545..26d0865 100644
--- a/plugins/plot_surface/Makefile.am
+++ b/plugins/plot_surface/Makefile.am
@@ -1,6 +1,5 @@
goffice_graph_surfacedir = $(goffice_plugindir)/plot_surface
xmldir = $(goffice_graph_surfacedir)
-uidir = $(goffice_graph_surfacedir)
goffice_graph_surface_LTLIBRARIES = surface.la
surface_la_LDFLAGS = -module $(GOFFICE_PLUGIN_FLAGS)
@@ -24,20 +23,41 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
if WITH_GTK
-dist_ui_DATA = \
- gog-xyz-prefs.ui \
- gog-xyz-surface-prefs.ui
-
surface_la_SOURCES += \
gog-xyz-prefs.c \
gog-xyz-surface-prefs.c
endif
-# do not use the intl-tool stuff to merge the text back
-# its simpler to just use gettext directly
+# 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
cp $< $@
+embedded_stuff_raw = \
+ chart_contour_1_1.png \
+ chart_contour_2_1.png \
+ chart_surface_2_1.png \
+ chart_surface_2_2.png
+
+embedded_stuff_compress = \
+ gog-xyz-prefs.ui \
+ gog-xyz-surface-prefs.ui
+
+embedded_stuff = $(embedded_stuff_compress) $(embedded_stuff_raw)
+
+embedded-stuff.c: $(top_srcdir)/tools/embedder $(embedded_stuff)
+ cd $(srcdir) && @PERL@ $(abs_top_srcdir)/tools/embedder \
+ --id-prefix=go:plot_surface/ \
+ --static \
+ --register-function=register_embedded_stuff \
+ --unregister-function=unregister_embedded_stuff \
+ NOCOMPRESS $(embedded_stuff_raw) \
+ COMPRESS $(embedded_stuff_compress) \
+ >$(abs_builddir)/$@
+
+BUILT_SOURCES = embedded-stuff.c
+CLEANFILES = $(BUILT_SOURCES)
+
EXTRA_DIST = $(xml_in_files)
DISTCLEANFILES = $(xml_in_files:.xml.in=.xml)
diff --git a/pixmaps/chart_contour_1_1.png b/plugins/plot_surface/chart_contour_1_1.png
similarity index 100%
rename from pixmaps/chart_contour_1_1.png
rename to plugins/plot_surface/chart_contour_1_1.png
diff --git a/pixmaps/chart_contour_1_1.svg b/plugins/plot_surface/chart_contour_1_1.svg
similarity index 100%
rename from pixmaps/chart_contour_1_1.svg
rename to plugins/plot_surface/chart_contour_1_1.svg
diff --git a/pixmaps/chart_contour_1_2.png b/plugins/plot_surface/chart_contour_1_2.png
similarity index 100%
rename from pixmaps/chart_contour_1_2.png
rename to plugins/plot_surface/chart_contour_1_2.png
diff --git a/pixmaps/chart_contour_1_2.svg b/plugins/plot_surface/chart_contour_1_2.svg
similarity index 100%
rename from pixmaps/chart_contour_1_2.svg
rename to plugins/plot_surface/chart_contour_1_2.svg
diff --git a/pixmaps/chart_contour_2_1.png b/plugins/plot_surface/chart_contour_2_1.png
similarity index 100%
rename from pixmaps/chart_contour_2_1.png
rename to plugins/plot_surface/chart_contour_2_1.png
diff --git a/pixmaps/chart_contour_2_1.svg b/plugins/plot_surface/chart_contour_2_1.svg
similarity index 100%
rename from pixmaps/chart_contour_2_1.svg
rename to plugins/plot_surface/chart_contour_2_1.svg
diff --git a/pixmaps/chart_surface_2_1.png b/plugins/plot_surface/chart_surface_2_1.png
similarity index 100%
rename from pixmaps/chart_surface_2_1.png
rename to plugins/plot_surface/chart_surface_2_1.png
diff --git a/pixmaps/chart_surface_2_1.svg b/plugins/plot_surface/chart_surface_2_1.svg
similarity index 100%
rename from pixmaps/chart_surface_2_1.svg
rename to plugins/plot_surface/chart_surface_2_1.svg
diff --git a/pixmaps/chart_surface_2_2.png b/plugins/plot_surface/chart_surface_2_2.png
similarity index 100%
rename from pixmaps/chart_surface_2_2.png
rename to plugins/plot_surface/chart_surface_2_2.png
diff --git a/pixmaps/chart_surface_2_2.svg b/plugins/plot_surface/chart_surface_2_2.svg
similarity index 100%
rename from pixmaps/chart_surface_2_2.svg
rename to plugins/plot_surface/chart_surface_2_2.svg
diff --git a/plugins/plot_surface/gog-xyz.c b/plugins/plot_surface/gog-xyz.c
index cbf6b0f..77d18cb 100644
--- a/plugins/plot_surface/gog-xyz.c
+++ b/plugins/plot_surface/gog-xyz.c
@@ -36,6 +36,8 @@
#include <glib/gi18n-lib.h>
#include <gsf/gsf-impl-utils.h>
+#include "embedded-stuff.c"
+
GOFFICE_PLUGIN_MODULE_HEADER;
/*-----------------------------------------------------------------------------
*
@@ -519,9 +521,12 @@ go_plugin_init (GOPlugin *plugin, GOCmdContext *cc)
xl_xyz_series_register_type (module);
xl_contour_plot_register_type (module);
xl_surface_plot_register_type (module);
+
+ register_embedded_stuff ();
}
G_MODULE_EXPORT void
go_plugin_shutdown (GOPlugin *plugin, GOCmdContext *cc)
{
+ unregister_embedded_stuff ();
}
diff --git a/plugins/plot_surface/plot-types.xml.in b/plugins/plot_surface/plot-types.xml.in
index 2e25abb..61170dc 100644
--- a/plugins/plot_surface/plot-types.xml.in
+++ b/plugins/plot_surface/plot-types.xml.in
@@ -6,21 +6,21 @@
<Type _name="Contour" row="1" col="1"
engine="GogContourPlot" family="Contour"
_description="Contour plot."
- sample_image_file="chart_contour_1_1.png">
+ sample_image_file="res:go:plot_surface/chart_contour_1_1.png">
</Type>
<Type _name="XYZContour" row="1" col="2"
engine="GogXYZContourPlot" family="Contour"
_description="Builds a contour from a set of points with three coordinates"
- sample_image_file="chart_contour_2_1.png">
+ sample_image_file="res:go:plot_surface/chart_contour_2_1.png">
</Type>
<Type _name="Surface" row="1" col="1"
engine="GogSurfacePlot" family="Surface"
_description="Surface plot."
- sample_image_file="chart_surface_2_1.png">
+ sample_image_file="res:go:plot_surface/chart_surface_2_1.png">
</Type>
<Type _name="XYZSurface" row="1" col="2"
engine="GogXYZSurfacePlot" family="Surface"
_description="Builds a surface from a set of points with three coordinates"
- sample_image_file="chart_surface_2_2.png">
+ sample_image_file="res:go:plot_surface/chart_surface_2_2.png">
</Type>
</Types>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]