Ticket #15039: patch-gladeui-upstream.diff
File patch-gladeui-upstream.diff, 2.5 KB (added by dbevans (David B. Evans), 17 years ago) |
---|
-
gladeui/glade-editor-property.c
glade_editor_property_commit (GladeEdito 101 101 /* If the value was denied by a verify function, we'll have to 102 102 * reload the real value. 103 103 */ 104 if (g _param_values_cmp (eprop->property->klass->pspec,105 eprop->property->value, value) != 0)104 if (glade_property_class_values_cmp (eprop->property->klass, 105 eprop->property->value, value) != 0) 106 106 GLADE_EDITOR_PROPERTY_GET_CLASS (eprop)->load (eprop, eprop->property); 107 107 } 108 108 -
gladeui/glade-property-class.c
glade_property_class_void_value (GladePr 1578 1578 1579 1579 return FALSE; 1580 1580 } 1581 1582 /** 1583 * glade_property_class_values_cmp: 1584 * @klass: a #GladePropertyClass 1585 * @value1: a GValue of correct type for @klass 1586 * @value2: a GValue of correct type for @klass 1587 * 1588 * Compares value1 with value2 according to @klass. 1589 * 1590 * Returns: -1, 0 or +1, if value1 is found to be less than, 1591 * equal to or greater than value2, respectively. 1592 */ 1593 gint 1594 glade_property_class_values_cmp (GladePropertyClass *klass, 1595 GValue *value1, 1596 GValue *value2) 1597 { 1598 gint retval; 1599 1600 /* GLib does not know how to compare a boxed real value */ 1601 if (G_PARAM_SPEC_BOXED (klass->pspec)) 1602 { 1603 gchar *val1, *val2; 1604 1605 val1 = glade_property_class_make_string_from_gvalue (klass, value1), 1606 val2 = glade_property_class_make_string_from_gvalue (klass, value2); 1607 1608 retval = strcmp (val1, val2); 1609 1610 g_free (val1); 1611 g_free (val2); 1612 } 1613 else 1614 retval = g_param_values_cmp (klass->pspec, value1, value2); 1615 1616 return retval; 1617 } -
gladeui/glade-property-class.h
gboolean glade_property_class 214 214 gboolean glade_property_class_void_value (GladePropertyClass *klass, 215 215 GValue *value); 216 216 217 gint glade_property_class_values_cmp (GladePropertyClass *klass, 218 GValue *value1, 219 GValue *value2); 217 220 G_END_DECLS 218 221 219 222 #endif /* __GLADE_PROPERTY_CLASS_H__ */