[glade3] * gladeui/glade-command.c: Fixed segfault introduced by my recent GladeProperty migration



commit 43db0e3a81653f7e0903b515abcfa7fa971f8941
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Jan 2 15:02:32 2011 +0900

    	* gladeui/glade-command.c: Fixed segfault introduced by my recent GladeProperty migration
    
    	* gladeui/glade-editor-property.c: Avoid infinite recursion when committing properties more
    	  aggressively (found that editing text properties now make some recursion for some reason).

 ChangeLog                       |    5 +++++
 gladeui/glade-command.c         |    2 +-
 gladeui/glade-editor-property.c |    3 +++
 3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e29134e..1bd0d74 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
 	* gladeui/glade-project.c: Fixed GladeProject to only ever report widgets that are
 	  actually in the project from the GtkTreeModel interface.
 
+	* gladeui/glade-command.c: Fixed segfault introduced by my recent GladeProperty migration
+
+	* gladeui/glade-editor-property.c: Avoid infinite recursion when committing properties more
+	  aggressively (found that editing text properties now make some recursion for some reason).
+
 2011-01-01  Tristan Van Berkom <tristanvb openismus com>
 
 	* gladeui/glade-command.[ch], Added GladeProject member to base command structure, now
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c
index 7508010..681c465 100644
--- a/gladeui/glade-command.c
+++ b/gladeui/glade-command.c
@@ -589,9 +589,9 @@ glade_command_set_property_description (GladeCommandSetProperty * me)
     description = g_strdup_printf (_("Setting multiple properties"));
   else
     {
+      sdata  = me->sdata->data;
       pclass = glade_property_get_class (sdata->property);
       widget = glade_property_get_widget (sdata->property);
-      sdata  = me->sdata->data;
       value_name = glade_widget_adaptor_string_from_value
           (GLADE_WIDGET_ADAPTOR (pclass->handle), pclass, sdata->new_value);
 
diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c
index 448b28c..bdc0ea4 100644
--- a/gladeui/glade-editor-property.c
+++ b/gladeui/glade-editor-property.c
@@ -108,6 +108,9 @@ glade_editor_property_commit_no_callback (GladeEditorProperty * eprop,
 {
   g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
 
+  if (eprop->committing)
+    return;
+
   g_signal_handler_block (G_OBJECT (eprop->property), eprop->changed_id);
   eprop->committing = TRUE;
   glade_editor_property_commit (eprop, value);



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