GNOME Bugzilla – Bug 530759
update the gobject tutorial to the XXI century
Last modified: 2008-07-18 17:55:32 UTC
the GObject tutorial is providing valuable information but using questionable examples that don't follow the 'best practises' approach that a tutorial should employ. the most glaring are: - lack of G_DEFINE_TYPE() usage - poor description of the instance private data set up - horrid dispose implementation - lack of finalize example - awful code style (should follow GObject and GTK+ for consistency) - signal ids exposed in the class structure - and accessed using a costly GET_CLASS() lookup the tutorial is also expressing personal thoughts that should not be imposed on the reader (the GObject initialization process *might* be complicated, but this is a tutorial inside the GObject documentation, so it's not good practise to say so to the user, especially since it cannot be changed).
Created attachment 110172 [details] [review] [PATCH] Fixes for the GObject tutorial initial attempt at cleaning up the GObject tutorial. the signals section is missing. diffstat -w 74 /tmp/gobject-tutorial-fixes.patch tut_gobject.xml | 310 ++++++++++++---------------- tut_gsignal.xml | 44 +-- tut_howto.xml | 551 ++++++++++++++++++++++++++------------------------ 3 files changed, 455 insertions(+), 450 deletions(-)
Created attachment 110186 [details] [review] [PATCH] Fixes for the GObject tutorial another attempt at fixing the tutorial. the signals section is beyond hope (actually: beyond despair); I sincerely hope nobody ever pointed a new user towards it and expected anything more than confusion. it needs to be rewritten - I'll try and come up with something sensible before the 2.18 release. the rest of the tutorial is mostly harmless; this new patch fixes the interfaces section, which was clearly copy and pasting existing code without changing it to fit the rest of the examples. diffstat -w 74 /tmp/gobject-tutorial-fixes.patch tut_gobject.xml | 310 ++++++------- tut_gsignal.xml | 44 - tut_howto.xml | 1171 ++++++++++++++++++++++++-------------------------- 3 files changed, 749 insertions(+), 776 deletions(-)
I notice an instance of missing-space-after-comma, other than that, it looks fine to me. Please commit.
2008-07-18 Matthias Clasen <mclasen@redhat.com> Bug 530759 – update the gobject tutorial to the XXI century * gobject/*: Some updates to the tutorial. Patch by Emmanuele Bassi.