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 71430 - Resurrect the tutorial
Resurrect the tutorial
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
1.3.x
Other other
: Normal normal
: ---
Assigned To: Tony Gale
Tony Gale
: 70605 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-02-14 01:08 UTC by Matthias Clasen
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
the patch (16.85 KB, patch)
2002-02-14 01:11 UTC, Matthias Clasen
none Details | Review

Description Matthias Clasen 2002-02-14 01:08:06 UTC
As a first step towards updating the tutorial and examples,
here is a first patch to make the examples compile (most of them 
even kind of work). I have only changed the included sources in
docs/tutorial/gtk-tut.sgml and fixed the extraction machinery in
examples/extract.{sh,awk}, so in order to make use of this patch,
do not use the example sources from cvs, extract them from the 
tutorial.

Here is an outline of what needs to be done IMO to get the tutorial
ready for 2.0.0:

a) make the examples compile with -Dxxx_DISABLE_DEPRECATED 

b) replace the examples for deprecated widgets with new examples for
   their nondeprecated counterparts (mainly textview and treeview).

c) go over the complete text and update it, including screenshots of
   all examples. Also make sure that the text stays in sync with the
   example changes done for a) and b). 

d) integrate into the build process, remove the examples sources 
   from cvs.
Comment 1 Matthias Clasen 2002-02-14 01:11:32 UTC
Created attachment 6712 [details] [review]
the patch
Comment 2 Owen Taylor 2002-02-14 21:18:35 UTC
Looks like a good plan, feel free to go ahead and start making
these changes.

I did notice that thee 'GdkDevice' part of your patch has 
a few things that need fixing:

+  if (event->button == 1 && pixmap != NULL) {
+    gdouble pressure;
+    gdk_device_get_axis (event->device, event->axes,
GDK_AXIS_PRESSURE, &pressure);
+    draw_brush (widget, event->device->source, event->x, event->y,
pressure);
+  }

This should be:

 This should be gdk_event_get_axis (event, GDK_AXIS_PRESSURE, &pressure);

And similarly for:

-      pressure = event->pressure;
+      pressure = 0;


Comment 3 Matthias Clasen 2002-02-14 22:32:39 UTC
I have committed the patch with your corrections.
Comment 4 Owen Taylor 2002-02-15 02:07:41 UTC
*** Bug 70605 has been marked as a duplicate of this bug. ***
Comment 5 Sven Neumann 2002-02-19 13:30:48 UTC
I had a look at the current state of the tutorial and I noticed that
the changes to make the code deprecation-clean might be good enough
for the compiler. They are however not good enough for a tutorial 
that is supposed to teach users good style. For example:

    g_signal_connect (GTK_OBJECT (window), "destroy",
                      GTK_SIGNAL_FUNC (destroy), NULL);

this was probably converted to the new API using sed. Of course it
should be

   g_signal_connect (G_OBJECT (window), "destroy",
                     G_CALLBACK (destroy), NULL);

since otherwise it will confuse people as hell.

Please let me know if you need help here.
Comment 6 Matthias Clasen 2002-02-19 17:23:30 UTC
Obviously, the casting macros should also be adjusted to give a
consistent look. Help of course very welcome - the tutorial is a
370-page trum, which is impossible to get through alone.

To coordinate things: my next steps would be to look at reducing
the progressbar example to something that works with the undeprecated
parts of the progressbar api, then move the examples for deprecated
or broken widgets to a new "Deprecated Widgets" chapter - or would
you think that it would be better to remove them completely ?
Comment 7 Sven Neumann 2002-02-19 18:01:38 UTC
I agree that the deprecated stuff should be moved. It would also be
nice to give some hints on what should be used instead. Removing them
is not a good idea IMHO. I'll look into changing the g_signal
occurences now.
Comment 8 Owen Taylor 2002-02-20 15:46:26 UTC
I'd think we should remove the deprecated stuff entirely ... a
tutorial isn't supposed to be comprehensive; it's supposed
to teach people how to program with GTK+.
Comment 9 Havoc Pennington 2002-02-21 05:16:54 UTC
BTW, I would personally love to see the tutorial integrated into the
reference manual (and have links to relevant reference sections
throughout). Tutorial could be between the "GTK+ Overview" and "GTK+
Core Reference" sections.

Having all the docs in one place with xrefs among all the pieces is
really useful.
Comment 10 Matthias Clasen 2002-02-21 08:23:28 UTC
That is probably a good idea, should help to cut down on the 
doc duplication and make it easier to have all docs uptodate.

But I won't have time to do that for 2.0. Maybe for 2.2.

Btw, the deprectated stuff is mostly out of the tutorial as of 
last night. 

Unfortunately, the two showpieces of 2.0, the new textview and
treeview, are currently not covered at all in tutorial.
If anybody wants to help...
Comment 11 Owen Taylor 2002-03-20 20:45:07 UTC
Moving docs bugs from 2.0.1 => 2.0.2
Comment 12 Matthias Clasen 2002-04-05 13:35:36 UTC
Move open bugs from milestones 2.0.[012] -- > 2.0.3, since 2.0.2 is already out.
Comment 13 Matthias Clasen 2002-12-23 23:05:01 UTC
Move remaining 2.2.0 bugs to 2.2.1.
Comment 14 Matthias Clasen 2003-06-10 09:57:30 UTC
Move remaining bugs off 2.2.2 target milestone.
Comment 15 Matthias Clasen 2003-08-27 08:06:25 UTC
Move remaining bugs off the 2.2.3 milestone
Comment 16 Tony Gale 2003-08-27 08:15:34 UTC
The issues discussed in this report are mostly resolved. Except:

1. New screenshots
2. No one has contributed textview/treeview sections.
Comment 17 Owen Taylor 2004-03-05 16:02:25 UTC
Going to close this one; I don't think it is tracking anything
useful any more.