[goffice] Fixed absence of scattered minmax plots in selector.



commit 134d64763b40637b204766457a5b9a6516b9c904
Author: Jean Brefort <jean brefort normalesup org>
Date:   Wed May 22 20:49:49 2013 +0200

    Fixed absence of scattered minmax plots in selector.

 goffice/utils/go-image.c          |    2 ++
 plugins/plot_xy/Makefile.am       |    2 +-
 plugins/plot_xy/minmax.xpm        |   24 ++++++++++++++++++++++++
 plugins/plot_xy/plot-types.xml.in |    1 +
 plugins/plot_xy/plugin.xml.in     |    3 +++
 5 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/goffice/utils/go-image.c b/goffice/utils/go-image.c
index aa34737..271f1e9 100644
--- a/goffice/utils/go-image.c
+++ b/goffice/utils/go-image.c
@@ -455,6 +455,8 @@ go_image_get_pixbuf_fb (GOImage *image)
                 "unknown_image", 100, 0, NULL);
        double dx, dy;
        int n;
+       if (placeholder == NULL)
+               return NULL;
        n = go_fake_floor (image->width / gdk_pixbuf_get_width (placeholder));
        dx = (image->width - n * gdk_pixbuf_get_width (placeholder)) / 2.;
        n = go_fake_floor (image->height / gdk_pixbuf_get_height (placeholder));
diff --git a/plugins/plot_xy/Makefile.am b/plugins/plot_xy/Makefile.am
index b3d9cb7..0d71052 100644
--- a/plugins/plot_xy/Makefile.am
+++ b/plugins/plot_xy/Makefile.am
@@ -22,7 +22,7 @@ if WITH_GTK
 xy_la_SOURCES  += gog-bubble-prefs.c
 endif
 
-plugin_resources = bubble.xpm color.xpm dropbar.xpm scatter.xpm
+plugin_resources = bubble.xpm color.xpm dropbar.xpm minmax.xpm scatter.xpm
 pofiles = $(wildcard $(top_srcdir)/po/*.po)
 
 plugin.xml: plugin.xml.in $(plugin_resources) $(pofiles) $(top_srcdir)/tools/resource-embedder
diff --git a/plugins/plot_xy/minmax.xpm b/plugins/plot_xy/minmax.xpm
new file mode 100644
index 0000000..ab63a16
--- /dev/null
+++ b/plugins/plot_xy/minmax.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static char * minmax_xpm[] = {
+"18 18 3 1",
+"      c None",
+".     c #000000",
+"+     c #0000C0",
+"                  ",
+"                  ",
+" .           +    ",
+" .           +    ",
+" .           +    ",
+" .           +    ",
+" .           +    ",
+" .         . +    ",
+" .         . +    ",
+" .   . +   . +    ",
+" .   . +   .      ",
+" .   . +   .      ",
+" .   . +          ",
+" .   . +          ",
+" .   .            ",
+" ................ ",
+"                  ",
+"                  "};
diff --git a/plugins/plot_xy/plot-types.xml.in b/plugins/plot_xy/plot-types.xml.in
index 5734444..bbcc03f 100644
--- a/plugins/plot_xy/plot-types.xml.in
+++ b/plugins/plot_xy/plot-types.xml.in
@@ -4,6 +4,7 @@
     <Family _name="Bubble"     sample_image_file="res:go:plot_xy/bubble.xpm" axis_set="xy"/>
     <Family _name="ColoredXY"  sample_image_file="res:go:plot_xy/color.xpm" axis_set="xy-color"/>
     <Family _name="DropBar"    sample_image_file="res:go:plot_xy/dropbar.xpm" axis_set="xy"/>
+       <Family _name="MinMax"  sample_image_file="res:go:plot_xy/minmax.xpm" axis_set="xy"/>
 
     <Type _name="XY Points" row="1" col="1"
          engine="GogXYPlot" family="XY"
diff --git a/plugins/plot_xy/plugin.xml.in b/plugins/plot_xy/plugin.xml.in
index 973142b..201f1e9 100644
--- a/plugins/plot_xy/plugin.xml.in
+++ b/plugins/plot_xy/plugin.xml.in
@@ -17,6 +17,9 @@
                         id="go:plot_xy/dropbar.xpm"
                         file="dropbar.xpm"/>
                <service type="resource"
+                        id="go:plot_xy/minmax.xpm"
+                        file="minmax.xpm"/>
+               <service type="resource"
                         id="go:plot_xy/scatter.xpm"
                         file="scatter.xpm"/>
 


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