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 605333 - Confusing error in documentation
Confusing error in documentation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
2.19.x
Other All
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks: 612504
 
 
Reported: 2009-12-23 20:58 UTC by skypist
Modified: 2010-03-12 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Spell delete-event with hyphen and don't cast to G_OBJECT (11.36 KB, patch)
2010-01-05 09:06 UTC, Christian Dywan
committed Details | Review
Reword explanation of delete-event and destroy (1.10 KB, patch)
2010-01-05 09:09 UTC, Christian Dywan
committed Details | Review
Remove most remaining G_OBJECT casts (39.67 KB, patch)
2010-01-05 09:10 UTC, Christian Dywan
committed Details | Review

Description skypist 2009-12-23 20:58:46 UTC
Hello,

I am now studying GTK with the official tutorial. When I got to this page http://library.gnome.org/devel/gtk-tutorial/stable/x281.html I found something confusing there. Here it goes:

'Here are two examples of connecting a signal handler to an object, in this case, the window. Here, the "delete_event" and "destroy" signals are caught. The first is emitted when we use the window manager to kill the window, or when we use the gtk_widget_destroy() call passing in the window widget as the object to destroy. The second is emitted when, in the "delete_event" handler, we return FALSE.'

I guess that the author wanted to write 'The first is emmited when we use the window manager to kill the window. The second is emmited when we use the gtk_widget_destroy() call... or when in the "delete_event" handler we return FALSE.'

Instead of writing 'The first is emmited when A and the second - when B or C' he wrote 'The first is emmited when A or B and the second - when C', where
A = using the window manager to kill the window,
B = using gtk_widget_destroy(),
C = returning FALSE in the "delete_event".

I spent some time understanding what was wrong. I think it'd be nice to correct the sentence.
Comment 1 skypist 2009-12-23 21:08:41 UTC
I'd like to add that I checked if the "delete_event" is emitted when the gtk_widget_destroy() is called. The answer is NO: "delete_event" is emmited only during an attempt to close the window via the window manager. So the tutorial page needs to be corrected.
Comment 2 André Klapper 2010-01-03 12:05:04 UTC
Moving to GTK as this is an issue in GTK documentation but not in the library.gnome.org service.
Comment 3 Christian Dywan 2010-01-05 09:06:47 UTC
Created attachment 150823 [details] [review]
Spell delete-event with hyphen and don't cast to G_OBJECT
Comment 4 Christian Dywan 2010-01-05 09:09:39 UTC
Created attachment 150824 [details] [review]
Reword explanation of delete-event and destroy
Comment 5 Christian Dywan 2010-01-05 09:10:14 UTC
Created attachment 150825 [details] [review]
Remove most remaining G_OBJECT casts
Comment 6 Matthias Clasen 2010-01-07 06:23:01 UTC
I don't mind committing those fixes, but the tutorial is entirely outdated and needs a serious face-lift to become useful again.
Comment 7 Christian Dywan 2010-01-07 15:03:47 UTC
The way I see it, it's better to improve it partially than not at all because nobody has time to rewrite it. People use it, and don't realize wrong recommendations.
Comment 8 Javier Jardón (IRC: jjardon) 2010-01-09 14:10:24 UTC
I agree with Christian here: we can fix the actual tutorial until the rewrite is done
Comment 9 Christian Dywan 2010-03-12 20:07:53 UTC
I committed the above patches.