[goffice] plot_pie, plot_radar: embed stuff like plot_xy
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] plot_pie, plot_radar: embed stuff like plot_xy
- Date: Sun, 4 Dec 2011 01:42:03 +0000 (UTC)
commit a5497acd325e3531774242a74821912f9f734d90
Author: Morten Welinder <terra gnome org>
Date: Sat Dec 3 20:41:40 2011 -0500
plot_pie, plot_radar: embed stuff like plot_xy
ChangeLog | 3 ++
NEWS | 6 ++--
pixmaps/Makefile.am | 8 ----
plugins/plot_distrib/Makefile.am | 4 +-
plugins/plot_pie/.gitignore | 1 +
plugins/plot_pie/Makefile.am | 38 +++++++++++++++++--
{pixmaps => plugins/plot_pie}/chart_pie_1_1.png | Bin 2676 -> 2676 bytes
{pixmaps => plugins/plot_pie}/chart_pie_1_1.svg | 0
{pixmaps => plugins/plot_pie}/chart_pie_1_2.png | Bin 281 -> 281 bytes
{pixmaps => plugins/plot_pie}/chart_pie_1_3.png | Bin 316 -> 316 bytes
{pixmaps => plugins/plot_pie}/chart_pie_2_1.png | Bin 3044 -> 3044 bytes
{pixmaps => plugins/plot_pie}/chart_pie_2_1.svg | 0
{pixmaps => plugins/plot_pie}/chart_pie_2_2.png | Bin 325 -> 325 bytes
{pixmaps => plugins/plot_pie}/chart_pie_2_3.png | Bin 294 -> 294 bytes
{pixmaps => plugins/plot_pie}/chart_pie_3_1.png | Bin 2485 -> 2485 bytes
{pixmaps => plugins/plot_pie}/chart_pie_3_1.svg | 0
{pixmaps => plugins/plot_pie}/chart_pie_3_2.png | Bin 2950 -> 2950 bytes
{pixmaps => plugins/plot_pie}/chart_pie_3_2.svg | 0
{pixmaps => plugins/plot_pie}/chart_ring_1_1.png | Bin 3463 -> 3463 bytes
{pixmaps => plugins/plot_pie}/chart_ring_1_1.svg | 0
{pixmaps => plugins/plot_pie}/chart_ring_1_2.png | Bin 4265 -> 4265 bytes
{pixmaps => plugins/plot_pie}/chart_ring_1_2.svg | 0
plugins/plot_pie/gog-pie-prefs.c | 24 +++++--------
plugins/plot_pie/gog-pie.c | 5 +++
plugins/plot_pie/plot-types.xml.in | 20 +++++-----
plugins/plot_radar/.gitignore | 1 +
plugins/plot_radar/Makefile.am | 34 +++++++++++++++---
.../plot_radar}/chart_color_polar_1_1.png | Bin 3975 -> 3975 bytes
.../plot_radar}/chart_color_polar_1_1.svg | 0
.../plot_radar}/chart_polar_1_1.png | Bin 3774 -> 3774 bytes
.../plot_radar}/chart_polar_1_1.svg | 0
.../plot_radar}/chart_radar_1_1.png | Bin 4057 -> 4057 bytes
.../plot_radar}/chart_radar_1_1.svg | 0
.../plot_radar}/chart_radar_1_2.png | Bin 3841 -> 3841 bytes
.../plot_radar}/chart_radar_1_2.svg | 0
.../plot_radar}/chart_radar_1_3.png | Bin 3037 -> 3037 bytes
.../plot_radar}/chart_radar_1_3.svg | 0
plugins/plot_radar/gog-radar.c | 28 ++++++---------
plugins/plot_radar/plot-types.xml.in | 10 +++---
{pixmaps => plugins/plot_xy}/chart_colored_1_1.svg | 0
plugins/reg_linear/Makefile.am | 4 +-
plugins/reg_logfit/Makefile.am | 4 +-
plugins/smoothing/Makefile.am | 4 +-
43 files changed, 119 insertions(+), 75 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 90aef42..748dcb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-12-03 Morten Welinder <terra gnome org>
+ * plugins/plot_pie: embed stuff like plot_xy.
+ * plugins/plot_radar: embed stuff like plot_xy.
+
* pixmaps/Makefile.am (dist_icon_DATA): Don't distribute unused
icon files.
diff --git a/NEWS b/NEWS
index c0e98cc..95e2873 100644
--- a/NEWS
+++ b/NEWS
@@ -7,9 +7,9 @@ Andreas:
[#665303]
Morten:
- * Embed ui files into library.
- * Embed svg-patterns.xml too.
- * Start embedding icons into plugins.
+ * Embed library ui files into library.
+ * Embed svg-patterns.xml and error bar image files too.
+ * Embed icons into plugins.
--------------------------------------------------------------------------
goffice 0.9.1:
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index 1810d96..d39fb7a 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -1,13 +1,5 @@
icondir = $(goffice_icondir)
dist_icon_DATA = \
- chart_radar_1_1.png chart_radar_1_2.png chart_radar_1_3.png \
- chart_polar_1_1.png \
- chart_color_polar_1_1.png \
- chart_pie_1_1.png chart_pie_1_2.png chart_pie_1_3.png \
- 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 \
- \
area.xpm \
bar.xpm \
bubble.xpm \
diff --git a/plugins/plot_distrib/Makefile.am b/plugins/plot_distrib/Makefile.am
index 47ac004..371ea76 100644
--- a/plugins/plot_distrib/Makefile.am
+++ b/plugins/plot_distrib/Makefile.am
@@ -23,8 +23,8 @@ if WITH_GTK
endif
@INTLTOOL_XML_RULE@
-# 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 $< $@
diff --git a/plugins/plot_pie/.gitignore b/plugins/plot_pie/.gitignore
index 51eb861..2b4cdcd 100644
--- a/plugins/plot_pie/.gitignore
+++ b/plugins/plot_pie/.gitignore
@@ -7,3 +7,4 @@ plugin.xml
*.loT
*.la
.libs
+embedded-stuff.c
diff --git a/plugins/plot_pie/Makefile.am b/plugins/plot_pie/Makefile.am
index d9d3d27..28b000b 100644
--- a/plugins/plot_pie/Makefile.am
+++ b/plugins/plot_pie/Makefile.am
@@ -1,6 +1,5 @@
goffice_graph_piedir = $(goffice_plugindir)/plot_pie
xmldir = $(goffice_graph_piedir)
-uidir = $(goffice_graph_piedir)
goffice_graph_pie_LTLIBRARIES = pie.la
pie_la_LDFLAGS = -module $(GOFFICE_PLUGIN_FLAGS)
@@ -16,15 +15,46 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
if WITH_GTK
-dist_ui_DATA = gog-pie-prefs.ui gog-ring-prefs.ui gog-pie-series.ui
pie_la_SOURCES += gog-pie-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_pie_1_1.png \
+ chart_pie_1_2.png \
+ chart_pie_1_3.png \
+ 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
+
+embedded_stuff_compress = \
+ gog-pie-prefs.ui \
+ gog-ring-prefs.ui \
+ gog-pie-series.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_pie/ \
+ --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_pie_1_1.png b/plugins/plot_pie/chart_pie_1_1.png
similarity index 100%
rename from pixmaps/chart_pie_1_1.png
rename to plugins/plot_pie/chart_pie_1_1.png
diff --git a/pixmaps/chart_pie_1_1.svg b/plugins/plot_pie/chart_pie_1_1.svg
similarity index 100%
rename from pixmaps/chart_pie_1_1.svg
rename to plugins/plot_pie/chart_pie_1_1.svg
diff --git a/pixmaps/chart_pie_1_2.png b/plugins/plot_pie/chart_pie_1_2.png
similarity index 100%
rename from pixmaps/chart_pie_1_2.png
rename to plugins/plot_pie/chart_pie_1_2.png
diff --git a/pixmaps/chart_pie_1_3.png b/plugins/plot_pie/chart_pie_1_3.png
similarity index 100%
rename from pixmaps/chart_pie_1_3.png
rename to plugins/plot_pie/chart_pie_1_3.png
diff --git a/pixmaps/chart_pie_2_1.png b/plugins/plot_pie/chart_pie_2_1.png
similarity index 100%
rename from pixmaps/chart_pie_2_1.png
rename to plugins/plot_pie/chart_pie_2_1.png
diff --git a/pixmaps/chart_pie_2_1.svg b/plugins/plot_pie/chart_pie_2_1.svg
similarity index 100%
rename from pixmaps/chart_pie_2_1.svg
rename to plugins/plot_pie/chart_pie_2_1.svg
diff --git a/pixmaps/chart_pie_2_2.png b/plugins/plot_pie/chart_pie_2_2.png
similarity index 100%
rename from pixmaps/chart_pie_2_2.png
rename to plugins/plot_pie/chart_pie_2_2.png
diff --git a/pixmaps/chart_pie_2_3.png b/plugins/plot_pie/chart_pie_2_3.png
similarity index 100%
rename from pixmaps/chart_pie_2_3.png
rename to plugins/plot_pie/chart_pie_2_3.png
diff --git a/pixmaps/chart_pie_3_1.png b/plugins/plot_pie/chart_pie_3_1.png
similarity index 100%
rename from pixmaps/chart_pie_3_1.png
rename to plugins/plot_pie/chart_pie_3_1.png
diff --git a/pixmaps/chart_pie_3_1.svg b/plugins/plot_pie/chart_pie_3_1.svg
similarity index 100%
rename from pixmaps/chart_pie_3_1.svg
rename to plugins/plot_pie/chart_pie_3_1.svg
diff --git a/pixmaps/chart_pie_3_2.png b/plugins/plot_pie/chart_pie_3_2.png
similarity index 100%
rename from pixmaps/chart_pie_3_2.png
rename to plugins/plot_pie/chart_pie_3_2.png
diff --git a/pixmaps/chart_pie_3_2.svg b/plugins/plot_pie/chart_pie_3_2.svg
similarity index 100%
rename from pixmaps/chart_pie_3_2.svg
rename to plugins/plot_pie/chart_pie_3_2.svg
diff --git a/pixmaps/chart_ring_1_1.png b/plugins/plot_pie/chart_ring_1_1.png
similarity index 100%
rename from pixmaps/chart_ring_1_1.png
rename to plugins/plot_pie/chart_ring_1_1.png
diff --git a/pixmaps/chart_ring_1_1.svg b/plugins/plot_pie/chart_ring_1_1.svg
similarity index 100%
rename from pixmaps/chart_ring_1_1.svg
rename to plugins/plot_pie/chart_ring_1_1.svg
diff --git a/pixmaps/chart_ring_1_2.png b/plugins/plot_pie/chart_ring_1_2.png
similarity index 100%
rename from pixmaps/chart_ring_1_2.png
rename to plugins/plot_pie/chart_ring_1_2.png
diff --git a/pixmaps/chart_ring_1_2.svg b/plugins/plot_pie/chart_ring_1_2.svg
similarity index 100%
rename from pixmaps/chart_ring_1_2.svg
rename to plugins/plot_pie/chart_ring_1_2.svg
diff --git a/plugins/plot_pie/gog-pie-prefs.c b/plugins/plot_pie/gog-pie-prefs.c
index 971bb77..127472b 100644
--- a/plugins/plot_pie/gog-pie-prefs.c
+++ b/plugins/plot_pie/gog-pie-prefs.c
@@ -36,13 +36,10 @@ cb_element_separation_changed (GtkAdjustment *adj, GObject *element)
GtkWidget *
gog_pie_series_element_pref (GogPieSeriesElement *element, GOCmdContext *cc)
{
+ GtkBuilder *gui =
+ go_gtk_builder_new ("res:go:plot_pie/gog-pie-series.ui",
+ GETTEXT_PACKAGE, cc);
GtkWidget *w;
- char const *dir = go_plugin_get_dir_name (
- go_plugins_get_plugin_by_id ("GOffice_plot_pie"));
- char *path = g_build_filename (dir, "gog-pie-series.ui", NULL);
- GtkBuilder *gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
-
- g_free (path);
if (gui == NULL)
return NULL;
@@ -152,13 +149,12 @@ cb_update_editor (GogPiePlot *pie, PiePrefState *state)
GtkWidget *
gog_pie_plot_pref (GogPiePlot *pie, GOCmdContext *cc)
{
+ GtkBuilder *gui =
+ go_gtk_builder_new ("res:go:plot_pie/gog-pie-prefs.ui",
+ GETTEXT_PACKAGE, cc);
GtkWidget *w;
- char const *dir = go_plugin_get_dir_name (go_plugins_get_plugin_by_id ("GOffice_plot_pie"));
- char *path = g_build_filename (dir, "gog-pie-prefs.ui", NULL);
- GtkBuilder *gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
PiePrefState *state;
- g_free (path);
if (gui == NULL)
return NULL;
@@ -194,14 +190,12 @@ cb_center_size_changed (GtkAdjustment *adj, GObject *ring)
GtkWidget *
gog_ring_plot_pref (GogRingPlot *ring, GOCmdContext *cc)
{
+ GtkBuilder *gui =
+ go_gtk_builder_new ("res:go:plot_pie/gog-ring-prefs.ui",
+ GETTEXT_PACKAGE, cc);
GtkWidget *w;
- char const *dir = go_plugin_get_dir_name (
- go_plugins_get_plugin_by_id ("GOffice_plot_pie"));
- char *path = g_build_filename (dir, "gog-ring-prefs.ui", NULL);
- GtkBuilder *gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
PiePrefState *state;
- g_free (path);
if (gui == NULL)
return NULL;
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index e5bcaee..5920e30 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -37,6 +37,8 @@
#include <math.h>
#include <string.h>
+#include "embedded-stuff.c"
+
static GObjectClass *ppe_parent_klass;
typedef GogSeriesElementClass GogPieSeriesElementClass;
@@ -1316,9 +1318,12 @@ go_plugin_init (GOPlugin *plugin, GOCmdContext *cc)
gog_pie_view_register_type (module);
gog_pie_series_register_type (module);
gog_ring_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_pie/plot-types.xml.in b/plugins/plot_pie/plot-types.xml.in
index a97305b..46d9419 100644
--- a/plugins/plot_pie/plot-types.xml.in
+++ b/plugins/plot_pie/plot-types.xml.in
@@ -6,25 +6,25 @@
<Type _name="Pie" row="1" col="1"
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor."
- sample_image_file="chart_pie_1_1.png">
+ sample_image_file="res:go:plot_pie/chart_pie_1_1.png">
</Type>
<Type _name="Split Pie" row="1" col="2"
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor with wedges split apart."
- sample_image_file="chart_pie_2_1.png">
+ sample_image_file="res:go:plot_pie/chart_pie_2_1.png">
<property name="default-separation">.20</property>
</Type>
<Type _name="Half Pie" row="2" col="1"
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor in a half circle."
- sample_image_file="chart_pie_3_1.png">
+ sample_image_file="res:go:plot_pie/chart_pie_3_1.png">
<property name="initial-angle">270.</property>
<property name="span">50.</property>
</Type>
<Type _name="Split Half Pie" row="2" col="2"
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor in a half circle with wedges split apart."
- sample_image_file="chart_pie_3_2.png">
+ sample_image_file="res:go:plot_pie/chart_pie_3_2.png">
<property name="initial-angle">270.</property>
<property name="span">50.</property>
<property name="default-separation">.20</property>
@@ -32,25 +32,25 @@
<Type _name="Ring" row="1" col="1"
engine="GogRingPlot" family="Ring"
_description="Percentage of each contributor displayed as a segment of a ring with one ring for each series."
- sample_image_file="chart_ring_1_1.png">
+ sample_image_file="res:go:plot_pie/chart_ring_1_1.png">
</Type>
<Type _name="Split Ring" row="1" col="2"
engine="GogRingPlot" family="Ring"
_description="Percentage of each contributor displayed as a segment of a ring with one ring for each series; the wedges of the outside ring (corresponding to the last series) are split apart."
- sample_image_file="chart_ring_1_2.png">
+ sample_image_file="res:go:plot_pie/chart_ring_1_2.png">
<property name="default_separation">.20</property>
</Type>
<!--
<Type _name="3D Pie" row="1" col="2"
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor in 3D pie."
- sample_image_file="chart_pie_1_2.png">
+ sample_image_file="res:go:plot_pie/chart_pie_1_2.png">
<property name="in_3d"/>
</Type>
<Type _name="Multi-Pie" row="1" col="3"
engine="GogPiePlot" family="Pie"
_description="Major totals as percentages with each wedge subdivided into secondary pies."
- sample_image_file="chart_pie_1_3.png">
+ sample_image_file="res:go:plot_pie/chart_pie_1_3.png">
<property name="in_3d"/>
</Type>
-->
@@ -58,7 +58,7 @@
<Type _name="3D Split Pie" row="2" col="2"
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor with 3D wedges split apart."
- sample_image_file="chart_pie_2_2.png">
+ sample_image_file="res:go:plot_pie/chart_pie_2_2.png">
<property name="default_separation">.20</property>
<property name="in_3d"/>
</Type>
@@ -66,7 +66,7 @@
engine="GogPiePlot" family="Pie"
_description="Percentage of each contributor with 3D wedges split apart."
_description="Major totals as percentages with each wedge subdivided into secondary stacked bars."
- sample_image_file="chart_pie_2_3.png">
+ sample_image_file="res:go:plot_pie/chart_pie_2_3.png">
<property name="default_separation">.20</property>
<property name="in_3d"/>
</Type>
diff --git a/plugins/plot_radar/.gitignore b/plugins/plot_radar/.gitignore
index 51eb861..2b4cdcd 100644
--- a/plugins/plot_radar/.gitignore
+++ b/plugins/plot_radar/.gitignore
@@ -7,3 +7,4 @@ plugin.xml
*.loT
*.la
.libs
+embedded-stuff.c
diff --git a/plugins/plot_radar/Makefile.am b/plugins/plot_radar/Makefile.am
index 192f9e5..9e6daad 100644
--- a/plugins/plot_radar/Makefile.am
+++ b/plugins/plot_radar/Makefile.am
@@ -1,6 +1,5 @@
goffice_graph_radardir = $(goffice_plugindir)/plot_radar
xmldir = $(goffice_graph_radardir)
-uidir = $(goffice_graph_radardir)
goffice_graph_radar_LTLIBRARIES = radar.la
radar_la_LDFLAGS = -module $(GOFFICE_PLUGIN_FLAGS)
@@ -13,15 +12,40 @@ radar_la_SOURCES = \
xml_in_files = plugin.xml.in plot-types.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
-ui_DATA = gog-color-polar-prefs.ui gog-polar-prefs.ui
-
@INTLTOOL_XML_RULE@
-# 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_color_polar_1_1.png \
+ chart_polar_1_1.png \
+ chart_radar_1_1.png \
+ chart_radar_1_2.png \
+ chart_radar_1_3.png
+
+embedded_stuff_compress = \
+ gog-color-polar-prefs.ui \
+ gog-polar-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_radar/ \
+ --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) $(ui_DATA)
DISTCLEANFILES = $(xml_in_files:.xml.in=.xml)
diff --git a/pixmaps/chart_color_polar_1_1.png b/plugins/plot_radar/chart_color_polar_1_1.png
similarity index 100%
rename from pixmaps/chart_color_polar_1_1.png
rename to plugins/plot_radar/chart_color_polar_1_1.png
diff --git a/pixmaps/chart_color_polar_1_1.svg b/plugins/plot_radar/chart_color_polar_1_1.svg
similarity index 100%
rename from pixmaps/chart_color_polar_1_1.svg
rename to plugins/plot_radar/chart_color_polar_1_1.svg
diff --git a/pixmaps/chart_polar_1_1.png b/plugins/plot_radar/chart_polar_1_1.png
similarity index 100%
rename from pixmaps/chart_polar_1_1.png
rename to plugins/plot_radar/chart_polar_1_1.png
diff --git a/pixmaps/chart_polar_1_1.svg b/plugins/plot_radar/chart_polar_1_1.svg
similarity index 100%
rename from pixmaps/chart_polar_1_1.svg
rename to plugins/plot_radar/chart_polar_1_1.svg
diff --git a/pixmaps/chart_radar_1_1.png b/plugins/plot_radar/chart_radar_1_1.png
similarity index 100%
rename from pixmaps/chart_radar_1_1.png
rename to plugins/plot_radar/chart_radar_1_1.png
diff --git a/pixmaps/chart_radar_1_1.svg b/plugins/plot_radar/chart_radar_1_1.svg
similarity index 100%
rename from pixmaps/chart_radar_1_1.svg
rename to plugins/plot_radar/chart_radar_1_1.svg
diff --git a/pixmaps/chart_radar_1_2.png b/plugins/plot_radar/chart_radar_1_2.png
similarity index 100%
rename from pixmaps/chart_radar_1_2.png
rename to plugins/plot_radar/chart_radar_1_2.png
diff --git a/pixmaps/chart_radar_1_2.svg b/plugins/plot_radar/chart_radar_1_2.svg
similarity index 100%
rename from pixmaps/chart_radar_1_2.svg
rename to plugins/plot_radar/chart_radar_1_2.svg
diff --git a/pixmaps/chart_radar_1_3.png b/plugins/plot_radar/chart_radar_1_3.png
similarity index 100%
rename from pixmaps/chart_radar_1_3.png
rename to plugins/plot_radar/chart_radar_1_3.png
diff --git a/pixmaps/chart_radar_1_3.svg b/plugins/plot_radar/chart_radar_1_3.svg
similarity index 100%
rename from pixmaps/chart_radar_1_3.svg
rename to plugins/plot_radar/chart_radar_1_3.svg
diff --git a/plugins/plot_radar/gog-radar.c b/plugins/plot_radar/gog-radar.c
index 8a34f59..a9b6ce0 100644
--- a/plugins/plot_radar/gog-radar.c
+++ b/plugins/plot_radar/gog-radar.c
@@ -49,6 +49,8 @@
#include <goffice/gtk/goffice-gtk.h>
#endif
+#include "embedded-stuff.c"
+
typedef struct {
GogPlotClass base;
} GogRTPlotClass;
@@ -390,15 +392,10 @@ gog_polar_area_populate_editor (GogObject *obj,
GOCmdContext *cc)
{
#ifdef GOFFICE_WITH_GTK
- GtkBuilder *gui;
- char const *dir;
- char *path;
GogObjectClass *gog_class = (GogObjectClass *) g_type_class_peek_parent (G_OBJECT_GET_CLASS (obj));
-
- dir = go_plugin_get_dir_name (go_plugins_get_plugin_by_id ("GOffice_plot_radar"));
- path = g_build_filename (dir, "gog-polar-prefs.ui", NULL);
- gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
- g_free (path);
+ GtkBuilder *gui =
+ go_gtk_builder_new ("res:go:plot_radar/gog-polar-prefs.ui",
+ GETTEXT_PACKAGE, cc);
if (gui != NULL) {
GtkWidget *w = go_gtk_builder_get_widget (gui, "before-grid");
@@ -584,15 +581,9 @@ gog_color_polar_plot_populate_editor (GogObject *obj,
GOCmdContext *cc)
{
#ifdef GOFFICE_WITH_GTK
- GtkBuilder *gui;
- char const *dir;
- char *path;
-
- dir = go_plugin_get_dir_name (go_plugins_get_plugin_by_id ("GOffice_plot_radar"));
- path = g_build_filename (dir, "gog-color-polar-prefs.ui", NULL);
- gui = go_gtk_builder_new (path, GETTEXT_PACKAGE, cc);
- g_free (path);
-
+ GtkBuilder *gui =
+ go_gtk_builder_new ("res:go:plot_radar/gog-color-polar-prefs.ui",
+ GETTEXT_PACKAGE, cc);
if (gui != NULL) {
GtkWidget *w = go_gtk_builder_get_widget (gui, "hide-outliers");
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
@@ -1541,9 +1532,12 @@ go_plugin_init (GOPlugin *plugin, GOCmdContext *cc)
gog_rt_series_element_register_type (module);
gog_polar_series_register_type (module);
gog_color_polar_series_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_radar/plot-types.xml.in b/plugins/plot_radar/plot-types.xml.in
index e5ba436..288dbe9 100644
--- a/plugins/plot_radar/plot-types.xml.in
+++ b/plugins/plot_radar/plot-types.xml.in
@@ -6,33 +6,33 @@
<Type _name="Radar" row="1" col="1"
engine="GogRadarPlot" family="Radar"
_description="Radar plot."
- sample_image_file="chart_radar_1_1.png">
+ sample_image_file="res:go:plot_radar/chart_radar_1_1.png">
<property name="guru-hints">circular-no-line</property>
</Type>
<Type _name="Dotted Radar" row="1" col="2"
engine="GogRadarPlot" family="Radar"
_description="Radar plot with dots."
- sample_image_file="chart_radar_1_2.png">
+ sample_image_file="res:go:plot_radar/chart_radar_1_2.png">
<property name="guru-hints">circular-no-line</property>
<property name="default-style-has-markers">True</property>
</Type>
<Type _name="Area Radar" row="1" col="3"
engine="GogRadarAreaPlot" family="Radar"
_description="Area radar plot."
- sample_image_file="chart_radar_1_3.png">
+ sample_image_file="res:go:plot_radar/chart_radar_1_3.png">
<property name="guru-hints">circular-no-line</property>
</Type>
<Type _name="Polar" row="1" col="1"
engine="GogPolarPlot" family="Polar"
_description="Polar plot."
- sample_image_file="chart_polar_1_1.png">
+ sample_image_file="res:go:plot_radar/chart_polar_1_1.png">
<property name="guru-hints">major-grid;backplane</property>
</Type>
<Type _name="Colored Polar" row="2" col="1"
engine="GogColorPolarPlot" family="Polar"
_description="Polar plot with colored marks."
- sample_image_file="chart_color_polar_1_1.png">
+ sample_image_file="res:go:plot_radar/chart_color_polar_1_1.png">
<property name="guru-hints">major-grid;backplane</property>
</Type>
</Types>
diff --git a/pixmaps/chart_colored_1_1.svg b/plugins/plot_xy/chart_colored_1_1.svg
similarity index 100%
rename from pixmaps/chart_colored_1_1.svg
rename to plugins/plot_xy/chart_colored_1_1.svg
diff --git a/plugins/reg_linear/Makefile.am b/plugins/reg_linear/Makefile.am
index 9bfea46..9982ddf 100644
--- a/plugins/reg_linear/Makefile.am
+++ b/plugins/reg_linear/Makefile.am
@@ -23,8 +23,8 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
-# 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
reg-types.xml : reg-types.xml.in
cp $< $@
diff --git a/plugins/reg_logfit/Makefile.am b/plugins/reg_logfit/Makefile.am
index fbe8774..22103cd 100644
--- a/plugins/reg_logfit/Makefile.am
+++ b/plugins/reg_logfit/Makefile.am
@@ -15,8 +15,8 @@ xml_DATA = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_XML_RULE@
-# 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
reg-types.xml : reg-types.xml.in
cp $< $@
diff --git a/plugins/smoothing/Makefile.am b/plugins/smoothing/Makefile.am
index 3ac2029..8c52d74 100644
--- a/plugins/smoothing/Makefile.am
+++ b/plugins/smoothing/Makefile.am
@@ -22,8 +22,8 @@ dist_ui_DATA = \
gog-moving-avg.ui \
gog-exp-smooth.ui
-# 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
types.xml : types.xml.in
cp $< $@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]