Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the major changes in PyGTK-2 for GTK+ 2.2?

changes PyGTK
0
10 Posted

What are the major changes in PyGTK-2 for GTK+ 2.2?

0

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

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123