GTK+/Gnome Application Development Errata

Unfortunately, my beautiful book contains mistakes... but on this page, I will tell you about them. Some of these errors may be fixed in the second press run of the book, but for now only the first run is available. Some of these are simple typos, others are technical screwups.

Please note that these are mistakes in the printed version of the book; the electronic version has its own special set of errors, but no errata page since I just fix the book itself. Note that the electronic version is lacking an editing pass that the printed book has undergone.

Clarifications

Some things the book tells you, that perhaps need more elaboration.

Throughout, if you're copying example code taken from GTK+ itself (such as the GtkBox code in the chapter on widgets), you might consider looking at the latest version of GTK+ in case bugs have been fixed.

In chapter 3, it tells you not to use gtk_widget_set_usize(). This is perhaps on overstatement; sometimes it's useful if a widget has no "natural" size, such as the height dimension of a list widget or the width of an entry widget. However, you should almost certainly avoid it for toplevel windows, and for container widgets in general. Use GtkTable, GtkBox, GtkAlignment, and the built-in alignment-like properties of GtkMisc to avoid the need to hardcode the size.

In section 3.4.5, it says that "strictly speaking, input functions are independent of the GTK+ main loop." This is misleading. Input functions are part of the glib main loop abstraction, which GTK+ uses. But they are not wrapped on the GTK+ level, while many of the glib main loop features are.

Havoc Pennington