[goffice] compilation: no more float.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [goffice] compilation: no more float.
- Date: Mon, 30 Nov 2009 02:50:05 +0000 (UTC)
commit 0611538cb6438f9241585b1c3b6fb67f6feb151c
Author: Morten Welinder <terra gnome org>
Date: Sun Nov 29 21:43:13 2009 -0500
compilation: no more float.
goffice/graph/gog-object.h | 1 -
plugins/plot_pie/gog-pie-prefs.c | 3 +-
plugins/plot_pie/gog-pie.c | 42 +++++++++++++++++++-------------------
plugins/plot_xy/gog-xy.c | 6 ++--
4 files changed, 25 insertions(+), 27 deletions(-)
---
diff --git a/goffice/graph/gog-object.h b/goffice/graph/gog-object.h
index 9339f04..d418362 100644
--- a/goffice/graph/gog-object.h
+++ b/goffice/graph/gog-object.h
@@ -49,7 +49,6 @@ struct _GogObjectRole {
union { /* allow people to tack some useful tidbits on the end */
int i;
- float f;
gpointer p;
} user;
};
diff --git a/plugins/plot_pie/gog-pie-prefs.c b/plugins/plot_pie/gog-pie-prefs.c
index 77a82ad..68dcd71 100644
--- a/plugins/plot_pie/gog-pie-prefs.c
+++ b/plugins/plot_pie/gog-pie-prefs.c
@@ -141,9 +141,8 @@ gog_pie_plot_pref_signal_connect (GogPiePlot *pie, GtkBuilder *gui)
static void
cb_update_editor (GogPiePlot *pie, PiePrefState *state)
{
- gfloat value;
-
if (state->separation_spinner != NULL) {
+ double value;
g_object_get (G_OBJECT (pie), "default-separation", &value, NULL);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (state->separation_spinner), value * 100.0);
}
diff --git a/plugins/plot_pie/gog-pie.c b/plugins/plot_pie/gog-pie.c
index 0eaa15d..0c45ae7 100644
--- a/plugins/plot_pie/gog-pie.c
+++ b/plugins/plot_pie/gog-pie.c
@@ -53,7 +53,7 @@ gog_pie_series_element_set_property (GObject *obj, guint param_id,
switch (param_id) {
case ELEMENT_SEPARATION:
- pse->separation = g_value_get_float (value);
+ pse->separation = g_value_get_double (value);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -71,7 +71,7 @@ gog_pie_series_element_get_property (GObject *obj, guint param_id,
switch (param_id) {
case ELEMENT_SEPARATION:
- g_value_set_float (value, pse->separation);
+ g_value_set_double (value, pse->separation);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
break;
@@ -106,7 +106,7 @@ gog_pie_series_element_class_init (GogPieSeriesElementClass *klass)
#endif
g_object_class_install_property (gobject_klass, ELEMENT_SEPARATION,
- g_param_spec_float ("separation",
+ g_param_spec_double ("separation",
_("Separation"),
_("Amount a slice is extended as a percentage of the radius"),
0, 1000, 0.,
@@ -193,10 +193,10 @@ gog_pie_plot_set_property (GObject *obj, guint param_id,
switch (param_id) {
case PLOT_PROP_INITIAL_ANGLE:
- pie->initial_angle = g_value_get_float (value);
+ pie->initial_angle = g_value_get_double (value);
break;
case PLOT_PROP_DEFAULT_SEPARATION: {
- double f = g_value_get_float (value);
+ double f = g_value_get_double (value);
pie->default_separation = CLAMP (f, 0., 5.);
break;
}
@@ -204,7 +204,7 @@ gog_pie_plot_set_property (GObject *obj, guint param_id,
pie->in_3d = g_value_get_boolean (value);
break;
case PLOT_PROP_SPAN:
- pie->span = g_value_get_float (value);
+ pie->span = g_value_get_double (value);
break;
case PLOT_PROP_SHOW_NEGS : {
GSList *ptr = GOG_PLOT (obj)->series;
@@ -234,16 +234,16 @@ gog_pie_plot_get_property (GObject *obj, guint param_id,
switch (param_id) {
case PLOT_PROP_INITIAL_ANGLE:
- g_value_set_float (value, pie->initial_angle);
+ g_value_set_double (value, pie->initial_angle);
break;
case PLOT_PROP_DEFAULT_SEPARATION:
- g_value_set_float (value, pie->default_separation);
+ g_value_set_double (value, pie->default_separation);
break;
case PLOT_PROP_IN_3D:
g_value_set_boolean (value, pie->in_3d);
break;
case PLOT_PROP_SPAN:
- g_value_set_float (value, pie->span);
+ g_value_set_double (value, pie->span);
break;
case PLOT_PROP_SHOW_NEGS:
g_value_set_string (value, gog_show_neg_mode_as_str (pie->show_negatives));
@@ -301,13 +301,13 @@ gog_pie_plot_class_init (GogPlotClass *plot_klass)
gog_klass->view_type = gog_pie_view_get_type ();
g_object_class_install_property (gobject_klass, PLOT_PROP_INITIAL_ANGLE,
- g_param_spec_float ("initial-angle",
+ g_param_spec_double ("initial-angle",
_("Initial angle"),
_("Degrees clockwise from 12 O'Clock."),
0, G_MAXFLOAT, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
g_object_class_install_property (gobject_klass, PLOT_PROP_DEFAULT_SEPARATION,
- g_param_spec_float ("default-separation",
+ g_param_spec_double ("default-separation",
_("Default separation"),
_("Default amount a slice is extended as a percentage of the radius"),
0, G_MAXFLOAT, 0.,
@@ -319,7 +319,7 @@ gog_pie_plot_class_init (GogPlotClass *plot_klass)
FALSE,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (gobject_klass, PLOT_PROP_SPAN,
- g_param_spec_float ("span",
+ g_param_spec_double ("span",
_("Span"),
_("Total angle used as a percentage of the full circle"),
10., 100., 100.,
@@ -385,7 +385,7 @@ gog_ring_plot_set_property (GObject *obj, guint param_id,
switch (param_id) {
case RING_PLOT_PROP_CENTER_SIZE:
- ring->center_size = g_value_get_float (value);
+ ring->center_size = g_value_get_double (value);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -405,7 +405,7 @@ gog_ring_plot_get_property (GObject *obj, guint param_id,
switch (param_id) {
case RING_PLOT_PROP_CENTER_SIZE:
- g_value_set_float (value, ring->center_size);
+ g_value_set_double (value, ring->center_size);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
break;
@@ -451,7 +451,7 @@ gog_ring_plot_class_init (GogPiePlotClass *pie_plot_klass)
#endif
g_object_class_install_property (gobject_klass, RING_PLOT_PROP_CENTER_SIZE,
- g_param_spec_float ("center-size",
+ g_param_spec_double ("center-size",
_("Center-size"),
_("Size of the center hole as a percentage of the radius"),
0, 100., 0.,
@@ -1040,10 +1040,10 @@ gog_pie_series_set_property (GObject *obj, guint param_id,
switch (param_id) {
case SERIES_PROP_INITIAL_ANGLE:
- pie->initial_angle = g_value_get_float (value);
+ pie->initial_angle = g_value_get_double (value);
break;
case SERIES_PROP_SEPARATION:
- pie->separation = g_value_get_float (value);
+ pie->separation = g_value_get_double (value);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
return; /* NOTE : RETURN */
@@ -1061,10 +1061,10 @@ gog_pie_series_get_property (GObject *obj, guint param_id,
switch (param_id) {
case SERIES_PROP_INITIAL_ANGLE:
- g_value_set_float (value, pie->initial_angle);
+ g_value_set_double (value, pie->initial_angle);
break;
case SERIES_PROP_SEPARATION:
- g_value_set_float (value, pie->separation);
+ g_value_set_double (value, pie->separation);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
break;
@@ -1119,13 +1119,13 @@ gog_pie_series_class_init (GObjectClass *gobject_klass)
gobject_klass->get_property = gog_pie_series_get_property;
g_object_class_install_property (gobject_klass, SERIES_PROP_INITIAL_ANGLE,
- g_param_spec_float ("initial-angle",
+ g_param_spec_double ("initial-angle",
_("Initial-angle"),
_("Degrees clockwise from 12 O'Clock"),
0, G_MAXFLOAT, 0.,
GSF_PARAM_STATIC | G_PARAM_READWRITE));
g_object_class_install_property (gobject_klass, SERIES_PROP_SEPARATION,
- g_param_spec_float ("separation",
+ g_param_spec_double ("separation",
_("Separation"),
_("Default amount a slice is extended as a percentage of the radius"),
0, G_MAXFLOAT, 0.,
diff --git a/plugins/plot_xy/gog-xy.c b/plugins/plot_xy/gog-xy.c
index 6c2da8b..7bea794 100644
--- a/plugins/plot_xy/gog-xy.c
+++ b/plugins/plot_xy/gog-xy.c
@@ -457,7 +457,7 @@ gog_bubble_plot_set_property (GObject *obj, guint param_id,
bubble->in_3d = g_value_get_boolean (value);
break;
case GOG_BUBBLE_PROP_SCALE :
- bubble->bubble_scale = g_value_get_float (value);
+ bubble->bubble_scale = g_value_get_double (value);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
@@ -486,7 +486,7 @@ gog_bubble_plot_get_property (GObject *obj, guint param_id,
g_value_set_boolean (value, bubble->in_3d);
break;
case GOG_BUBBLE_PROP_SCALE :
- g_value_set_float (value, bubble->bubble_scale);
+ g_value_set_double (value, bubble->bubble_scale);
break;
default: G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, param_id, pspec);
break;
@@ -530,7 +530,7 @@ gog_bubble_plot_class_init (GogPlotClass *plot_klass)
FALSE,
GSF_PARAM_STATIC | G_PARAM_READWRITE | GO_PARAM_PERSISTENT));
g_object_class_install_property (gobject_klass, GOG_BUBBLE_PROP_SCALE,
- g_param_spec_float ("bubble-scale",
+ g_param_spec_double ("bubble-scale",
_("Bubble scale"),
_("Fraction of default radius used for display"),
0., 3., 1.,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]