GNOME Bugzilla – Bug 97505
handlebox snap_edge invalid inital value
Last modified: 2004-12-22 21:47:04 UTC
the snap_edge parameter is initialized to -1 to indicate an "unset" state. This value is not valid according to the type information, and consequently, you cannot revert snap_edge to the initial state using a property editor. This should be fixed by using an additional snap_edge_set property like we do in similar situations elsewhere.
Thu Nov 7 14:24:45 2002 Owen Taylor <otaylor@redhat.com> * gtk/gtkhandlebox.c: Add a snap_edge_set property to deal with the fact that we have an unset state for the snap_edge property. (Reported by Matthias Clasen #97505)
Documentation for struct GtkHandleBox says: ... gint snap_edge;A value of type GtkPosition type indicating snap edge for the widget. (See gtk_handle_box_set_snap_edge). The value of -1 indicates that this value has not been set. ... As far as I understand, it's impossible to get the value '-1' of the property 'snap_edge'. Is that correct? Try widget = gtk_handle_box_new (); gtk_object_get (GTK_OBJECT (widget), "snap-edge", &snap_edge, NULL); printf ("%d\n", snap_edge); If it's impossible to get -1, should the documentation be changed to reflect this?
-1 is used for set_snap_edge() / get_snap_edge(), but the property works differently, because a property of type GtkPositionType can't have a value of -1.