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 626276 - gtk_tree_selection_set_select_function() should allow function to be NULL
gtk_tree_selection_set_select_function() should allow function to be NULL
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-08-06 21:35 UTC by Vadim Zeitlin
Modified: 2010-08-10 11:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vadim Zeitlin 2010-08-06 21:35:20 UTC
It's unexpected that while the initial selection function in GtkTreeSelection is NULL, you can't reset it back to NULL after setting it to a custom function temporarily. This basically means that once you called gtk_tree_selection_set_select_function() you can't ever undo it any more.

IMHO the

g_return_if_fail (func != NULL);

line in gtk_tree_selection_set_select_function() should simply be removed, the rest of the code already deals with NULL selection function just fine.