Note: Please see main.py sourceat the end of this page.
This is a simple Python program.
Among the usual imports at the top is: import gtk.glade, which is required to import the .glade file.
The program has one class,
GladeTestApp, whose constructor creates the Hildon
Program and Hildon Window, imports the .glade file, assigns Glade
objects local names, reparents a widget, sets the Hildon program
menu from a Glade-defined menu, sets up signal handlers for user
events, and other things.
The class is instantiated as an object named
app, and it's
run()method is executed.
Let's start by examining how the constructor creates the Hildon Program and Hildon Window.