[glade3] * gladeui/glade-property.c: Fixed glade_property_dup() to not incidentally sync the property obj



commit c830b375aa7d60bc4c5b3e89d82eb8f983a0b8b7
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Fri Dec 31 13:36:59 2010 +0900

    	* gladeui/glade-property.c: Fixed glade_property_dup() to not incidentally sync the property
    	  object's value as a consequence of dupping (backend uses this to write properties with custom
    	  values and does not expect that).
    
    Conflicts:
    
    	ChangeLog
    	gladeui/glade-property.c

 ChangeLog                |    6 +++++-
 gladeui/glade-property.c |    5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2ee13c6..af7d984 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,11 @@
 	  bit of memory for large projects but no crashes.
 
 	* plugins/gtk+/glade-gtk.c: Fixed loaded state of use-action-appearance so that it always
-	  loads as FALSE if there is no "related-action" at load time.
+	  loads as FALSE if there is no "related-action" at load time (closes bug 582882).
+
+	* gladeui/glade-property.c: Fixed glade_property_dup() to not incidentally sync the property
+	  object's value as a consequence of dupping (backend uses this to write properties with custom
+	  values and does not expect that).
 
 2010-12-30  Tristan Van Berkom <tristanvb openismus com>
 
diff --git a/gladeui/glade-property.c b/gladeui/glade-property.c
index 2013ded..d4abfb5 100644
--- a/gladeui/glade-property.c
+++ b/gladeui/glade-property.c
@@ -109,8 +109,9 @@ glade_property_dup_impl (GladeProperty * template_prop, GladeWidget * widget)
   else
     g_value_copy (template_prop->value, property->value);
 
-  /* Need value in place here ... */
-  glade_property_set_enabled (property, template_prop->enabled);
+  property->enabled = template_prop->enabled;
+  property->state   = template_prop->state;
+
   glade_property_set_sensitive (property, template_prop->sensitive,
                                 template_prop->insensitive_tooltip);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]