[goffice] error bars: embed pixmaps
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] error bars: embed pixmaps
- Date: Sat, 3 Dec 2011 23:42:00 +0000 (UTC)
commit 4bd4a61067332ae9131ddb71bcfe0b0e5ac426f7
Author: Morten Welinder <terra gnome org>
Date: Sat Dec 3 18:41:42 2011 -0500
error bars: embed pixmaps
ChangeLog | 3 +++
goffice/.gitignore | 2 +-
goffice/Makefile.am | 23 +++++++++++++++++------
goffice/goffice.c | 2 +-
goffice/graph/Makefile.am | 12 ++++++++++--
{pixmaps => goffice/graph}/bar-hboth.png | Bin 243 -> 243 bytes
{pixmaps => goffice/graph}/bar-hminus.png | Bin 242 -> 242 bytes
{pixmaps => goffice/graph}/bar-hplus.png | Bin 245 -> 245 bytes
{pixmaps => goffice/graph}/bar-none.png | Bin 244 -> 244 bytes
{pixmaps => goffice/graph}/bar-vboth.png | Bin 242 -> 242 bytes
{pixmaps => goffice/graph}/bar-vminus.png | Bin 251 -> 251 bytes
{pixmaps => goffice/graph}/bar-vplus.png | Bin 248 -> 248 bytes
goffice/graph/gog-error-bar.c | 25 ++++++++++++++++++++-----
pixmaps/Makefile.am | 10 +---------
14 files changed, 53 insertions(+), 24 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index cf5fff7..46cf40c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2011-12-03 Morten Welinder <terra gnome org>
+ * goffice/graph/gog-error-bar.c (display_combo_desc): Embed error
+ bar pixmaps.
+
* plugins/plot_barcol: embed stuff like plot_xy.
* plugins/plot_surface: embed stuff like plot_xy.
diff --git a/goffice/.gitignore b/goffice/.gitignore
index 856c63d..a6f7fd7 100644
--- a/goffice/.gitignore
+++ b/goffice/.gitignore
@@ -14,4 +14,4 @@ stamp-h*
*.lo
*.la
*~
-embedded-ui.c
+embedded-stuff.c
diff --git a/goffice/Makefile.am b/goffice/Makefile.am
index 1c3386c..e8ada78 100644
--- a/goffice/Makefile.am
+++ b/goffice/Makefile.am
@@ -25,7 +25,7 @@ libgoffice_ GOFFICE_API_VER@_la_DEPENDENCIES = goffice.def
libgoffice_ GOFFICE_API_VER@_la_LDFLAGS += -no-undefined -export-symbols goffice.def
endif
-BUILT_SOURCES = goffice-paths.h embedded-ui.c
+BUILT_SOURCES = goffice-paths.h embedded-stuff.c
CLEANFILES = $(BUILT_SOURCES)
libgoffice_ GOFFICE_API_VER@_la_SOURCES = \
@@ -85,7 +85,8 @@ goffice-0.lib: libgoffice- GOFFICE_API_VER@.la goffice.def
endif
endif
-embedded_uis = \
+# Note: Files also need to be listed in the relevant subdirectory
+embedded_stuff_compress = \
graph/gog-3d-box-prefs.ui \
graph/gog-axis-prefs.ui \
graph/gog-equation-prefs.ui \
@@ -107,14 +108,24 @@ embedded_uis = \
gtk/go-rotation-sel.ui \
utils/go-style-prefs.ui
-embedded_raw = utils/svg-patterns.xml
+embedded_stuff_raw = \
+ utils/svg-patterns.xml \
+ graph/bar-none.png \
+ graph/bar-vplus.png \
+ graph/bar-vminus.png \
+ graph/bar-vboth.png \
+ graph/bar-hplus.png \
+ graph/bar-hminus.png \
+ graph/bar-hboth.png
-embedded-ui.c: $(top_srcdir)/tools/embedder $(embedded_uis) $(embedded_raw)
+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: \
--static \
--register-function=go_register_ui_files \
--register-file-function=go_rsm_register_file \
- COMPRESS $(embedded_uis) \
- NOCOMPRESS $(embedded_raw) \
+ COMPRESS $(embedded_stuff_compress) \
+ NOCOMPRESS $(embedded_stuff_raw) \
>$(abs_builddir)/$@
diff --git a/goffice/goffice.c b/goffice/goffice.c
index 5c613d4..9e10227 100644
--- a/goffice/goffice.c
+++ b/goffice/goffice.c
@@ -43,7 +43,7 @@
#include <goffice/graph/gog-equation.h>
#endif
-#include "embedded-ui.c"
+#include "embedded-stuff.c"
int goffice_graph_debug_level = 0;
diff --git a/goffice/graph/Makefile.am b/goffice/graph/Makefile.am
index a86b8af..2b25339 100644
--- a/goffice/graph/Makefile.am
+++ b/goffice/graph/Makefile.am
@@ -84,7 +84,7 @@ if WITH_GTK
gog-child-button.h
endif
-# ui files should be listed here for distribution and one level up for
+# Files should be listed here for distribution and one level up for
# embedding
EXTRA_DIST += \
gog-3d-box-prefs.ui \
@@ -99,7 +99,15 @@ EXTRA_DIST += \
gog-reg-curve-prefs.ui \
gog-reg-eqn-prefs.ui \
gog-series-labels-prefs.ui \
- gog-series-prefs.ui
+ gog-series-prefs.ui \
+ \
+ bar-none.png \
+ bar-vplus.png \
+ bar-vminus.png \
+ bar-vboth.png \
+ bar-hplus.png \
+ bar-hminus.png \
+ bar-hboth.png
if GOFFICE_WITH_LASEM
libgoffice_graph_la_SOURCES += gog-equation.c
diff --git a/pixmaps/bar-hboth.png b/goffice/graph/bar-hboth.png
similarity index 100%
rename from pixmaps/bar-hboth.png
rename to goffice/graph/bar-hboth.png
diff --git a/pixmaps/bar-hminus.png b/goffice/graph/bar-hminus.png
similarity index 100%
rename from pixmaps/bar-hminus.png
rename to goffice/graph/bar-hminus.png
diff --git a/pixmaps/bar-hplus.png b/goffice/graph/bar-hplus.png
similarity index 100%
rename from pixmaps/bar-hplus.png
rename to goffice/graph/bar-hplus.png
diff --git a/pixmaps/bar-none.png b/goffice/graph/bar-none.png
similarity index 100%
rename from pixmaps/bar-none.png
rename to goffice/graph/bar-none.png
diff --git a/pixmaps/bar-vboth.png b/goffice/graph/bar-vboth.png
similarity index 100%
rename from pixmaps/bar-vboth.png
rename to goffice/graph/bar-vboth.png
diff --git a/pixmaps/bar-vminus.png b/goffice/graph/bar-vminus.png
similarity index 100%
rename from pixmaps/bar-vminus.png
rename to goffice/graph/bar-vminus.png
diff --git a/pixmaps/bar-vplus.png b/goffice/graph/bar-vplus.png
similarity index 100%
rename from pixmaps/bar-vplus.png
rename to goffice/graph/bar-vplus.png
diff --git a/goffice/graph/gog-error-bar.c b/goffice/graph/gog-error-bar.c
index c51dce6..2850dc4 100644
--- a/goffice/graph/gog-error-bar.c
+++ b/goffice/graph/gog-error-bar.c
@@ -52,16 +52,31 @@ typedef struct {
double width, line_width;
} GogErrorBarEditor;
-static struct {
+static const struct {
char const *h_pixbuf;
char const *v_pixbuf;
char const *label;
GogErrorBarDisplay display;
} display_combo_desc[] = {
- {"bar-none.png", "bar-none.png", N_("None"), GOG_ERROR_BAR_DISPLAY_NONE},
- {"bar-hplus.png", "bar-vplus.png", N_("Positive"), GOG_ERROR_BAR_DISPLAY_POSITIVE},
- {"bar-hminus.png", "bar-vminus.png", N_("Negative"), GOG_ERROR_BAR_DISPLAY_NEGATIVE},
- {"bar-hboth.png", "bar-vboth.png", N_("Both"), GOG_ERROR_BAR_DISPLAY_BOTH}
+ {"res:go:graph/bar-none.png",
+ "res:go:graph/bar-none.png",
+ N_("None"),
+ GOG_ERROR_BAR_DISPLAY_NONE},
+
+ {"res:go:graph/bar-hplus.png",
+ "res:go:graph/bar-vplus.png",
+ N_("Positive"),
+ GOG_ERROR_BAR_DISPLAY_POSITIVE},
+
+ {"res:go:graph/bar-hminus.png",
+ "res:go:graph/bar-vminus.png",
+ N_("Negative"),
+ GOG_ERROR_BAR_DISPLAY_NEGATIVE},
+
+ {"res:go:graph/bar-hboth.png",
+ "res:go:graph/bar-vboth.png",
+ N_("Both"),
+ GOG_ERROR_BAR_DISPLAY_BOTH}
};
static void
diff --git a/pixmaps/Makefile.am b/pixmaps/Makefile.am
index 9b89cbd..5c3c6ab 100644
--- a/pixmaps/Makefile.am
+++ b/pixmaps/Makefile.am
@@ -40,12 +40,4 @@ dist_icon_DATA = \
polar.png \
scatter.xpm \
stock.xpm \
- surface.xpm \
- \
- bar-none.png \
- bar-vplus.png \
- bar-vminus.png \
- bar-vboth.png \
- bar-hplus.png \
- bar-hminus.png \
- bar-hboth.png
+ surface.xpm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]