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 97505 - handlebox snap_edge invalid inital value
handlebox snap_edge invalid inital value
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.1.x
Other other
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-11-02 19:34 UTC by Matthias Clasen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2002-11-02 19:34:22 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.
Comment 1 Owen Taylor 2002-11-07 19:41:00 UTC
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)
Comment 2 Vitaly Tishkov 2002-11-13 16:13:13 UTC
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?
Comment 3 Owen Taylor 2002-11-13 16:38:54 UTC
-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.