After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 383407 - gtk_entry_set_text does not check for completion->priv->changed_id > 0
gtk_entry_set_text does not check for completion->priv->changed_id > 0
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-12-07 16:00 UTC by Paolo Maggi
Modified: 2006-12-07 17:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch against gtk-2-10 branch (2.16 KB, patch)
2006-12-07 16:07 UTC, Paolo Maggi
committed Details | Review

Description Paolo Maggi 2006-12-07 16:00:59 UTC
gtk_entry_set_text does not check for completion->priv->changed_id before calling
g_signal_handler_block (entry, completion->priv->changed_id) and g_signal_handler_unblock (entry, completion->priv->changed_id).

completion->priv->changed_id can be 0 when the property "popup-completion" of
GtkEntryCompletion is FALSE.

Furthermore, in  gtk_entry_completion_key_press,  g_signal_handler_block (widget, completion->priv->changed_id) is called before calling gtk_entry_set_text (widget, ...). This is not needed since the signal is already blocked inside set_text itself.

I'm going to post a patch for this bug.
Comment 1 Paolo Maggi 2006-12-07 16:07:42 UTC
Created attachment 77901 [details] [review]
Patch against gtk-2-10 branch
Comment 2 Matthias Clasen 2006-12-07 16:38:01 UTC
Thanks, please commit to both branches.
Comment 3 Paolo Maggi 2006-12-07 17:01:56 UTC
Committed to both branches.