[glade/glade-3-16] Added workaround for Bug 625867 "RadioButton information lost on cut+paste, add/remove parent, etc"



commit d013d66637140e64513d263e6c7fe983adb9df07
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Mon Sep 16 14:17:03 2013 -0300

    Added workaround for Bug 625867 "RadioButton information lost on cut+paste, add/remove parent, etc"

 gladeui/glade-widget.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index c95a1bc..2ea2457 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -627,9 +627,14 @@ glade_widget_template_params (GladeWidget * widget,
           continue;
         }
 
-      if (g_param_values_cmp (pspec[i],
+      /* We only check equality on properties introduced by the same class because
+       * others properties could change its default in a derivated class
+       * so its is better to transfer every property and reset them.
+       */
+      if (pspec[i]->owner_type == glade_widget_adaptor_get_object_type (adaptor) &&
+          g_param_values_cmp (pspec[i],
                               glade_property_inline_value (glade_property), 
-                             glade_property_class_get_original_default (pclass)) == 0)
+                              glade_property_class_get_original_default (pclass)) == 0)
         continue;
 
       /* Not sure if it's safe to use glade_property_get_value() instead as the 


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