+2001-12-10 Bill Haneman <bill.haneman@sun.com>
+
+ * libspi/value.c:
+ Fixes for spi_value, use G_TYPE_DOUBLE for atk_value values (as
+ used by all current implementors of AtkValue), and coerce to
+ CORBA_float. (Proper general case fix may require change to Value.idl).
+
2001-12-09 Bill Haneman <bill.haneman@sun.com>
* cspi/spi.h:
#ifdef SPI_BRIDGE_DEBUG
GSignalQuery signal_query;
const gchar *name;
- gchar *s;
+ gchar *s, *s2;
g_signal_query (signal_hint->signal_id, &signal_query);
name = signal_query.signal_name;
+ s2 = g_type_name (G_OBJECT_TYPE (g_value_get_object (param_values + 0)));
s = atk_object_get_name (ATK_OBJECT (g_value_get_object (param_values + 0)));
- fprintf (stderr, "Received (property) signal %s:%s from object %s\n",
- g_type_name (signal_query.itype), name, s);
+ fprintf (stderr, "Received (property) signal %s:%s from object %s (gail %s)\n",
+ g_type_name (signal_query.itype), name, s, s2);
#endif
gobject = g_value_get_object (param_values + 0);
GObject *gobject;
GSignalQuery signal_query;
const gchar *name;
+#ifdef SPI_BRIDGE_DEBUG
+ gchar *s, *s2;
+#endif
g_signal_query (signal_hint->signal_id, &signal_query);
name = signal_query.signal_name;
#ifdef SPI_BRIDGE_DEBUG
- fprintf (stderr, "Received signal %s:%s\n",
- g_type_name (signal_query.itype), name);
+ s2 = g_type_name (G_OBJECT_TYPE (g_value_get_object (param_values + 0)));
+ s = atk_object_get_name (ATK_OBJECT (g_value_get_object (param_values + 0)));
+ fprintf (stderr, "Received signal %s:%s from object %s (gail %s)\n",
+ g_type_name (signal_query.itype), name, s, s2);
#endif
gobject = g_value_get_object (param_values + 0);
#ifdef SPI_BRIDGE_DEBUG
GSignalQuery signal_query;
const gchar *name;
- gchar *s;
+ gchar *s, *s2;
g_signal_query (signal_hint->signal_id, &signal_query);
name = signal_query.signal_name;
+ s2 = g_type_name (G_OBJECT_TYPE (g_value_get_object (param_values + 0)));
s = atk_object_get_name (ATK_OBJECT (g_value_get_object (param_values + 0)));
- fprintf (stderr, "Received (property) signal %s:%s from object %s\n",
- g_type_name (signal_query.itype), name, s);
+ fprintf (stderr, "Received (property) signal %s:%s from object %s (gail %s)\n",
+ g_type_name (signal_query.itype), name, s, s2);
#endif
gobject = g_value_get_object (param_values + 0);
GObject *gobject;
GSignalQuery signal_query;
const gchar *name;
+#ifdef SPI_BRIDGE_DEBUG
+ gchar *s, *s2;
+#endif
g_signal_query (signal_hint->signal_id, &signal_query);
name = signal_query.signal_name;
#ifdef SPI_BRIDGE_DEBUG
- fprintf (stderr, "Received signal %s:%s\n",
- g_type_name (signal_query.itype), name);
+ s2 = g_type_name (G_OBJECT_TYPE (g_value_get_object (param_values + 0)));
+ s = atk_object_get_name (ATK_OBJECT (g_value_get_object (param_values + 0)));
+ fprintf (stderr, "Received signal %s:%s from object %s (gail %s)\n",
+ g_type_name (signal_query.itype), name, s, s2);
#endif
gobject = g_value_get_object (param_values + 0);
* What we really need is a generic value API here
*/
- g_value_init (&gvalue, G_TYPE_FLOAT);
+ g_value_init (&gvalue, G_TYPE_DOUBLE);
atk_value_get_minimum_value (value, &gvalue);
- return (CORBA_float) g_value_get_float (&gvalue);
+ return (CORBA_float) g_value_get_double (&gvalue);
}
g_return_val_if_fail (value != NULL, 0.0);
- g_value_init (&gvalue, G_TYPE_FLOAT);
+ g_value_init (&gvalue, G_TYPE_DOUBLE);
atk_value_get_maximum_value (value, &gvalue);
- return (CORBA_float) g_value_get_float (&gvalue);
+ return (CORBA_float) g_value_get_double (&gvalue);
}
g_return_val_if_fail (value != NULL, 0.0);
- g_value_init (&gvalue, G_TYPE_FLOAT);
+ g_value_init (&gvalue, G_TYPE_DOUBLE);
atk_value_get_current_value (value, &gvalue);
- return (CORBA_float) g_value_get_float (&gvalue);
+ return (CORBA_float) g_value_get_double (&gvalue);
}
g_return_if_fail (avalue != NULL);
- g_value_init (&gvalue, G_TYPE_FLOAT);
- g_value_set_float (&gvalue, (gfloat) value);
+ g_value_init (&gvalue, G_TYPE_DOUBLE);
+ g_value_set_float (&gvalue, (gdouble) value);
atk_value_set_current_value (avalue, &gvalue);
}