What are the major changes in PyGTK-2 for GTK+ 2.2?
The new PyGTK-2 is not fully compatible with the old one. There are a few things you will need to do to convert your app: • Python 2.2 is required. • The old, non-object-oriented C module _gtkmodule.so (accessed normally using “import _gtk” does not exist any more; this code will have to be converted to use the classes provided by the new pygtk. • It is _strongly_ recommended that you use “import gtk” rather than “from gtk import *” • The Gtk and Gdk prefixes on classes are gone. This can be fairly easily fixed with simple search and replace operations (gtk.GtkFoo goes to gtk.Foo, and gtk.GdkFoo goes to gtk.gdk.Foo). • The GDK prefix for constants is gone and the GDK module is gone too. Now the constants are defined in the gtk.gdk module. For instance GDK_2BUTTON_PRESS is wrapped as gtk.gdk._2BUTTON_PRESS, and GDK_BUTTON_PRESS is gtk.gdk.BUTTON_PRESS. • Widgets are now new style Python 2.2 classes. This probably won’t affect anyone. • Widgets that are considered “broken” (as opposed to