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



commit 95ef48e8234e456fbb712bef919f485a10968312
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date:   Thu Sep 19 10:35:42 2013 -0300

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

 gladeui/glade-widget.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gladeui/glade-widget.c b/gladeui/glade-widget.c
index a1daddd..7ca924c 100644
--- a/gladeui/glade-widget.c
+++ b/gladeui/glade-widget.c
@@ -497,9 +497,14 @@ glade_widget_template_params (GladeWidget      *widget,
                        continue;
                }
 
-               if (g_param_values_cmp (pspec[i], 
-                                       glade_property->value, 
-                                       pclass->orig_def) == 0)
+               /* 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_property->widget->adaptor->type &&
+                   g_param_values_cmp (pspec[i],
+                                       glade_property->value,
+                                       pclass->orig_def) == 0)
                        continue;
 
 



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