diff options
author | Tristan Van Berkom <vantr@TheBully.local> | 2009-06-25 13:18:50 -0400 |
---|---|---|
committer | Tristan Van Berkom <vantr@TheBully.local> | 2009-06-25 13:18:50 -0400 |
commit | 3b6eacaae4d39bda870e41d3eb21843a386e82d8 (patch) | |
tree | ebee00dccdac418a9cb6a2cbf7327437bc8f0209 /gladeui/glade-property.c | |
parent | e9c9e54acfa0f9feb0a8560ea40abad78a8697e5 (diff) | |
download | glade-3b6eacaae4d39bda870e41d3eb21843a386e82d8.tar.gz |
Avoid updating widgets with properties floating outside the widget.
* gladeui/glade-property.c: glade_property_sync_impl(), dont sync properties
that are the primary property of that klass for the said widget (properties
can float outside of widget->properties in some cases, shouldnt effect the
widget though).
Diffstat (limited to 'gladeui/glade-property.c')
-rw-r--r-- | gladeui/glade-property.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c index 2fc118d6..6cecae8d 100644 --- a/gladeui/glade-property.c +++ b/gladeui/glade-property.c @@ -334,7 +334,6 @@ glade_property_get_value_impl (GladeProperty *property, GValue *value) static void glade_property_sync_impl (GladeProperty *property) { - /* Heh, here are the many reasons not to * sync a property ;-) */ @@ -351,6 +350,14 @@ glade_property_sync_impl (GladeProperty *property) property->widget == NULL) return; + /* Only the properties from widget->properties should affect the runtime widget. + * (other properties may be used for convenience in the plugin). + */ + if ((property->klass->packing && + property != glade_widget_get_pack_property (property->widget, property->klass->id)) || + property != glade_widget_get_property (property->widget, property->klass->id)) + return; + property->syncing++; /* In the case of construct_only, the widget instance must be rebuilt @@ -1014,7 +1021,7 @@ glade_property_read (GladeProperty *property, GladeProjectFormat fmt; GValue *gvalue = NULL; gchar /* *id, *name, */ *value; - gint translatable, has_context; + gint translatable = FALSE, has_context = FALSE; gchar *comment = NULL, *context = NULL; g_return_if_fail (GLADE_IS_PROPERTY (property)); |