[gtk+] entrycompletion: set_property() should call property setters
- From: Pavel Holejsovsky <pholejs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] entrycompletion: set_property() should call property setters
- Date: Sun, 8 Apr 2012 10:12:21 +0000 (UTC)
commit 331bba1ad6c5d9535fc5a827b91019f5824e25a7
Author: Pavel Holejsovsky <pavel holejsovsky gmail com>
Date: Fri Mar 23 07:09:02 2012 +0100
entrycompletion: set_property() should call property setters
gtk_entry_completion_set_property() was setting many properties by
directly modifying priv values, bypassing notification invocation and
possibly another actions done by gtk_completion_entry_set_xxx ()
functions. Fix by invoking set_xxx() instead of setting the property
value directly.
The real bug observerd was that setting text-column property using
g_object_set() caused SIGFPE later when entry completion was about to
appear. gtk_entry_completion_set_text_column () apparently does way
more important things than just setting priv->text_column member.
https://bugzilla.gnome.org/show_bug.cgi?id=673693
gtk/gtkentrycompletion.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index 8367ed9..cb4aad6 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -651,27 +651,33 @@ gtk_entry_completion_set_property (GObject *object,
break;
case PROP_TEXT_COLUMN:
- priv->text_column = g_value_get_int (value);
+ gtk_entry_completion_set_text_column (completion,
+ g_value_get_int (value));
break;
case PROP_INLINE_COMPLETION:
- priv->inline_completion = g_value_get_boolean (value);
+ gtk_entry_completion_set_inline_completion (completion,
+ g_value_get_boolean (value));
break;
case PROP_POPUP_COMPLETION:
- priv->popup_completion = g_value_get_boolean (value);
+ gtk_entry_completion_set_popup_completion (completion,
+ g_value_get_boolean (value));
break;
case PROP_POPUP_SET_WIDTH:
- priv->popup_set_width = g_value_get_boolean (value);
+ gtk_entry_completion_set_popup_set_width (completion,
+ g_value_get_boolean (value));
break;
case PROP_POPUP_SINGLE_MATCH:
- priv->popup_single_match = g_value_get_boolean (value);
+ gtk_entry_completion_set_popup_single_match (completion,
+ g_value_get_boolean (value));
break;
case PROP_INLINE_SELECTION:
- priv->inline_selection = g_value_get_boolean (value);
+ gtk_entry_completion_set_inline_selection (completion,
+ g_value_get_boolean (value));
break;
case PROP_CELL_AREA:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]