diff options
author | Tristan Van Berkom <tvb@src.gnome.org> | 2008-11-15 17:56:51 +0000 |
---|---|---|
committer | Tristan Van Berkom <tvb@src.gnome.org> | 2008-11-15 17:56:51 +0000 |
commit | 61746a3853a5d007cea9bff95e5ac512dafeca52 (patch) | |
tree | 4f03aa83de1ab2e2f4042556b06ab7e0033896e9 | |
parent | 2a1e635844e0e84b71cb083c6d9af9103230f6d0 (diff) | |
download | glade-61746a3853a5d007cea9bff95e5ac512dafeca52.tar.gz |
Fixed recursion in the eprops when updating values (due to exterior
* gladeui/glade-editor-property.[ch]: Fixed recursion in the eprops when
updating values (due to exterior callers calling ->load() when the project
changes for thier custom editors), this fixes glitches when editing multiline
text entries.
svn path=/trunk/; revision=2028
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gladeui/glade-editor-property.c | 7 | ||||
-rw-r--r-- | gladeui/glade-editor-property.h | 3 |
3 files changed, 15 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2008-11-15 Tristan Van Berkom <tvb@gnome.org> + + * gladeui/glade-editor-property.[ch]: Fixed recursion in the eprops when + updating values (due to exterior callers calling ->load() when the project + changes for thier custom editors), this fixes glitches when editing multiline + text entries. + 2008-11-12 Tristan Van Berkom <tvb@gnome.org> * gladeui/glade-utils.c: Refixed use of uninitialized variable (bug 559678). diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c index e438c951..10670d3f 100644 --- a/gladeui/glade-editor-property.c +++ b/gladeui/glade-editor-property.c @@ -123,7 +123,9 @@ glade_editor_property_commit_no_callback (GladeEditorProperty *eprop, g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop)); g_signal_handler_block (G_OBJECT (eprop->property), eprop->changed_id); + eprop->committing = TRUE; glade_editor_property_commit (eprop, value); + eprop->committing = FALSE; g_signal_handler_unblock (G_OBJECT (eprop->property), eprop->changed_id); } @@ -1647,9 +1649,7 @@ glade_eprop_text_buffer_changed (GtkTextBuffer *buffer, gtk_text_buffer_get_end_iter (buffer, &end); text = gtk_text_buffer_get_text (buffer, &start, &end, FALSE); - glade_eprop_text_changed_common (eprop, text, eprop->use_command); - g_free (text); } @@ -3457,6 +3457,9 @@ glade_editor_property_load (GladeEditorProperty *eprop, g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop)); g_return_if_fail (property == NULL || GLADE_IS_PROPERTY (property)); + if (eprop->committing) + return; + eprop->loading = TRUE; GLADE_EDITOR_PROPERTY_GET_CLASS (eprop)->load (eprop, property); eprop->loading = FALSE; diff --git a/gladeui/glade-editor-property.h b/gladeui/glade-editor-property.h index 348a03df..f05e42e2 100644 --- a/gladeui/glade-editor-property.h +++ b/gladeui/glade-editor-property.h @@ -109,6 +109,9 @@ struct _GladeEditorProperty gboolean loading; /* True during glade_editor_property_load calls, this * is used to avoid feedback from input widgets. */ + gboolean committing; /* True while the editor property itself is applying + * the property with glade_editor_property_commit_no_callback (). + */ gboolean use_command; /* Whether we should use the glade command interface * or skip directly to GladeProperty interface. |