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 753935 - Update example namespace and class names in GObject tutorial
Update example namespace and class names in GObject tutorial
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
2.45.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
: 705056 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-08-21 15:00 UTC by Philip Withnall
Modified: 2017-10-05 14:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
docs: Replace Maman in the tutorial with a more meaningful example (77.01 KB, patch)
2015-10-19 15:54 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2015-08-21 15:00:46 UTC
Maman is a very dated and unhelpful example namespace to use in the GObject tutorial. The reader can’t really relate to it at all.

How about changing it to something concrete like specialised file types? Perhaps a running example of a file previewer program called ‘Viewer’, which has a File class and subclasses for specialised file types it supports, like AudioFile or ImageFile. That would give examples like:
   VIEWER_TYPE_FILE
   VIEWER_TYPE_AUDIO_FILE
etc.

(Thanks to ebassi for this suggestion.)
Comment 1 Emmanuele Bassi (:ebassi) 2015-08-21 16:03:14 UTC
I think that is a good example.
Comment 2 Philip Withnall 2015-10-19 15:54:49 UTC
Created attachment 313672 [details] [review]
docs: Replace Maman in the tutorial with a more meaningful example

Change it to a running example of a file viewer application with a file
class and various derived classes and related interfaces. Hopefully the
reader can relate to this a little better than to their maman.
Comment 3 Emmanuele Bassi (:ebassi) 2015-10-19 17:55:47 UTC
Review of attachment 313672 [details] [review]:

Yes, please.

::: docs/reference/gobject/tut_gobject.xml
@@ +69,3 @@
 
+/* will create viewer_file_get_type and set viewer_file_parent_class */
+G_DEFINE_TYPE (ViewerFile, viewer_file, G_TYPE_OBJECT);

Coding style consistency: drop the trailing semi-colon.
Comment 4 Philip Withnall 2015-10-19 22:19:33 UTC
Pushed with the suggested change. Thanks for the review!

Attachment 313672 [details] pushed as bf33f1d - docs: Replace Maman in the tutorial with a more meaningful example
Comment 5 Philip Withnall 2017-10-05 14:37:03 UTC
*** Bug 705056 has been marked as a duplicate of this bug. ***