[goffice] Cleaned GOImage API
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Cleaned GOImage API
- Date: Fri, 28 Oct 2011 08:00:18 +0000 (UTC)
commit c9f2f21eea62af8956b88cff59d09197d4f99645
Author: Jean Brefort <jean brefort normalesup org>
Date: Fri Oct 28 09:59:57 2011 +0200
Cleaned GOImage API
ChangeLog | 21 ++++
goffice/canvas/goc-canvas.c | 2 +-
goffice/canvas/goc-canvas.h | 2 +-
goffice/canvas/goc-pixbuf.c | 2 +-
goffice/graph/gog-3d-box-prefs.ui | 6 +-
goffice/graph/gog-axis-prefs.ui | 158 ++++++++++++++++++++++++++-----
goffice/graph/gog-guru-type-selector.ui | 6 +-
goffice/utils/go-emf.c | 15 ++-
goffice/utils/go-emf.h | 4 +-
goffice/utils/go-image.c | 16 ++--
goffice/utils/go-image.h | 2 +-
goffice/utils/go-pixbuf.c | 2 +-
goffice/utils/go-pixbuf.h | 2 +-
goffice/utils/go-svg.c | 8 +-
goffice/utils/go-svg.h | 4 +-
plugins/plot_surface/gog-xyz-prefs.ui | 4 +-
16 files changed, 196 insertions(+), 58 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4198463..22dbdfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2011-10-28 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/canvas/goc-canvas.c (goc_canvas_get_bounds): fixed arguments type.
+ * goffice/canvas/goc-canvas.h: ditto.
+ * goffice/canvas/goc-pixbuf.c (goc_pixbuf_draw): cleaned.
+ * goffice/graph/gog-3d-box-prefs.ui: fixed GtkGrid spacing.
+ * goffice/graph/gog-axis-prefs.ui: ditto.
+ * goffice/graph/gog-guru-type-selector.ui: ditto.
+ * goffice/utils/go-emf.c (go_emf_new_from_file),
+ (go_emf_new_from_data): return GOImage*.
+ * goffice/utils/go-emf.h: ditto.
+ * goffice/utils/go-image.c (go_image_new_from_data): add an argument to
+ retrieve the type.
+ * goffice/utils/go-image.h: ditto.
+ * goffice/utils/go-pixbuf.c (go_pixbuf_new_from_pixbuf): return GOImage*.
+ * goffice/utils/go-pixbuf.h: ditto.
+ * goffice/utils/go-svg.c (go_svg_new_from_file),
+ (go_svg_new_from_data): ditto.
+ * goffice/utils/go-svg.h: ditto.
+ * plugins/plot_surface/gog-xyz-prefs.ui: fixed GtkGrid spacing.
+
2011-10-27 Andreas J. Guelzow <aguelzow pyrshep ca>
* goffice/utils/go-format.c (go_format_execute): add arg to call of
diff --git a/goffice/canvas/goc-canvas.c b/goffice/canvas/goc-canvas.c
index eab614e..7691be7 100644
--- a/goffice/canvas/goc-canvas.c
+++ b/goffice/canvas/goc-canvas.c
@@ -647,7 +647,7 @@ goc_canvas_render (GocCanvas *canvas, cairo_t *cr, double x0, double y0, double
}
void
-goc_canvas_get_bounds (GocCanvas *canvas, double *x0, double *y0, int *x1, int *y1)
+goc_canvas_get_bounds (GocCanvas *canvas, double *x0, double *y0, double *x1, double *y1)
{
goc_item_get_bounds (GOC_ITEM (canvas->root), x0, y0, x1, y1);
}
diff --git a/goffice/canvas/goc-canvas.h b/goffice/canvas/goc-canvas.h
index e6ab301..ca892a6 100644
--- a/goffice/canvas/goc-canvas.h
+++ b/goffice/canvas/goc-canvas.h
@@ -75,7 +75,7 @@ GocDirection goc_canvas_get_direction (GocCanvas *canvas);
void goc_canvas_w2c (GocCanvas *canvas, int x, int y, double *x_, double *y_);
void goc_canvas_c2w (GocCanvas *canvas, double x, double y, int *x_, int *y_);
void goc_canvas_render (GocCanvas *canvas, cairo_t *cr, double x0, double y0, double x1, double y1);
-void goc_canvas_get_bounds (GocCanvas *canvas, double *x0, double *y0, int *x1, int *y1);
+void goc_canvas_get_bounds (GocCanvas *canvas, double *x0, double *y0, double *x1, double *y1);
G_END_DECLS
diff --git a/goffice/canvas/goc-pixbuf.c b/goffice/canvas/goc-pixbuf.c
index 22a1422..b50c62d 100644
--- a/goffice/canvas/goc-pixbuf.c
+++ b/goffice/canvas/goc-pixbuf.c
@@ -184,7 +184,7 @@ goc_pixbuf_draw (GocItem const *item, cairo_t *cr)
if (pixbuf->pixbuf == NULL || pixbuf->width == 0. || pixbuf->height == 0.)
return;
- image = GO_IMAGE (go_pixbuf_new_from_pixbuf (pixbuf->pixbuf));
+ image = go_pixbuf_new_from_pixbuf (pixbuf->pixbuf);
if (pixbuf->width < 0.)
width = gdk_pixbuf_get_width (pixbuf->pixbuf);
else {
diff --git a/goffice/graph/gog-3d-box-prefs.ui b/goffice/graph/gog-3d-box-prefs.ui
index 125a6b0..b5cee07 100644
--- a/goffice/graph/gog-3d-box-prefs.ui
+++ b/goffice/graph/gog-3d-box-prefs.ui
@@ -20,10 +20,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
diff --git a/goffice/graph/gog-axis-prefs.ui b/goffice/graph/gog-axis-prefs.ui
index 3667984..f0f48e2 100644
--- a/goffice/graph/gog-axis-prefs.ui
+++ b/goffice/graph/gog-axis-prefs.ui
@@ -13,23 +13,12 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkAdjustment" id="start-adj">
- <property name="upper">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
- <object class="GtkAdjustment" id="end-adj">
- <property name="upper">100</property>
- <property name="value">100</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
<object class="GtkGrid" id="area-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
@@ -105,13 +94,19 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkGrid" id="axis-base-pref-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
@@ -130,6 +125,7 @@
<child>
<object class="GtkCheckButton" id="major-tick-out">
<property name="label" translatable="yes">_Outside</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -149,6 +145,7 @@
<child>
<object class="GtkCheckButton" id="major-tick-in">
<property name="label" translatable="yes">_Inside</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -168,6 +165,7 @@
<child>
<object class="GtkCheckButton" id="major-tick-labeled">
<property name="label" translatable="yes">_Show Labels</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -189,7 +187,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_top">6</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
@@ -208,6 +207,7 @@
<child>
<object class="GtkRadioButton" id="axis-low">
<property name="label" translatable="yes">_Low</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -228,6 +228,7 @@
<child>
<object class="GtkRadioButton" id="axis-high">
<property name="label" translatable="yes">_High</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -253,9 +254,11 @@
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkRadioButton" id="axis-cross">
<property name="label" translatable="yes">_Cross</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -298,6 +301,24 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -312,6 +333,7 @@
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
@@ -355,6 +377,24 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -363,6 +403,24 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -375,7 +433,8 @@
<object class="GtkGrid" id="minor-tick-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
@@ -394,6 +453,7 @@
<child>
<object class="GtkCheckButton" id="minor-tick-out">
<property name="label" translatable="yes">O_utside</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -413,6 +473,7 @@
<child>
<object class="GtkCheckButton" id="minor-tick-in">
<property name="label" translatable="yes">I_nside</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -437,13 +498,22 @@
<property name="height">3</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkGrid" id="axis-pref-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">12</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
@@ -493,8 +563,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkComboBoxText" id="map-type-combo">
<property name="visible">True</property>
@@ -527,6 +597,7 @@
<child>
<object class="GtkCheckButton" id="invert-axis">
<property name="label" translatable="yes">_Invert axis</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -546,8 +617,8 @@
<object class="GtkGrid" id="circular-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
@@ -617,6 +688,18 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
@@ -649,6 +732,30 @@
<property name="height">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <object class="GtkAdjustment" id="end-adj">
+ <property name="upper">100</property>
+ <property name="value">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
</object>
<object class="GtkListStore" id="model1">
<columns>
@@ -656,4 +763,9 @@
<column type="gchararray"/>
</columns>
</object>
+ <object class="GtkAdjustment" id="start-adj">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
</interface>
diff --git a/goffice/graph/gog-guru-type-selector.ui b/goffice/graph/gog-guru-type-selector.ui
index 3a48555..274e5d0 100644
--- a/goffice/graph/gog-guru-type-selector.ui
+++ b/goffice/graph/gog-guru-type-selector.ui
@@ -9,13 +9,15 @@
<property name="margin_top">6</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">24</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">24</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
- <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
<child>
<object class="GtkLabel" id="type_label">
<property name="visible">True</property>
diff --git a/goffice/utils/go-emf.c b/goffice/utils/go-emf.c
index e41d08e..90c8f05 100644
--- a/goffice/utils/go-emf.c
+++ b/goffice/utils/go-emf.c
@@ -39,7 +39,9 @@ typedef GOImageClass GOEmfClass;
static GObjectClass *parent_klass;
+#ifdef GOFFICE_EMF_SUPPORT
static gboolean go_emf_parse (GOEmf *emf, GsfInput *input, GError **error);
+#endif
static void
go_emf_save (GOImage *image, GsfXMLOut *output)
@@ -155,7 +157,7 @@ GSF_CLASS (GOEmf, go_emf,
go_emf_class_init, NULL,
GO_TYPE_IMAGE)
-GOEmf *
+GOImage *
go_emf_new_from_file (char const *filename, GError **error)
{
#ifdef GOFFICE_EMF_SUPPORT
@@ -189,18 +191,19 @@ go_emf_new_from_file (char const *filename, GError **error)
}
g_object_unref (input);
- return emf;
+ return image;
#else
return NULL;
#endif
}
-GOEmf *
+GOImage *
go_emf_new_from_data (char const *data, size_t length, GError **error)
{
#ifdef GOFFICE_EMF_SUPPORT
GOEmf *emf = NULL;
GsfInput *input = gsf_input_memory_new (data, length, FALSE);
+ GOImage *image;
if (input == NULL) {
if (error)
@@ -212,14 +215,14 @@ go_emf_new_from_data (char const *data, size_t length, GError **error)
emf->data_length = gsf_input_size (input);
if (!go_emf_parse (emf, input, error)) {
g_object_unref (emf);
- emf = NULL;
+ image = NULL;
} else {
- GOImage *image = GO_IMAGE (emf);
+ *image = GO_IMAGE (emf);
image->data = g_malloc (length);
memcpy (image->data, data, length);
}
g_object_unref (input);
- return emf;
+ return image;
#else
return NULL;
#endif
diff --git a/goffice/utils/go-emf.h b/goffice/utils/go-emf.h
index 6cd3960..f24c325 100644
--- a/goffice/utils/go-emf.h
+++ b/goffice/utils/go-emf.h
@@ -33,8 +33,8 @@ G_BEGIN_DECLS
GType go_emf_get_type (void);
-GOEmf *go_emf_new_from_file (char const *filename, GError **error);
-GOEmf *go_emf_new_from_data (char const *data, size_t length, GError **error);
+GOImage *go_emf_new_from_file (char const *filename, GError **error);
+GOImage *go_emf_new_from_data (char const *data, size_t length, GError **error);
G_END_DECLS
diff --git a/goffice/utils/go-image.c b/goffice/utils/go-image.c
index 49833e5..4cf1ded 100644
--- a/goffice/utils/go-image.c
+++ b/goffice/utils/go-image.c
@@ -193,7 +193,7 @@ go_image_build_pixbuf_format_infos (void)
* go_image_get_format_info:
* @format: a #GOImageFormat
*
- * Retrieves infromation associated to @format.
+ * Retrieves information associated to @format.
*
* returns: a #GOImageFormatInfo struct.
**/
@@ -426,10 +426,10 @@ go_image_new_from_file (char const *filename, GError **error)
g_free (name);
switch (format) {
case GO_IMAGE_FORMAT_SVG:
- return GO_IMAGE (go_svg_new_from_file (filename, error));
+ return go_svg_new_from_file (filename, error);
case GO_IMAGE_FORMAT_EMF:
case GO_IMAGE_FORMAT_WMF:
- return GO_IMAGE (go_emf_new_from_file (filename, error));
+ return go_emf_new_from_file (filename, error);
case GO_IMAGE_FORMAT_PDF:
case GO_IMAGE_FORMAT_PS:
case GO_IMAGE_FORMAT_EPS:
@@ -438,7 +438,7 @@ go_image_new_from_file (char const *filename, GError **error)
default: {
GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file (filename, error);
if (pixbuf) {
- GOImage *image = (GOImage *) go_pixbuf_new_from_pixbuf (pixbuf);
+ GOImage *image = go_pixbuf_new_from_pixbuf (pixbuf);
g_object_unref (pixbuf);
return image;
}
@@ -448,7 +448,7 @@ go_image_new_from_file (char const *filename, GError **error)
}
GOImage *
-go_image_new_from_data (char const *type, guint8 const *data, gsize length, GError **error)
+go_image_new_from_data (char const *type, guint8 const *data, gsize length, char **format, GError **error)
{
char *real_type = NULL;
GOImage *image = NULL;
@@ -460,12 +460,14 @@ go_image_new_from_data (char const *type, guint8 const *data, gsize length, GErr
}
g_return_val_if_fail (type != NULL, NULL);
if (!strcmp (type, "svg")) {
- image = GO_IMAGE (go_svg_new_from_data (data, length, error));
+ image = go_svg_new_from_data (data, length, error);
} else if (!strcmp (type, "emf") || !strcmp (type, "wmf")) {
- image = GO_IMAGE (go_emf_new_from_data (data, length, error));
+ image = go_emf_new_from_data (data, length, error);
} else {
/* FIXME: pixbuf */
}
+ if (format)
+ *format = g_strdup (type);
g_free (real_type);
return image;
}
diff --git a/goffice/utils/go-image.h b/goffice/utils/go-image.h
index 2d1b836..cdf42e1 100644
--- a/goffice/utils/go-image.h
+++ b/goffice/utils/go-image.h
@@ -95,7 +95,7 @@ GdkPixbuf *go_image_get_scaled_pixbuf (GOImage *image, int width, int heig
void go_image_draw (GOImage *image, cairo_t *cr);
GOImage *go_image_new_from_file (char const *filename, GError **error);
-GOImage *go_image_new_from_data (char const *type, guint8 const *data, gsize length, GError **error);
+GOImage *go_image_new_from_data (char const *type, guint8 const *data, gsize length, char **format, GError **error);
guint8 *go_image_get_pixels (GOImage *image);
void go_image_fill (GOImage *image, GOColor color);
diff --git a/goffice/utils/go-pixbuf.c b/goffice/utils/go-pixbuf.c
index 6a9a234..b767bff 100644
--- a/goffice/utils/go-pixbuf.c
+++ b/goffice/utils/go-pixbuf.c
@@ -464,7 +464,7 @@ GSF_CLASS (GOPixbuf, go_pixbuf,
GO_TYPE_IMAGE)
-GOPixbuf *
+GOImage *
go_pixbuf_new_from_pixbuf (GdkPixbuf *pixbuf)
{
return g_object_new (GO_TYPE_PIXBUF, "pixbuf", pixbuf, NULL);
diff --git a/goffice/utils/go-pixbuf.h b/goffice/utils/go-pixbuf.h
index 524969d..1b1a3bf 100644
--- a/goffice/utils/go-pixbuf.h
+++ b/goffice/utils/go-pixbuf.h
@@ -38,7 +38,7 @@ GdkPixbuf *go_gdk_pixbuf_tile (GdkPixbuf const *src,
GType go_pixbuf_get_type (void);
-GOPixbuf *go_pixbuf_new_from_pixbuf (GdkPixbuf *pixbuf);
+GOImage *go_pixbuf_new_from_pixbuf (GdkPixbuf *pixbuf);
int go_pixbuf_get_rowstride (GOPixbuf *pixbuf);
G_END_DECLS
diff --git a/goffice/utils/go-svg.c b/goffice/utils/go-svg.c
index 905d9cd..c50ba61 100644
--- a/goffice/utils/go-svg.c
+++ b/goffice/utils/go-svg.c
@@ -155,7 +155,7 @@ GSF_CLASS (GOSvg, go_svg,
GO_TYPE_IMAGE)
-GOSvg *
+GOImage *
go_svg_new_from_file (char const *filename, GError **error)
{
GOSvg *svg = g_object_new (GO_TYPE_SVG, NULL);
@@ -186,10 +186,10 @@ go_svg_new_from_file (char const *filename, GError **error)
rsvg_handle_get_dimensions (svg->handle, &dim);
image->width = dim.width;
image->height = dim.height;
- return svg;
+ return image;
}
-GOSvg *
+GOImage *
go_svg_new_from_data (char const *data, size_t length, GError **error)
{
GOSvg *svg;
@@ -217,5 +217,5 @@ go_svg_new_from_data (char const *data, size_t length, GError **error)
rsvg_handle_get_dimensions (svg->handle, &dim);
image->width = dim.width;
image->height = dim.height;
- return svg;
+ return image;
}
diff --git a/goffice/utils/go-svg.h b/goffice/utils/go-svg.h
index 2cadb24..c6e715e 100644
--- a/goffice/utils/go-svg.h
+++ b/goffice/utils/go-svg.h
@@ -33,8 +33,8 @@ G_BEGIN_DECLS
GType go_svg_get_type (void);
-GOSvg *go_svg_new_from_file (char const *filename, GError **error);
-GOSvg *go_svg_new_from_data (char const *data, size_t length, GError **error);
+GOImage *go_svg_new_from_file (char const *filename, GError **error);
+GOImage *go_svg_new_from_data (char const *data, size_t length, GError **error);
G_END_DECLS
diff --git a/plugins/plot_surface/gog-xyz-prefs.ui b/plugins/plot_surface/gog-xyz-prefs.ui
index 6adddef..0f28bf3 100644
--- a/plugins/plot_surface/gog-xyz-prefs.ui
+++ b/plugins/plot_surface/gog-xyz-prefs.ui
@@ -4,8 +4,8 @@
<object class="GtkTable" id="gog_xyz_prefs">
<property name="visible">True</property>
<property name="border_width">5</property>
- <property name="column_spacing">5</property>
- <property name="row_spacing">5</property>
+ <property name="column_spacing">12</property>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkCheckButton" id="transpose">
<property name="label" translatable="yes">Transpose</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]