Index: src/mlx/gui/acars.py
===================================================================
--- src/mlx/gui/acars.py	(revision 996)
+++ src/mlx/gui/acars.py	(revision 747)
@@ -1,9 +1,9 @@
 
-from .common import *
+from common import *
 
 from mlx.i18n import xstr
 import mlx.const as const
 
-from . import cef
+import cef
 
 #------------------------------------------------------------------------------
@@ -18,5 +18,5 @@
 #------------------------------------------------------------------------------
 
-class ACARS(Gtk.VBox):
+class ACARS(gtk.VBox):
     """The flight info tab."""
     # The URL of the ACARS map
Index: src/mlx/gui/bugreport.py
===================================================================
--- src/mlx/gui/bugreport.py	(revision 999)
+++ src/mlx/gui/bugreport.py	(revision 492)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 from mlx.i18n import xstr
@@ -18,5 +18,5 @@
 #------------------------------------------------------------------------------
 
-class BugReportDialog(Gtk.Dialog):
+class BugReportDialog(gtk.Dialog):
     """The dialog to report a bug."""
     def __init__(self, gui):
@@ -24,8 +24,8 @@
                                               xstr("bugreport_title"),
                                               gui.mainWindow,
-                                              Gtk.DialogFlags.MODAL)
+                                              DIALOG_MODAL)
 
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
-        self._sendButton = self.add_button(xstr("button_send"), Gtk.ResponseType.ACCEPT)
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
+        self._sendButton = self.add_button(xstr("button_send"), RESPONSETYPE_ACCEPT)
         self._sendButton.set_can_default(True)
         self._gui = gui
@@ -33,5 +33,5 @@
         contentArea = self.get_content_area()
 
-        contentAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        contentAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                          xscale = 0.0, yscale = 0.0)
         contentAlignment.set_padding(padding_top = 4, padding_bottom = 16,
@@ -40,8 +40,8 @@
         contentArea.pack_start(contentAlignment, False, False, 0)
 
-        contentVBox = Gtk.VBox()
+        contentVBox = gtk.VBox()
         contentAlignment.add(contentVBox)
 
-        label = Gtk.Label(xstr("bugreport_summary"))
+        label = gtk.Label(xstr("bugreport_summary"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -49,5 +49,5 @@
         contentVBox.pack_start(label, False, False, 4)
 
-        self._summary = summary = Gtk.Entry()
+        self._summary = summary = gtk.Entry()
         summary.connect("changed", self._summaryChanged)
         summary.set_tooltip_text(xstr("bugreport_summary_tooltip"))
@@ -56,5 +56,5 @@
         contentVBox.pack_start(summary, True, True, 4)
 
-        label = Gtk.Label(xstr("bugreport_description"))
+        label = gtk.Label(xstr("bugreport_description"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -62,25 +62,24 @@
         contentVBox.pack_start(label, False, False, 4)
 
-        self._description = description = Gtk.TextView()
+        self._description = description = gtk.TextView()
         description.set_tooltip_text(xstr("bugreport_description_tooltip"))
-        description.set_wrap_mode(Gtk.WrapMode.WORD)
+        description.set_wrap_mode(WRAP_WORD)
         label.set_mnemonic_widget(description)
 
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(description)
         scrolledWindow.set_size_request(-1, 200)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(SHADOW_IN)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0, xscale = 1.0, yscale = 1.0)
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.0, xscale = 1.0, yscale = 1.0)
         alignment.add(scrolledWindow)
 
         contentVBox.pack_start(alignment, True, True, 4)
 
-        emailBox = Gtk.HBox()
+        emailBox = gtk.HBox()
         contentVBox.pack_start(emailBox, False, False, 4)
 
-        label = Gtk.Label(xstr("bugreport_email"))
+        label = gtk.Label(xstr("bugreport_email"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -88,8 +87,8 @@
         emailBox.pack_start(label, False, False, 0)
 
-        alignment = Gtk.Alignment()
+        alignment = gtk.Alignment()
         emailBox.pack_start(alignment, False, False, 8)
 
-        self._email = email = Gtk.Entry()
+        self._email = email = gtk.Entry()
         email.set_tooltip_text(xstr("bugreport_email_tooltip"))
         label.set_mnemonic_widget(email)
@@ -106,6 +105,6 @@
         response = super(BugReportDialog, self).run()
 
-        print("response", response, Gtk.ResponseType.ACCEPT)
-        if response==Gtk.ResponseType.ACCEPT:
+        print "response", response, RESPONSETYPE_ACCEPT
+        if response==RESPONSETYPE_ACCEPT:
             self._send()
         else:
@@ -127,8 +126,9 @@
                                      descriptionBuffer.get_end_iter(),
                                      False)
+        description = text2unicode(description)
         self.set_sensitive(False)
-        self._gui.sendBugReport(self._summary.get_text(),
+        self._gui.sendBugReport(text2unicode(self._summary.get_text()),
                                 description,
-                                self._email.get_text(),
+                                text2unicode(self._email.get_text()),
                                 self._bugReportSent)
 
Index: src/mlx/gui/callouts.py
===================================================================
--- src/mlx/gui/callouts.py	(revision 999)
+++ src/mlx/gui/callouts.py	(revision 300)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 from mlx.i18n import xstr
@@ -27,5 +27,5 @@
 #------------------------------------------------------------------------------
 
-class ApproachCalloutsEditor(Gtk.Dialog):
+class ApproachCalloutsEditor(gtk.Dialog):
     """The dialog to edit the approach callouts."""
     integerRE = re.compile("[0-9]+")
@@ -54,8 +54,8 @@
                                                      xstr("callouts_title"),
                                                      gui.mainWindow,
-                                                     Gtk.DialogFlags.MODAL)
-
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
-        self.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
+                                                     DIALOG_MODAL)
+
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
+        self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
 
         self._gui = gui
@@ -67,18 +67,18 @@
 
         # FIXME: common code with the checklist editor
-        typeBox = Gtk.HBox()
-
-        label = Gtk.Label(xstr("callouts_aircraftType"))
+        typeBox = gtk.HBox()
+
+        label = gtk.Label(xstr("callouts_aircraftType"))
         label.set_use_underline(True)
 
         typeBox.pack_start(label, False, False, 4)
 
-        self._aircraftTypeModel = Gtk.ListStore(str, int)
+        self._aircraftTypeModel = gtk.ListStore(str, int)
         for type in const.aircraftTypes:
             name = aircraftNames[type] if type in aircraftNames \
                    else "Aircraft type #%d" % (type,)
             self._aircraftTypeModel.append([name, type])
-        self._aircraftType = Gtk.ComboBox(model = self._aircraftTypeModel)
-        renderer = Gtk.CellRendererText()
+        self._aircraftType = gtk.ComboBox(model = self._aircraftTypeModel)
+        renderer = gtk.CellRendererText()
         self._aircraftType.pack_start(renderer, True)
         self._aircraftType.add_attribute(renderer, "text", 0)
@@ -90,5 +90,5 @@
         typeBox.pack_start(self._aircraftType, True, True, 4)
 
-        typeBoxAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        typeBoxAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                          xscale = 0.0, yscale = 0.0)
         typeBoxAlignment.set_size_request(400, -1)
@@ -98,8 +98,8 @@
         # FIXME: common code until here, but note that some texts are different
 
-        contentBox = Gtk.HBox()        
-
-        controlBox = Gtk.VBox()
-        controlAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        contentBox = gtk.HBox()        
+
+        controlBox = gtk.VBox()
+        controlAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                          xscale = 0.0, yscale = 0.0)
         controlAlignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -108,9 +108,9 @@
         contentBox.pack_start(controlAlignment, False, False, 0)
 
-        self._addButton = Gtk.Button(xstr("callouts_add"))
+        self._addButton = gtk.Button(xstr("callouts_add"))
         self._addButton.set_use_underline(True)
         self._addButton.set_tooltip_text(xstr("callouts_add_tooltip"))
         self._addButton.connect("clicked", self._addButtonClicked)
-        addAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        addAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                      xscale = 0.0, yscale = 0.0)
         addAlignment.set_padding(padding_top = 24, padding_bottom = 0,
@@ -119,5 +119,5 @@
         controlBox.pack_start(addAlignment, False, False, 0)
 
-        self._removeButton = Gtk.Button(xstr("callouts_remove"))
+        self._removeButton = gtk.Button(xstr("callouts_remove"))
         self._removeButton.set_use_underline(True)
         self._removeButton.set_tooltip_text(xstr("callouts_remove_tooltip"))
@@ -125,5 +125,5 @@
         self._removeButton.connect("clicked", self._removeButtonClicked)
 
-        removeAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        removeAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                         xscale = 0.0, yscale = 0.0)
         removeAlignment.set_padding(padding_top = 24, padding_bottom = 0,
@@ -132,6 +132,6 @@
         controlBox.pack_start(removeAlignment, False, False, 0)
 
-        self._fileListModel = Gtk.ListStore(int, str, str)
-        self._fileListModel.set_sort_column_id(0, Gtk.SortType.DESCENDING)
+        self._fileListModel = gtk.ListStore(int, str, str)
+        self._fileListModel.set_sort_column_id(0, SORT_DESCENDING)
 
         self._addingFile = False
@@ -139,14 +139,14 @@
         self._lastAddedAltitude = None
         
-        self._fileList = Gtk.TreeView(model = self._fileListModel)
-
-        renderer = Gtk.CellRendererSpin()
+        self._fileList = gtk.TreeView(model = self._fileListModel)
+
+        renderer = gtk.CellRendererSpin()
         renderer.set_property("editable", True)
 
-        adjustment = Gtk.Adjustment(0, 0, 5000, 10, 100)
+        adjustment = gtk.Adjustment(0, 0, 5000, 10, 100)
         renderer.set_property("adjustment", adjustment);
         renderer.connect("edited", self._altitudeEdited)
         
-        column = Gtk.TreeViewColumn(xstr("callouts_header_altitude"),
+        column = gtk.TreeViewColumn(xstr("callouts_header_altitude"),
                                     renderer, text = 0)
         self._fileList.append_column(column)
@@ -156,9 +156,9 @@
         column.set_sort_indicator(True)
         column.set_sort_column_id(0)
-        column.set_sort_order(Gtk.SortType.DESCENDING)
+        column.set_sort_order(SORT_DESCENDING)
         column.set_expand(False)
 
-        column = Gtk.TreeViewColumn(xstr("callouts_header_path"),
-                                    Gtk.CellRendererText(), text = 1)
+        column = gtk.TreeViewColumn(xstr("callouts_header_path"),
+                                    gtk.CellRendererText(), text = 1)
         self._fileList.append_column(column)
         column.set_expand(True)
@@ -173,17 +173,16 @@
                                self._fileListButtonPressed)
         selection = self._fileList.get_selection()
-        selection.set_mode(Gtk.SelectionMode.MULTIPLE)
+        selection.set_mode(SELECTION_MULTIPLE)
         selection.connect("changed", self._fileListSelectionChanged)
 
         self._buildFileListPopupMenu()
 
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(self._fileList)
         scrolledWindow.set_size_request(300, -1)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
-        
-        fileListAlignment = Gtk.Alignment(xscale=1.0, yscale=1.0, 
+        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(SHADOW_IN)
+        
+        fileListAlignment = gtk.Alignment(xscale=1.0, yscale=1.0, 
                                           xalign=0.5, yalign=0.5)
         fileListAlignment.set_padding(padding_top = 0, padding_bottom = 16,
@@ -205,9 +204,9 @@
         self.hide()
 
-        if response==Gtk.ResponseType.ACCEPT:
+        if response==RESPONSETYPE_ACCEPT:
             self._saveApproachCallouts()
             config = self._gui.config
             for (aircraftType, approachCallouts) in \
-                    self._approachCallouts.items():
+                    self._approachCallouts.iteritems():
                 config.setApproachCallouts(aircraftType, approachCallouts)
             config.save()
@@ -226,5 +225,5 @@
         dialog.hide()
 
-        if result==Gtk.ResponseType.OK:
+        if result==RESPONSETYPE_OK:
             filePath = dialog.get_filename()
             baseName = os.path.basename(filePath)
@@ -240,5 +239,5 @@
         Makes the treeview to edit the altitude in the given row."""
         if self._addingFile:
-            GObject.idle_add(self._selectFile)
+            gobject.idle_add(self._selectFile)
             self._fileList.grab_focus()
             self.grab_focus()
@@ -293,11 +292,11 @@
         otherPath = self._hasAltitude(newAltitude, ignorePath = editedPath)
         if otherPath is not None:
-            dialog = Gtk.MessageDialog(parent = self,
-                                       type = Gtk.MessageType.QUESTION,
+            dialog = gtk.MessageDialog(parent = self,
+                                       type = MESSAGETYPE_QUESTION,
                                        message_format =
                                        xstr("callouts_altitude_clash"))
             dialog.format_secondary_markup(xstr("callouts_altitude_clash_sec"))
-            dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
-            dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
+            dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
+            dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
             dialog.set_title(WINDOW_TITLE_BASE)
 
@@ -305,5 +304,5 @@
             dialog.hide()
 
-            if result!=Gtk.ResponseType.YES:
+            if result!=RESPONSETYPE_YES:
                 newAltitude = None
                 
@@ -347,10 +346,10 @@
         If it does not exist yet, it will be created."""
         if self._fileOpenDialog is None:
-            dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+            dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                            xstr("callouts_open_title"),
-                                           action = Gtk.FileChooserAction.OPEN,
-                                           buttons = (Gtk.STOCK_CANCEL,
-                                                      Gtk.ResponseType.CANCEL,
-                                                      Gtk.STOCK_OK, Gtk.ResponseType.OK),
+                                           action = FILE_CHOOSER_ACTION_OPEN,
+                                           buttons = (gtk.STOCK_CANCEL,
+                                                      RESPONSETYPE_CANCEL,
+                                                      gtk.STOCK_OK, RESPONSETYPE_OK),
                                            parent = self)
             dialog.set_modal(True)            
@@ -359,5 +358,5 @@
             # FIXME: create the filters in one location and use them
             # from there
-            filter = Gtk.FileFilter()
+            filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_audio"))
             filter.add_pattern("*.wav")
@@ -365,5 +364,5 @@
             dialog.add_filter(filter)
 
-            filter = Gtk.FileFilter()
+            filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_all"))
             filter.add_pattern("*.*")
@@ -390,5 +389,5 @@
         if altitude is not None: return altitude
 
-        descending = self._fileList.get_column(0).get_sort_order()==Gtk.SortType.DESCENDING
+        descending = self._fileList.get_column(0).get_sort_order()==SORT_DESCENDING
         model = self._fileListModel
         numEntries = model.iter_n_children(None)
@@ -474,15 +473,18 @@
     def _fileListButtonPressed(self, widget, event):
         """Called when a mouse button is pressed on the file list."""
-        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3:
+        if event.type!=EVENT_BUTTON_PRESS or event.button!=3:
             return
 
         menu = self._fileListPopupMenu
-        menu.popup(None, None, None, None, event.button, event.time)
+        if pygobject:
+            menu.popup(None, None, None, None, event.button, event.time)
+        else:
+            menu.popup(None, None, None, event.button, event.time)
 
     def _buildFileListPopupMenu(self):
         """Build the file list popup menu."""
-        menu = Gtk.Menu()
-
-        menuItem = Gtk.MenuItem()
+        menu = gtk.Menu()
+
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("callouts_remove"))
         menuItem.set_use_underline(True)
Index: src/mlx/gui/cef.py
===================================================================
--- src/mlx/gui/cef.py	(revision 997)
+++ src/mlx/gui/cef.py	(revision 915)
@@ -1,3 +1,3 @@
-from .common import *
+from common import *
 
 from mlx.util import secondaryInstallation
@@ -10,12 +10,11 @@
 import os
 import re
-import _thread
+import thread
 import threading
 import tempfile
 import traceback
-import ctypes
-import urllib.request, urllib.error, urllib.parse
+import urllib2
 from lxml import etree
-from io import StringIO
+from StringIO import StringIO
 import lxml.html
 
@@ -101,5 +100,5 @@
     def call(self, plan, getCredentials, updateProgress, htmlFilePath):
         """Call SimBrief with the given plan."""
-        self._timeoutID = GObject.timeout_add(120*1000, self._timedOut)
+        self._timeoutID = gobject.timeout_add(120*1000, self._timedOut)
 
         self._plan = plan
@@ -113,9 +112,9 @@
                              SIMBRIEF_RESULT_NONE, None)
 
-    def _onLoadEnd(self, browser, frame, http_code):
+    def _onLoadEnd(self, browser, frame, httpCode):
         """Called when a page has been loaded in the SimBrief browser."""
         url = frame.GetUrl()
-        print("gui.cef.SimBriefHandler._onLoadEnd", http_code, url)
-        if http_code>=300:
+        print "gui.cef.SimBriefHandler._onLoadEnd", httpCode, url
+        if httpCode>=300:
             self._updateProgress(self._lastProgress,
                                  SIMBRIEF_RESULT_ERROR_OTHER, None)
@@ -128,7 +127,7 @@
 
             js = "form=document.getElementById(\"sbapiform\");"
-            for (name, value) in self._plan.items():
+            for (name, value) in self._plan.iteritems():
                 js += "form." + name + ".value=\"" + value + "\";"
-            for (name, value) in SimBriefHandler._querySettings.items():
+            for (name, value) in SimBriefHandler._querySettings.iteritems():
                 if isinstance(value, bool):
                     js += "form." + name + ".checked=" + \
@@ -176,6 +175,6 @@
 
             thread = threading.Thread(target = self._getResults, args = (link,))
-            _thread.daemon = True
-            _thread.start()
+            thread.daemon = True
+            thread.start()
         else:
             self._updateProgress(SIMBRIEF_PROGRESS_RETRIEVING_BRIEFING,
@@ -195,10 +194,8 @@
         self._lastProgress = progress
         if results!=SIMBRIEF_RESULT_NONE:
-            if self._timeoutID is not None:
-                GObject.source_remove(self._timeoutID)
+            gobject.source_remove(self._timeoutID)
             self._plan = None
 
-        if self._updateProgressFn is not None:
-            self._updateProgressFn(progress, results, flightInfo)
+        self._updateProgressFn(progress, results, flightInfo)
 
     def _timedOut(self):
@@ -222,5 +219,5 @@
 
         # Obtaining the xml
-        response = urllib.request.urlopen(link)
+        response = urllib2.urlopen(link)
         xmlContent = response.read()
         # Processing xml
@@ -245,5 +242,5 @@
                     imageLinks.append(imageLink[2])
         flightInfo["image_links"] = imageLinks
-        print((sorted(availableInfo.keys())))
+        print(sorted(availableInfo.keys()))
         htmlFilePath = "simbrief_plan.html" if self._htmlFilePath is None \
           else self._htmlFilePath
@@ -251,5 +248,5 @@
             f.write(availableInfo["plan_html"])
 
-        GObject.idle_add(self._resultsAvailable, flightInfo)
+        gobject.idle_add(self._resultsAvailable, flightInfo)
 
 #------------------------------------------------------------------------------
@@ -260,5 +257,5 @@
     _toQuit = False
 
-    GObject.threads_init()
+    gobject.threads_init()
 
     _simBriefHandler = SimBriefHandler()
@@ -269,5 +266,5 @@
 def _initializeCEF(args, initializedCallback):
     """Perform the actual initialization of CEF using the given arguments."""
-    print("Initializing CEF with args:", args)
+    print "Initializing CEF with args:", args
 
     settings = {
@@ -293,11 +290,11 @@
                     switches[arg[2:assignIndex]] = arg[assignIndex+1:]
         else:
-            print("Unhandled switch", arg)
+            print "Unhandled switch", arg
 
     cefpython.Initialize(settings, switches)
 
-    GObject.timeout_add(10, _handleTimeout)
-
-    print("Initialized, executing callback...")
+    gobject.timeout_add(10, _handleTimeout)
+
+    print "Initialized, executing callback..."
     initializedCallback()
 
@@ -308,9 +305,9 @@
     within."""
     if os.name=="nt":
-        container = Gtk.DrawingArea()
+        container = gtk.DrawingArea()
         container.set_property("can-focus", True)
         container.connect("size-allocate", _handleSizeAllocate)
     else:
-        container = Gtk.DrawingArea()
+        container = gtk.DrawingArea()
 
     container.show()
@@ -323,17 +320,12 @@
     """Start a browser instance in the given container with the given URL."""
     if os.name=="nt":
-        Gdk.threads_enter()
-        ctypes.pythonapi.PyCapsule_GetPointer.restype = ctypes.c_void_p
-        ctypes.pythonapi.PyCapsule_GetPointer.argtypes = \
-            [ctypes.py_object]
-        gpointer = ctypes.pythonapi.PyCapsule_GetPointer(
-            container.get_property("window").__gpointer__, None)
-        libgdk = ctypes.CDLL("libgdk-3-0.dll")
-        windowID = libgdk.gdk_win32_window_get_handle(gpointer)
-        container.windowID = windowID
-        Gdk.threads_leave()
+        window = container.get_window()
+        if window is None:
+            print "mlx.gui.cef.startInContainer: no window found!"
+            windowID = None
+        else:
+            windowID = window.handle
     else:
-        container.set_visual(container.get_screen().lookup_visual(0x21))
-        windowID = container.get_window().get_xid()
+        windowID = container.window.xid
 
     windowInfo = cefpython.WindowInfo()
@@ -348,12 +340,12 @@
 
 class OffscreenRenderHandler(object):
-    def GetRootScreenRect(self, browser, rect_out):
+    def GetRootScreenRect(self, browser, rect):
         #print "GetRootScreenRect"
-        rect_out += [0, 0, 800, 600]
+        rect += [0, 0, 800, 600]
         return True
 
-    def GetViewRect(self, browser, rect_out):
+    def GetViewRect(self, browser, rect):
         #print "GetViewRect"
-        rect_out += [0, 0, 800, 600]
+        rect += [0, 0, 800, 600]
         return True
 
@@ -375,5 +367,5 @@
         pass
 
-    def OnPaint(self, browser, element_type, dirty_rects, paint_buffer, width, height):
+    def OnPaint(self, browser, paintElementType, dirtyRects, buffer, width, height):
         #print "OnPaint", paintElementType, dirtyRects, buffer, width, height
         pass
@@ -432,5 +424,6 @@
 
 def _handleSizeAllocate(widget, sizeAlloc):
-    """Handle the size-allocate event on Windows."""
+    """Handle the size-allocate event."""
+    window = widget.get_window()
     if widget is not None:
-        cefpython.WindowUtils.OnSize(widget.windowID, 0, 0, 0)
+        cefpython.WindowUtils.OnSize(window.handle, 0, 0, 0)
Index: src/mlx/gui/checklist.py
===================================================================
--- src/mlx/gui/checklist.py	(revision 999)
+++ src/mlx/gui/checklist.py	(revision 300)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 from mlx.i18n import xstr
@@ -22,5 +22,5 @@
 #------------------------------------------------------------------------------
 
-class ChecklistEditor(Gtk.Dialog):
+class ChecklistEditor(gtk.Dialog):
     """The dialog to edit the checklists."""
     def __init__(self, gui):
@@ -28,8 +28,8 @@
                                               xstr("chklst_title"),
                                               gui.mainWindow,
-                                              Gtk.DialogFlags.MODAL)
-
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
-        self.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
+                                              DIALOG_MODAL)
+
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
+        self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
 
         self._gui = gui
@@ -39,18 +39,18 @@
         contentArea = self.get_content_area()
 
-        typeBox = Gtk.HBox()
-
-        label = Gtk.Label(xstr("chklst_aircraftType"))
+        typeBox = gtk.HBox()
+
+        label = gtk.Label(xstr("chklst_aircraftType"))
         label.set_use_underline(True)
 
         typeBox.pack_start(label, False, False, 4)
 
-        self._aircraftTypeModel = Gtk.ListStore(str, int)
+        self._aircraftTypeModel = gtk.ListStore(str, int)
         for type in const.aircraftTypes:
             name = aircraftNames[type] if type in aircraftNames \
                    else "Aircraft type #%d" % (type,)
             self._aircraftTypeModel.append([name, type])
-        self._aircraftType = Gtk.ComboBox(model = self._aircraftTypeModel)
-        renderer = Gtk.CellRendererText()
+        self._aircraftType = gtk.ComboBox(model = self._aircraftTypeModel)
+        renderer = gtk.CellRendererText()
         self._aircraftType.pack_start(renderer, True)
         self._aircraftType.add_attribute(renderer, "text", 0)
@@ -62,5 +62,5 @@
         typeBox.pack_start(self._aircraftType, True, True, 4)
 
-        typeBoxAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        typeBoxAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                          xscale = 0.0, yscale = 0.0)
         typeBoxAlignment.set_size_request(400, -1)
@@ -69,10 +69,10 @@
         contentArea.pack_start(typeBoxAlignment, False, False, 12)
 
-        fileBox = Gtk.HBox()        
-
-        self._fileChooser = Gtk.FileChooserWidget()
+        fileBox = gtk.HBox()        
+
+        self._fileChooser = gtk.FileChooserWidget()
         self._fileChooser.set_select_multiple(True)
         
-        filter = Gtk.FileFilter()
+        filter = gtk.FileFilter()
         filter.set_name(xstr("file_filter_audio"))
         filter.add_pattern("*.wav")
@@ -80,5 +80,5 @@
         self._fileChooser.add_filter(filter)
             
-        filter = Gtk.FileFilter()
+        filter = gtk.FileFilter()
         filter.set_name(xstr("file_filter_all"))
         filter.add_pattern("*.*")
@@ -90,6 +90,6 @@
         fileBox.pack_start(self._fileChooser, True, True, 4)
 
-        controlBox = Gtk.VBox()
-        controlAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        controlBox = gtk.VBox()
+        controlAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                          xscale = 0.0, yscale = 0.0)
         controlAlignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -98,9 +98,9 @@
         fileBox.pack_start(controlAlignment, False, False, 0)
 
-        self._addButton = Gtk.Button(xstr("chklst_add"))
+        self._addButton = gtk.Button(xstr("chklst_add"))
         self._addButton.set_use_underline(True)
         self._addButton.set_tooltip_text(xstr("chklst_add_tooltip"))
         self._addButton.connect("clicked", self._addButtonClicked)
-        addAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        addAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                      xscale = 0.0, yscale = 0.0)
         addAlignment.set_padding(padding_top = 64, padding_bottom = 0,
@@ -109,5 +109,5 @@
         controlBox.pack_start(addAlignment, False, False, 0)
 
-        self._removeButton = Gtk.Button(xstr("chklst_remove"))
+        self._removeButton = gtk.Button(xstr("chklst_remove"))
         self._removeButton.set_use_underline(True)
         self._removeButton.set_tooltip_text(xstr("chklst_remove_tooltip"))
@@ -115,5 +115,5 @@
         self._removeButton.connect("clicked", self._removeButtonClicked)
 
-        removeAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        removeAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                         xscale = 0.0, yscale = 0.0)
         removeAlignment.set_padding(padding_top = 64, padding_bottom = 0,
@@ -122,5 +122,5 @@
         controlBox.pack_start(removeAlignment, False, False, 0)
 
-        self._moveUpButton = Gtk.Button(xstr("chklst_moveUp"))
+        self._moveUpButton = gtk.Button(xstr("chklst_moveUp"))
         self._moveUpButton.set_use_underline(True)
         self._moveUpButton.set_tooltip_text(xstr("chklst_moveUp_tooltip"))
@@ -128,5 +128,5 @@
         self._moveUpButton.connect("clicked", self._moveUpButtonClicked)
 
-        moveUpAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        moveUpAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                         xscale = 0.0, yscale = 0.0)
         moveUpAlignment.set_padding(padding_top = 16, padding_bottom = 0,
@@ -135,5 +135,5 @@
         controlBox.pack_start(moveUpAlignment, False, False, 0)
 
-        self._moveDownButton = Gtk.Button(xstr("chklst_moveDown"))
+        self._moveDownButton = gtk.Button(xstr("chklst_moveDown"))
         self._moveDownButton.set_use_underline(True)
         self._moveDownButton.set_tooltip_text(xstr("chklst_moveDown_tooltip"))
@@ -141,5 +141,5 @@
         self._moveDownButton.connect("clicked", self._moveDownButtonClicked)
 
-        moveDownAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        moveDownAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                         xscale = 0.0, yscale = 0.0)
         moveDownAlignment.set_padding(padding_top = 4, padding_bottom = 0,
@@ -148,10 +148,10 @@
         controlBox.pack_start(moveDownAlignment, False, False, 0)
 
-        self._fileListModel = Gtk.ListStore(str, str)
-        self._fileList = Gtk.TreeView(model = self._fileListModel)
+        self._fileListModel = gtk.ListStore(str, str)
+        self._fileList = gtk.TreeView(model = self._fileListModel)
         self._fileList.connect("button-press-event",
                                self._fileListButtonPressed)
-        column = Gtk.TreeViewColumn(xstr("chklst_header"),
-                                    Gtk.CellRendererText(), text = 0)
+        column = gtk.TreeViewColumn(xstr("chklst_header"),
+                                    gtk.CellRendererText(), text = 0)
         column.set_expand(True)
         column.set_clickable(False)
@@ -162,15 +162,14 @@
         self._fileListPopupMenu = None
         selection = self._fileList.get_selection()
-        selection.set_mode(Gtk.SelectionMode.MULTIPLE)
+        selection.set_mode(SELECTION_MULTIPLE)
         selection.connect("changed", self._fileListSelectionChanged)
 
         self._buildFileListPopupMenu()
 
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(self._fileList)
         scrolledWindow.set_size_request(200, -1)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(SHADOW_IN)
 
         fileBox.pack_start(scrolledWindow, False, False, 4)
@@ -188,8 +187,8 @@
         self.hide()
 
-        if response==Gtk.ResponseType.ACCEPT:
+        if response==RESPONSETYPE_ACCEPT:
             self._saveChecklist()
             config = self._gui.config
-            for (aircraftType, checklist) in self._checklists.items():
+            for (aircraftType, checklist) in self._checklists.iteritems():
                 config.setChecklist(aircraftType, checklist)
             config.save()
@@ -205,4 +204,5 @@
         numSelected = 0
         for path in fileChooser.get_filenames():
+            path = text2unicode(path)
             numSelected += 1
             if os.path.isfile(path): numFiles += 1
@@ -213,4 +213,5 @@
         """Called when the Add button is clicked."""
         for path in self._fileChooser.get_filenames():
+            path = text2unicode(path)
             self._fileListModel.append([os.path.basename(path),
                                         path])
@@ -244,5 +245,6 @@
         selection = self._fileList.get_selection()
         (model, paths) = selection.get_selected_rows()
-        indexes = [path.get_indices()[0] for path in paths]
+        indexes = [(path.get_indices() if pygobject else path)[0]
+                   for path in paths]        
         indexes.sort()
         if not up:
@@ -273,5 +275,5 @@
             maxIndex = None
             for path in paths:
-                [index] = path.get_indices()
+                [index] = path.get_indices() if pygobject else path
                 if minIndex is None or index<minIndex: minIndex = index
                 if maxIndex is None or index>maxIndex: maxIndex = index
@@ -322,15 +324,18 @@
     def _fileListButtonPressed(self, widget, event):
         """Called when a mouse button is pressed on the file list."""
-        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3:
+        if event.type!=EVENT_BUTTON_PRESS or event.button!=3:
             return
 
         menu = self._fileListPopupMenu
-        menu.popup(None, None, None, None, event.button, event.time)
+        if pygobject:
+            menu.popup(None, None, None, None, event.button, event.time)
+        else:
+            menu.popup(None, None, None, event.button, event.time)
 
     def _buildFileListPopupMenu(self):
         """Build the file list popup menu."""
-        menu = Gtk.Menu()
-
-        menuItem = Gtk.MenuItem()
+        menu = gtk.Menu()
+
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("chklst_remove"))
         menuItem.set_use_underline(True)
@@ -341,5 +346,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("chklst_moveUp"))
         menuItem.set_use_underline(True)
@@ -350,5 +355,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("chklst_moveDown"))
         menuItem.set_use_underline(True)
Index: src/mlx/gui/common.py
===================================================================
--- src/mlx/gui/common.py	(revision 1002)
+++ src/mlx/gui/common.py	(revision 863)
@@ -16,4 +16,13 @@
 #
 # Common definitions and utilities for the GUI
+#
+# The main purpose of this module is to provide common definitions for things
+# that are named differently in Gtk+ 2 and 3. This way the other parts of the
+# GUI have to check the version in use very rarely. The variable \c pygobject
+# tells which version is being used. If it is \c True, Gtk+ 3 is used via the
+# PyGObject interface. Otherwise Gtk+ 2 is used, which is the default on
+# Windows or when the \c FORCE_PYGTK environment variable is set.
+#
+# Besides this there are some common utility classes and functions.
 
 #-----------------------------------------------------------------------------
@@ -21,21 +30,174 @@
 appIndicator = False
 
-import gi
-gi.require_version("Gdk", "3.0")
-from gi.repository import Gdk
-from gi.repository import GdkPixbuf
-gi.require_version("Gtk", "3.0")
-from gi.repository import Gtk
-try:
-    gi.require_version("AppIndicator3", "0.1")
-    from gi.repository import AppIndicator3
+if not pygobject:
+    print "Using PyGTK"
+    pygobject = False
+    import pygtk
+    pygtk.require("2.0")
+    import gtk.gdk as gdk
+    import gtk
+    import pango
+
+    try:
+        import appindicator
+        appIndicator = True
+    except Exception, e:
+        pass
+
+    MESSAGETYPE_ERROR = gtk.MESSAGE_ERROR
+    MESSAGETYPE_QUESTION = gtk.MESSAGE_QUESTION
+    MESSAGETYPE_INFO = gtk.MESSAGE_INFO
+
+    RESPONSETYPE_NONE = gtk.RESPONSE_NONE
+    RESPONSETYPE_OK = gtk.RESPONSE_OK
+    RESPONSETYPE_YES = gtk.RESPONSE_YES
+    RESPONSETYPE_NO = gtk.RESPONSE_NO
+    RESPONSETYPE_ACCEPT = gtk.RESPONSE_ACCEPT
+    RESPONSETYPE_REJECT = gtk.RESPONSE_REJECT
+    RESPONSETYPE_CANCEL = gtk.RESPONSE_CANCEL
+
+    ACCEL_VISIBLE = gtk.ACCEL_VISIBLE
+    CONTROL_MASK = gdk.CONTROL_MASK
+    DIALOG_MODAL = gtk.DIALOG_MODAL
+    WRAP_WORD = gtk.WRAP_WORD
+
+    JUSTIFY_CENTER = gtk.JUSTIFY_CENTER
+    JUSTIFY_LEFT = gtk.JUSTIFY_LEFT
+
+    CONTROL_MASK = gdk.CONTROL_MASK
+    SHIFT_MASK = gdk.SHIFT_MASK
+    BUTTON1_MASK = gdk.BUTTON1_MASK
+
+    SCROLL_UP = gdk.SCROLL_UP
+    SCROLL_DOWN = gdk.SCROLL_DOWN
+
+    SPIN_USER_DEFINED = gtk.SPIN_USER_DEFINED
+
+    FILE_CHOOSER_ACTION_SELECT_FOLDER = gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER
+    FILE_CHOOSER_ACTION_OPEN = gtk.FILE_CHOOSER_ACTION_OPEN
+    FILE_CHOOSER_ACTION_SAVE = gtk.FILE_CHOOSER_ACTION_SAVE
+
+    SELECTION_MULTIPLE = gtk.SELECTION_MULTIPLE
+
+    SHADOW_IN = gtk.SHADOW_IN
+    SHADOW_NONE = gtk.SHADOW_NONE
+
+    POLICY_AUTOMATIC = gtk.POLICY_AUTOMATIC
+    POLICY_NEVER = gtk.POLICY_NEVER
+    POLICY_ALWAYS = gtk.POLICY_ALWAYS
+
+    WEIGHT_NORMAL = pango.WEIGHT_NORMAL
+    WEIGHT_BOLD = pango.WEIGHT_BOLD
+
+    WINDOW_STATE_ICONIFIED = gdk.WINDOW_STATE_ICONIFIED
+    WINDOW_STATE_WITHDRAWN = gdk.WINDOW_STATE_WITHDRAWN
+
+    SORT_ASCENDING = gtk.SORT_ASCENDING
+    SORT_DESCENDING = gtk.SORT_DESCENDING
+
+    EVENT_BUTTON_PRESS = gdk.BUTTON_PRESS
+
+    TREE_VIEW_COLUMN_FIXED = gtk.TREE_VIEW_COLUMN_FIXED
+
+    FILL = gtk.FILL
+    EXPAND = gtk.EXPAND
+
+    UPDATE_IF_VALID = gtk.UPDATE_IF_VALID
+
+    SELECTION_MULTIPLE = gtk.SELECTION_MULTIPLE
+
+    WINDOW_POPUP = gtk.WINDOW_POPUP
+
+    pixbuf_new_from_file = gdk.pixbuf_new_from_file
+
+    def text2unicode(text):
+        """Convert the given text, returned by a Gtk widget, to Unicode."""
+        return unicode(text)
+
+    def text2str(text):
+        """Convert the given text, returned by xstr to a string."""
+        return str(text)
+
+else: # pygobject
+    from gi.repository import Gdk as gdk
+    from gi.repository import GdkPixbuf as gdkPixbuf
+    from gi.repository import Gtk as gtk
+    from gi.repository import AppIndicator3 as appindicator
+    from gi.repository import Pango as pango
+
     appIndicator = True
-except:
-    pass
-from gi.repository import Pango
-from gi.repository import PangoCairo
-
-import codecs
-_utf8Decoder = codecs.getdecoder("utf-8")
+
+
+    MESSAGETYPE_ERROR = gtk.MessageType.ERROR
+    MESSAGETYPE_QUESTION = gtk.MessageType.QUESTION
+    MESSAGETYPE_INFO = gtk.MessageType.INFO
+    RESPONSETYPE_NONE = gtk.ResponseType.NONE
+    RESPONSETYPE_OK = gtk.ResponseType.OK
+    RESPONSETYPE_YES = gtk.ResponseType.YES
+    RESPONSETYPE_NO = gtk.ResponseType.NO
+    RESPONSETYPE_ACCEPT = gtk.ResponseType.ACCEPT
+    RESPONSETYPE_REJECT = gtk.ResponseType.REJECT
+    RESPONSETYPE_CANCEL = gtk.ResponseType.CANCEL
+    ACCEL_VISIBLE = gtk.AccelFlags.VISIBLE
+    CONTROL_MASK = gdk.ModifierType.CONTROL_MASK
+    DIALOG_MODAL = gtk.DialogFlags.MODAL
+    WRAP_WORD = gtk.WrapMode.WORD
+    JUSTIFY_CENTER = gtk.Justification.CENTER
+    JUSTIFY_LEFT = gtk.Justification.LEFT
+
+    CONTROL_MASK = gdk.ModifierType.CONTROL_MASK
+    SHIFT_MASK = gdk.ModifierType.SHIFT_MASK
+    BUTTON1_MASK = gdk.ModifierType.BUTTON1_MASK
+
+    SCROLL_UP = gdk.ScrollDirection.UP
+    SCROLL_DOWN = gdk.ScrollDirection.DOWN
+
+    SPIN_USER_DEFINED = gtk.SpinType.USER_DEFINED
+
+    FILE_CHOOSER_ACTION_SELECT_FOLDER = gtk.FileChooserAction.SELECT_FOLDER
+    FILE_CHOOSER_ACTION_OPEN = gtk.FileChooserAction.OPEN
+    FILE_CHOOSER_ACTION_SAVE = gtk.FileChooserAction.SAVE
+
+    SELECTION_MULTIPLE = gtk.SelectionMode.MULTIPLE
+
+    SHADOW_IN = gtk.ShadowType.IN
+    SHADOW_NONE = gtk.ShadowType.NONE
+
+    POLICY_AUTOMATIC = gtk.PolicyType.AUTOMATIC
+    POLICY_NEVER = gtk.PolicyType.NEVER
+    POLICY_ALWAYS = gtk.PolicyType.ALWAYS
+
+    WEIGHT_NORMAL = pango.Weight.NORMAL
+    WEIGHT_BOLD = pango.Weight.BOLD
+
+    WINDOW_STATE_ICONIFIED = gdk.WindowState.ICONIFIED
+    WINDOW_STATE_WITHDRAWN = gdk.WindowState.WITHDRAWN
+
+    SORT_ASCENDING = gtk.SortType.ASCENDING
+    SORT_DESCENDING = gtk.SortType.DESCENDING
+
+    EVENT_BUTTON_PRESS = gdk.EventType.BUTTON_PRESS
+
+    TREE_VIEW_COLUMN_FIXED = gtk.TreeViewColumnSizing.FIXED
+
+    FILL = gtk.AttachOptions.FILL
+    EXPAND = gtk.AttachOptions.EXPAND
+
+    UPDATE_IF_VALID = gtk.SpinButtonUpdatePolicy.IF_VALID
+
+    SELECTION_MULTIPLE = gtk.SelectionMode.MULTIPLE
+
+    pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file
+
+    import codecs
+    _utf8Decoder = codecs.getdecoder("utf-8")
+
+    def text2unicode(str):
+        """Convert the given text, returned by a Gtk widget, to Unicode."""
+        return _utf8Decoder(str)[0]
+
+    def text2str(text):
+        """Convert the given text, returned by xstr to a string."""
+        return _utf8Decoder(text)[0]
 
 import cairo
@@ -78,9 +240,9 @@
 #------------------------------------------------------------------------------
 
-class IntegerEntry(Gtk.Entry):
+class IntegerEntry(gtk.Entry):
     """An entry that allows only either an empty value, or an integer."""
     def __init__(self, defaultValue = None):
         """Construct the entry."""
-        Gtk.Entry.__init__(self)
+        gtk.Entry.__init__(self)
 
         self.set_alignment(1.0)
@@ -130,10 +292,9 @@
 #------------------------------------------------------------------------------
 
-class TimeEntry(Gtk.Entry):
+class TimeEntry(gtk.Entry):
     """Widget to display and edit a time value in HH:MM format."""
     def __init__(self):
         """Construct the entry"""
-        super(TimeEntry, self).__init__()
-        self.set_max_width_chars(5)
+        super(TimeEntry, self).__init__(max = 5)
 
         self.connect("insert-text", self._insertText)
@@ -235,10 +396,10 @@
             pass
         else:
-            Gtk.gdk.display_get_default().beep()
+            gtk.gdk.display_get_default().beep()
             self.stop_emission(signal)
 
 #------------------------------------------------------------------------------
 
-class CredentialsDialog(Gtk.Dialog):
+class CredentialsDialog(gtk.Dialog):
     """A dialog window to ask for a user name and a password."""
     def __init__(self, gui, userName, password,
@@ -253,11 +414,11 @@
                                                 titleLabel,
                                                 gui.mainWindow,
-                                                Gtk.DialogFlags.MODAL)
-        self.add_button(cancelButtonLabel, Gtk.ResponseType.CANCEL)
-        self.add_button(okButtonLabel, Gtk.ResponseType.OK)
+                                                DIALOG_MODAL)
+        self.add_button(cancelButtonLabel, RESPONSETYPE_CANCEL)
+        self.add_button(okButtonLabel, RESPONSETYPE_OK)
 
         contentArea = self.get_content_area()
 
-        contentAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        contentAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                          xscale = 0.0, yscale = 0.0)
         contentAlignment.set_padding(padding_top = 4, padding_bottom = 16,
@@ -266,19 +427,19 @@
         contentArea.pack_start(contentAlignment, False, False, 0)
 
-        contentVBox = Gtk.VBox()
+        contentVBox = gtk.VBox()
         contentAlignment.add(contentVBox)
 
         if infoText is not None:
-            label = Gtk.Label(infoText)
+            label = gtk.Label(infoText)
             label.set_alignment(0.0, 0.0)
 
             contentVBox.pack_start(label, False, False, 0)
 
-        tableAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        tableAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         tableAlignment.set_padding(padding_top = 24, padding_bottom = 0,
                                    padding_left = 0, padding_right = 0)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -288,10 +449,10 @@
         contentVBox.pack_start(tableAlignment, True, True, 0)
 
-        label = Gtk.Label(userNameLabel)
+        label = gtk.Label(userNameLabel)
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 0, 1)
 
-        self._userName = Gtk.Entry()
+        self._userName = gtk.Entry()
         self._userName.set_width_chars(16)
         # FIXME: enabled the OK button only when there is something in thr
@@ -304,10 +465,10 @@
         label.set_mnemonic_widget(self._userName)
 
-        label = Gtk.Label(passwordLabel)
+        label = gtk.Label(passwordLabel)
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 1, 2)
 
-        self._password = Gtk.Entry()
+        self._password = gtk.Entry()
         self._password.set_visibility(False)
         #self._password.connect("changed",
@@ -319,5 +480,5 @@
 
         if rememberPassword is not None:
-            self._rememberButton = Gtk.CheckButton(rememberLabel)
+            self._rememberButton = gtk.CheckButton(rememberLabel)
             self._rememberButton.set_use_underline(True)
             self._rememberButton.set_tooltip_text(rememberTooltip)
@@ -355,5 +516,5 @@
 #------------------------------------------------------------------------------
 
-GObject.signal_new("integer-changed", IntegerEntry, GObject.SIGNAL_RUN_FIRST,
+gobject.signal_new("integer-changed", IntegerEntry, gobject.SIGNAL_RUN_FIRST,
                    None, (object,))
 
@@ -427,5 +588,5 @@
 def addFaultTag(buffer):
     """Add a tag named 'fault' to the given buffer."""
-    buffer.create_tag("fault", foreground="red", weight=Pango.Weight.BOLD)
+    buffer.create_tag("fault", foreground="red", weight=WEIGHT_BOLD)
 
 #------------------------------------------------------------------------------
@@ -461,10 +622,10 @@
 
     Return a boolean indicating the answer."""
-    dialog = Gtk.MessageDialog(parent = parent,
-                               type = Gtk.MessageType.QUESTION,
+    dialog = gtk.MessageDialog(parent = parent,
+                               type = MESSAGETYPE_QUESTION,
                                message_format = question)
 
-    dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
-    dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
+    dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
+    dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
 
     dialog.set_title(title)
@@ -472,5 +633,5 @@
     dialog.hide()
 
-    return result==Gtk.ResponseType.YES
+    return result==RESPONSETYPE_YES
 
 #------------------------------------------------------------------------------
@@ -479,8 +640,8 @@
                 title = WINDOW_TITLE_BASE):
     """Display an error dialog box with the given message."""
-    dialog = Gtk.MessageDialog(parent = parent,
-                               type = Gtk.MessageType.ERROR,
+    dialog = gtk.MessageDialog(parent = parent,
+                               type = MESSAGETYPE_ERROR,
                                message_format = message)
-    dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+    dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
     dialog.set_title(title)
     if secondary is not None:
@@ -501,11 +662,11 @@
 
 def createFlightTypeComboBox():
-        flightTypeModel = Gtk.ListStore(str, int)
+        flightTypeModel = gtk.ListStore(str, int)
         for type in _const.flightTypes:
             name = "flighttype_" + _const.flightType2string(type)
             flightTypeModel.append([xstr(name), type])
 
-        flightType = Gtk.ComboBox(model = flightTypeModel)
-        renderer = Gtk.CellRendererText()
+        flightType = gtk.ComboBox(model = flightTypeModel)
+        renderer = gtk.CellRendererText()
         flightType.pack_start(renderer, True)
         flightType.add_attribute(renderer, "text", 0)
Index: src/mlx/gui/delaycodes.py
===================================================================
--- src/mlx/gui/delaycodes.py	(revision 999)
+++ src/mlx/gui/delaycodes.py	(revision 840)
@@ -3,5 +3,5 @@
 #------------------------------------------------------------------------------
 
-from .dcdata import CAPTION, DELAYCODE, getTable
+from dcdata import CAPTION, DELAYCODE, getTable
 
 from mlx.gui.common import *
@@ -11,124 +11,181 @@
 #------------------------------------------------------------------------------
 
-class Viewport(Gtk.Viewport):
-    """Viewport implementation that alleviates the problem with improper
-    resizing by the VBox."""
-    def __init__(self):
-        """Construct the viewport."""
-        Gtk.Viewport.__init__(self)
-        self._recursive = False
-        self._vboxHeight = None
-
-    def setVBOXHeight(self, vboxHeight):
-        """Set the height of the VBox which will be used to calculate the
-        viewport's height."""
-        self._vboxHeight = vboxHeight
-
-    def do_size_allocate(self, allocation):
-        """Called when the viewport's size is allocated.
-
-        The height in the allocation object is modified so that it is only
-        so high to fit into the VBox."""
-        if self._vboxHeight is not None:
-            allocation.y += 1
-            allocation.height = self._vboxHeight - allocation.y
+if pygobject:
+
+#------------------------------------------------------------------------------
+
+    class Viewport(gtk.Viewport):
+        """Viewport implementation that alleviates the problem with improper
+        resizing by the VBox."""
+        def __init__(self):
+            """Construct the viewport."""
+            gtk.Viewport.__init__(self)
+            self._recursive = False
             self._vboxHeight = None
-        Gtk.Viewport.do_size_allocate(self, allocation)
-
-class DelayCodeTableBase(Gtk.VBox, Gtk.Scrollable):
-    """PyGObject-specific base class for the delay code table."""
-    __gproperties__ = {
-        "vscroll-policy" : ( Gtk.ScrollablePolicy,
-                             "vscroll-policy",
-                             "The vertical scrolling policy",
-                             Gtk.ScrollablePolicy.MINIMUM,
-                             GObject.PARAM_READWRITE ),
-        "vadjustment" : ( Gtk.Adjustment,
-                          "vadjustment",
-                          "The vertical adjustment",
-                          GObject.PARAM_READWRITE ),
-        "hscroll-policy" : ( Gtk.ScrollablePolicy,
-                             "hscroll-policy",
-                             "The horizontal scrolling policy",
-                             Gtk.ScrollablePolicy.MINIMUM,
-                             GObject.PARAM_READWRITE ),
-        "hadjustment" : ( Gtk.Adjustment,
-                          "hadjustment",
-                          "The horizontal adjustment",
-                          GObject.PARAM_READWRITE )  }
-
-
-    @staticmethod
-    def _createViewport():
-        """Create an instance of the viewport class used by this base class."""
-        return Viewport()
-
-    def __init__(self):
-        """Construct the delay code table."""
-        super(DelayCodeTableBase, self).__init__()
-
-    def do_size_allocate(self, allocation):
-        """Allocate the size for the table and its children.
-
-        This sets up the VBox height in the viewport and then calls the
-        do_size_allocate() function of VBox()."""
-        self._viewport.setVBOXHeight(allocation.height)
-        Gtk.VBox.do_size_allocate(self, allocation)
-        self.allocate_column_sizes(allocation)
-
-    def do_get_property(self, prop):
-        """Get the value of one of the properties defined above.
-
-        The request is forwarded to the viewport."""
-        if prop.name=="vscroll-policy":
-            return self._viewport.get_vscroll_policy()
-        elif prop.name=="hscroll-policy":
-            return self._viewport.get_hscroll_policy()
-        elif prop.name=="vadjustment":
-            return self._viewport.get_vadjustment()
-        elif prop.name=="hadjustment":
-            return self._viewport.get_hadjustment()
-        else:
-            raise AttributeError("mlx.gui.delaycodes.DelayCodeTableBase: property %s is not handled in do_get_property" %
-                                 (prop.name,))
-
-    def do_set_property(self, prop, value):
-        """Set the value of the adjustment properties defined above.
-
-        The adjustments are forwarded to the viewport."""
-        if prop.name=="vadjustment":
-            self._viewport.set_vadjustment(value)
-        elif prop.name=="hadjustment":
-            self._viewport.set_hadjustment(value)
-            self._treeView.set_hadjustment(value)
-        else:
-            raise AttributeError("mlx.gui.delaycodes.DelayCodeTableBase: property %s is not handled in do_set_property" %
-                                 (prop.name,))
-
-    def setStyle(self):
-        """Set the style of the event box from the treeview."""
-
-class Alignment(Gtk.Alignment):
-    """An alignment that remembers the width it was given."""
-    def __init__(self, xalign = 0.0, yalign=0.0,
-                 xscale = 0.0, yscale = 0.0 ):
-        """Construct the alignment."""
-        super(Alignment, self).__init__(xalign = xalign, yalign = yalign,
-                                        xscale = xscale, yscale = yscale)
-        self.allocatedWidth = 0
-
-    def do_size_allocate(self, allocation):
-        """Called with the new size allocation."""
-        self.allocatedWidth = allocation.width
-        Gtk.Alignment.do_size_allocate(self, allocation)
-
-class TreeView(Gtk.TreeView):
-    def do_size_allocate(self, allocation):
-        allocation.height += 1
-        Gtk.TreeView.do_size_allocate(self, allocation)
-
-#------------------------------------------------------------------------------
-
-class CheckButton(Gtk.CheckButton):
+
+        def setVBOXHeight(self, vboxHeight):
+            """Set the height of the VBox which will be used to calculate the
+            viewport's height."""
+            self._vboxHeight = vboxHeight
+
+        def do_size_allocate(self, allocation):
+            """Called when the viewport's size is allocated.
+
+            The height in the allocation object is modified so that it is only
+            so high to fit into the VBox."""
+            if self._vboxHeight is not None:
+                allocation.height = self._vboxHeight - allocation.y
+                self._vboxHeight = None
+            gtk.Viewport.do_size_allocate(self, allocation)
+
+    class DelayCodeTableBase(gtk.VBox, gtk.Scrollable):
+        """PyGObject-specific base class for the delay code table."""
+        __gproperties__ = {
+            "vscroll-policy" : ( gtk.ScrollablePolicy,
+                                 "vscroll-policy",
+                                 "The vertical scrolling policy",
+                                 gtk.ScrollablePolicy.MINIMUM,
+                                 gobject.PARAM_READWRITE ),
+            "vadjustment" : ( gtk.Adjustment,
+                              "vadjustment",
+                              "The vertical adjustment",
+                              gobject.PARAM_READWRITE ),
+            "hscroll-policy" : ( gtk.ScrollablePolicy,
+                                 "hscroll-policy",
+                                 "The horizontal scrolling policy",
+                                 gtk.ScrollablePolicy.MINIMUM,
+                                 gobject.PARAM_READWRITE ),
+            "hadjustment" : ( gtk.Adjustment,
+                              "hadjustment",
+                              "The horizontal adjustment",
+                              gobject.PARAM_READWRITE )  }
+
+
+        @staticmethod
+        def _createViewport():
+            """Create an instance of the viewport class used by this base class."""
+            return Viewport()
+
+        def __init__(self):
+            """Construct the delay code table."""
+            super(DelayCodeTableBase, self).__init__()
+
+        def do_size_allocate(self, allocation):
+            """Allocate the size for the table and its children.
+
+            This sets up the VBox height in the viewport and then calls the
+            do_size_allocate() function of VBox()."""
+            self._viewport.setVBOXHeight(allocation.height)
+            gtk.VBox.do_size_allocate(self, allocation)
+            self.allocate_column_sizes(allocation)
+
+        def do_get_property(self, prop):
+            """Get the value of one of the properties defined above.
+
+            The request is forwarded to the viewport."""
+            if prop.name=="vscroll-policy":
+                return self._viewport.get_vscroll_policy()
+            elif prop.name=="hscroll-policy":
+                return self._viewport.get_hscroll_policy()
+            elif prop.name=="vadjustment":
+                return self._viewport.get_vadjustment()
+            elif prop.name=="hadjustment":
+                return self._viewport.get_hadjustment()
+            else:
+                raise AttributeError("mlx.gui.delaycodes.DelayCodeTableBase: property %s is not handled in do_get_property" %
+                                     (prop.name,))
+
+        def do_set_property(self, prop, value):
+            """Set the value of the adjustment properties defined above.
+
+            The adjustments are forwarded to the viewport."""
+            if prop.name=="vadjustment":
+                self._viewport.set_vadjustment(value)
+            elif prop.name=="hadjustment":
+                self._viewport.set_hadjustment(value)
+                self._treeView.set_hadjustment(value)
+            else:
+                raise AttributeError("mlx.gui.delaycodes.DelayCodeTableBase: property %s is not handled in do_set_property" %
+                                     (prop.name,))
+
+        def setStyle(self):
+            """Set the style of the event box from the treeview."""
+
+    class Alignment(gtk.Alignment):
+        """An alignment that remembers the width it was given."""
+        def __init__(self, xalign = 0.0, yalign=0.0,
+                     xscale = 0.0, yscale = 0.0 ):
+            """Construct the alignment."""
+            super(Alignment, self).__init__(xalign = xalign, yalign = yalign,
+                                            xscale = xscale, yscale = yscale)
+            self.allocatedWidth = 0
+
+        def do_size_allocate(self, allocation):
+            """Called with the new size allocation."""
+            self.allocatedWidth = allocation.width
+            gtk.Alignment.do_size_allocate(self, allocation)
+
+#------------------------------------------------------------------------------
+
+else: # pygobject
+
+#------------------------------------------------------------------------------
+
+    class DelayCodeTableBase (gtk.VBox):
+        """Base class of the delay code table for PyGtk."""
+
+        __gsignals__ = {
+            "set-scroll-adjustments": (
+                gobject.SIGNAL_RUN_LAST,
+                gobject.TYPE_NONE, (gtk.Adjustment, gtk.Adjustment))
+                }
+
+        @staticmethod
+        def _createViewport():
+            """Create an instance of the viewport class used by this base class."""
+            return gtk.Viewport()
+
+        def __init__(self):
+            """Construct the base class."""
+            super(DelayCodeTableBase, self).__init__()
+            self.set_set_scroll_adjustments_signal("set-scroll-adjustments")
+            self.connect("size-allocate", self._do_size_allocate)
+
+        def do_set_scroll_adjustments(self, hAdjustment, vAdjustment):
+            """Set the adjustments on the viewport."""
+            self._viewport.set_hadjustment(hAdjustment)
+            self._viewport.set_vadjustment(vAdjustment)
+            self._treeView.set_hadjustment(hAdjustment)
+
+        def _do_size_allocate(self, widget, allocation):
+            """Handler of the size-allocate signal.
+
+            Calls allocate_column_sizes()."""
+            self.allocate_column_sizes(allocation)
+
+        def setStyle(self):
+            """Set the style of the event box from the treeview."""
+            if self._treeView is not None:
+                style = self._treeView.rc_get_style()
+                self._eventBox.modify_bg(0, style.bg[2])
+                self._eventBox.modify_fg(0, style.fg[2])
+
+    class Alignment(gtk.Alignment):
+        """An alignment that remembers the width it was given."""
+        def __init__(self, xalign = 0.0, yalign=0.0,
+                     xscale = 0.0, yscale = 0.0 ):
+            """Construct the alignment."""
+            super(Alignment, self).__init__(xalign = xalign, yalign = yalign,
+                                            xscale = xscale, yscale = yscale)
+            self.allocatedWidth = 0
+            self.connect("size-allocate", self._do_size_allocate)
+
+        def _do_size_allocate(self, widget, allocation):
+            """Called with the new size allocation."""
+            self.allocatedWidth = allocation.width
+
+#------------------------------------------------------------------------------
+
+class CheckButton(gtk.CheckButton):
     """A check button that contains a reference to a row in the delay code
     data table."""
@@ -184,5 +241,5 @@
         self._delayCodeData = None
 
-        self._treeView = TreeView(Gtk.ListStore(str, str))
+        self._treeView = gtk.TreeView(gtk.ListStore(str, str))
         self._treeView.set_rules_hint(True)
 
@@ -192,5 +249,5 @@
         self._checkButtons = []
 
-        self._eventBox = Gtk.EventBox()
+        self._eventBox = gtk.EventBox()
 
         self._table = None
@@ -198,5 +255,5 @@
         self._viewport = self._createViewport()
         self._viewport.add(self._eventBox)
-        self._viewport.set_shadow_type(Gtk.ShadowType.NONE)
+        self._viewport.set_shadow_type(SHADOW_NONE)
 
         self.pack_start(self._viewport, True, True, 0)
@@ -254,14 +311,14 @@
         numRows = len(rows)
 
-        column = Gtk.TreeViewColumn("", Gtk.CellRendererText())
-        column.set_sizing(Gtk.TreeViewColumnSizing.FIXED)
+        column = gtk.TreeViewColumn("", gtk.CellRendererText())
+        column.set_sizing(TREE_VIEW_COLUMN_FIXED)
         self._treeView.append_column(column)
 
         for header in headers:
-            column = Gtk.TreeViewColumn(header, Gtk.CellRendererText())
-            column.set_sizing(Gtk.TreeViewColumnSizing.FIXED)
+            column = gtk.TreeViewColumn(header, gtk.CellRendererText())
+            column.set_sizing(TREE_VIEW_COLUMN_FIXED)
             self._treeView.append_column(column)
 
-        self._table = Gtk.Table(numRows, numColumns)
+        self._table = gtk.Table(numRows, numColumns)
         self._table.set_homogeneous(False)
         self._table.set_col_spacings(16)
@@ -276,12 +333,12 @@
             (type, elements) = rows[i]
             if type==CAPTION:
-                alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+                alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                           xscale = 1.0)
-                label = Gtk.Label("<b>" + elements + "</b>")
+                label = gtk.Label("<b>" + elements + "</b>")
                 label.set_use_markup(True)
                 label.set_alignment(0.0, 0.5)
                 alignment.add(label)
                 self._table.attach(alignment, 1, numColumns, i, i+1,
-                                   yoptions = Gtk.AttachOptions.FILL)
+                                   yoptions = FILL)
                 self._table.set_row_spacing(i, 8)
             elif type==DELAYCODE:
@@ -292,20 +349,18 @@
                 alignment.add(checkButton)
                 self._table.attach(alignment, 0, 1, i, i+1,
-                                   xoptions = Gtk.AttachOptions.FILL,
-                                   yoptions = Gtk.AttachOptions.FILL)
+                                   xoptions = FILL, yoptions = FILL)
                 if firstDelayCodeRow:
                     self._alignments.append(alignment)
 
                 for j in range(0, numColumns-1):
-                    label = Gtk.Label(elements[j])
+                    label = gtk.Label(elements[j])
                     label.set_alignment(0.0, 0.5)
                     alignment = Alignment(xalign = 0.5, yalign = 0.5,
                                           xscale = 1.0)
                     alignment.add(label)
-                    xoptions = Gtk.AttachOptions.FILL
-                    if j==(numColumns-2): xoptions |= Gtk.AttachOptions.EXPAND
+                    xoptions = FILL
+                    if j==(numColumns-2): xoptions |= EXPAND
                     self._table.attach(alignment, j+1, j+2, i, i+1,
-                                       xoptions = xoptions,
-                                       yoptions = Gtk.AttachOptions.FILL)
+                                       xoptions = xoptions, yoptions = FILL)
                     if firstDelayCodeRow:
                         self._alignments.append(alignment)
Index: src/mlx/gui/faultexplain.py
===================================================================
--- src/mlx/gui/faultexplain.py	(revision 999)
+++ src/mlx/gui/faultexplain.py	(revision 842)
@@ -19,5 +19,5 @@
 #-------------------------------------------------------------------------------
 
-class FaultFrame(Gtk.Frame):
+class FaultFrame(gtk.Frame):
     """A frame containing the information about a single fault.
 
@@ -26,18 +26,21 @@
     def __init__(self, faultText):
         """Construct the frame."""
-        Gtk.Frame.__init__(self)
+        gtk.Frame.__init__(self)
 
         self._faultText = faultText
 
-        vbox = Gtk.VBox()
-
-        self._fault = fault = Gtk.Label()
-        fault.set_xalign(0.0)
-        fault.set_justify(Gtk.Justification.LEFT)
-        fault.set_line_wrap(True)
+        vbox = gtk.VBox()
+
+        self._fault = fault = gtk.TextView()
+        fault.set_editable(False)
+        fault.set_can_focus(False)
+        fault.set_wrap_mode(WRAP_WORD)
+
+        buffer = fault.get_buffer()
+        self._faultTag  = buffer.create_tag("fault", weight=WEIGHT_BOLD)
 
         self.faultText = faultText
 
-        faultAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        faultAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                        xscale = 1.0, yscale = 0.0)
         faultAlignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -46,6 +49,6 @@
         vbox.pack_start(faultAlignment, True, True, 4)
 
-        self._explanation = explanation = Gtk.TextView()
-        explanation.set_wrap_mode(Gtk.WrapMode.WORD)
+        self._explanation = explanation = gtk.TextView()
+        explanation.set_wrap_mode(WRAP_WORD)
         explanation.set_accepts_tab(False)
         explanation.set_size_request(-1, 100)
@@ -59,7 +62,11 @@
         self.show_all()
 
-        styleContext = self.get_style_context()
-        color = styleContext.get_background_color(Gtk.StateFlags.NORMAL)
-        fault.override_background_color(0, color)
+        if pygobject:
+            styleContext = self.get_style_context()
+            color = styleContext.get_background_color(gtk.StateFlags.NORMAL)
+            fault.override_background_color(0, color)
+        else:
+            style = self.rc_get_style()
+            fault.modify_base(0, style.bg[0])
 
         self._hasExplanation = False
@@ -74,5 +81,9 @@
         """Update the text of the fault."""
         self._faultText = faultText
-        self._fault.set_markup("<b>" + faultText + "</b>")
+
+        buffer = self._fault.get_buffer()
+        buffer.set_text(faultText)
+        buffer.apply_tag(self._faultTag,
+                         buffer.get_start_iter(), buffer.get_end_iter())
 
     @property
@@ -114,10 +125,10 @@
 #-------------------------------------------------------------------------------
 
-GObject.signal_new("explanation-changed", FaultFrame, GObject.SIGNAL_RUN_FIRST,
+gobject.signal_new("explanation-changed", FaultFrame, gobject.SIGNAL_RUN_FIRST,
                    None, (bool,))
 
 #-------------------------------------------------------------------------------
 
-class FaultExplainWidget(Gtk.Frame):
+class FaultExplainWidget(gtk.Frame):
     """The widget for the faults and their explanations."""
     @staticmethod
@@ -127,5 +138,5 @@
 
     def __init__(self, gui):
-        Gtk.Frame.__init__(self)
+        gtk.Frame.__init__(self)
 
         self._gui = gui
@@ -134,16 +145,16 @@
         label.set_use_underline(True)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
                               padding_left = 4, padding_right = 4)
 
-        self._outerBox = outerBox = Gtk.EventBox()
+        self._outerBox = outerBox = gtk.EventBox()
         outerBox.add(alignment)
 
-        self._innerBox = innerBox = Gtk.EventBox()
+        self._innerBox = innerBox = gtk.EventBox()
         alignment.add(self._innerBox)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -152,11 +163,11 @@
         innerBox.add(alignment)
 
-        scroller = Gtk.ScrolledWindow()
-        scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
-        scroller.set_shadow_type(Gtk.ShadowType.NONE)
-
-        self._faults = Gtk.VBox()
+        scroller = gtk.ScrolledWindow()
+        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scroller.set_shadow_type(SHADOW_NONE)
+
+        self._faults = gtk.VBox()
         self._faults.set_homogeneous(False)
-        scroller.add(self._faults)
+        scroller.add_with_viewport(self._faults)
 
         alignment.add(scroller)
@@ -189,5 +200,5 @@
         """Add a fault with the given ID and text."""
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                       xscale = 1.0, yscale = 0.0)
         alignment.set_padding(padding_top = 2, padding_bottom = 2,
@@ -236,5 +247,5 @@
     def reset(self):
         """Reset the widget by removing all faults."""
-        for (alignment, faultFrame) in self._faultWidgets.values():
+        for (alignment, faultFrame) in self._faultWidgets.itervalues():
             self._faults.remove(alignment)
         self._faults.show_all()
@@ -281,20 +292,24 @@
         not."""
         allExplained = self._numExplanations >= self._numFaults
-        styleContext = self.get_style_context()
-        if allExplained:
-            outerColour = innerColour = Gdk.RGBA(red = 0.0, green=0.0,
-                                                 blue=0.0, alpha=0.0)
+        if pygobject:
+            styleContext = self.get_style_context()
+            if allExplained:
+                outerColour = innerColour = gdk.RGBA(red = 0.0, green=0.0,
+                                                     blue=0.0, alpha=0.0)
+            else:
+                outerColour = \
+                  styleContext.get_background_color(gtk.StateFlags.SELECTED)
+                innerColour = self._gui.backgroundColour
+
+            self._outerBox.override_background_color(gtk.StateFlags.NORMAL,
+                                                     outerColour)
+            self._innerBox.override_background_color(gtk.StateFlags.NORMAL,
+                                                     innerColour)
         else:
-            outerColour = \
-                styleContext.get_border_color(Gtk.StateFlags.DROP_ACTIVE)
-            innerColour = self._gui.backgroundColour
-
-        self._outerBox.override_background_color(Gtk.StateFlags.NORMAL,
-                                                 outerColour)
-        self._innerBox.override_background_color(Gtk.StateFlags.NORMAL,
-                                                 innerColour)
-
-#-------------------------------------------------------------------------------
-
-GObject.signal_new("explanations-changed", FaultExplainWidget,
-                   GObject.SIGNAL_RUN_FIRST, None, (bool,))
+            style = self.rc_get_style()
+            self._outerBox.modify_bg(0, style.bg[0 if allExplained else 3])
+
+#-------------------------------------------------------------------------------
+
+gobject.signal_new("explanations-changed", FaultExplainWidget,
+                   gobject.SIGNAL_RUN_FIRST, None, (bool,))
Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 1008)
+++ src/mlx/gui/flight.py	(revision 872)
@@ -57,5 +57,5 @@
 #-----------------------------------------------------------------------------
 
-comboModel = Gtk.ListStore(GObject.TYPE_STRING)
+comboModel = gtk.ListStore(gobject.TYPE_STRING)
 comboModel.append(("N/A",))
 comboModel.append(("VECTORS",))
@@ -63,5 +63,5 @@
 #-----------------------------------------------------------------------------
 
-class Page(Gtk.Alignment):
+class Page(gtk.Alignment):
     """A page in the flight wizard."""
     def __init__(self, wizard, id, title, help, completedHelp = None):
@@ -72,17 +72,17 @@
                          padding_left = 12, padding_right = 12)
 
-        frame = Gtk.Frame()
+        frame = gtk.Frame()
         self.add(frame)
 
-        self._vbox = Gtk.VBox()
+        self._vbox = gtk.VBox()
         self._vbox.set_homogeneous(False)
         frame.add(self._vbox)
 
-        eventBox = Gtk.EventBox()
-
-        alignment = Gtk.Alignment(xalign = 0.0, xscale = 0.0)
-
-        titleLabel = Gtk.Label(title)
-        titleLabel.modify_font(Pango.FontDescription("bold 24"))
+        eventBox = gtk.EventBox()
+
+        alignment = gtk.Alignment(xalign = 0.0, xscale = 0.0)
+
+        titleLabel = gtk.Label(title)
+        titleLabel.modify_font(pango.FontDescription("bold 24"))
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
                               padding_left = 6, padding_right = 0)
@@ -96,7 +96,7 @@
         self._titleLabel = titleLabel
 
-        mainBox = Gtk.VBox()
-
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        mainBox = gtk.VBox()
+
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 16, padding_bottom = 16,
@@ -105,5 +105,5 @@
         self._vbox.pack_start(alignment, True, True, 0)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
         alignment.set_padding(padding_top = 0, padding_bottom = 16,
@@ -119,20 +119,21 @@
             longerHelp = completedHelp
 
-        self._helpLabel = Gtk.Label(longerHelp)
+        self._helpLabel = gtk.Label(longerHelp)
         # FIXME: should be a constant in common
-        self._helpLabel.set_justify(Gtk.Justification.CENTER)
+        self._helpLabel.set_justify(gtk.Justification.CENTER if pygobject
+                                    else gtk.JUSTIFY_CENTER)
         self._helpLabel.set_use_markup(True)
         alignment.add(self._helpLabel)
         mainBox.pack_start(alignment, False, False, 0)
 
-        self._mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        self._mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                             xscale = 1.0, yscale = 1.0)
         mainBox.pack_start(self._mainAlignment, True, True, 0)
 
-        buttonAlignment =  Gtk.Alignment(xalign = 1.0, xscale=0.0, yscale = 0.0)
+        buttonAlignment =  gtk.Alignment(xalign = 1.0, xscale=0.0, yscale = 0.0)
         buttonAlignment.set_padding(padding_top = 4, padding_bottom = 10,
                                     padding_left = 16, padding_right = 16)
 
-        self._buttonBox = Gtk.HBox()
+        self._buttonBox = gtk.HBox()
         self._buttonBox.set_homogeneous(False)
         self._defaultButton = None
@@ -175,5 +176,5 @@
 
         Return the button object created."""
-        button = Gtk.Button(label)
+        button = gtk.Button(label)
         self._buttonBox.pack_start(button, False, False, padding)
         button.set_use_underline(True)
@@ -219,9 +220,14 @@
     def setStyle(self):
         """Set the styles of some of the items on the page."""
-        context = self.get_style_context()
-        color = context.get_background_color(Gtk.StateFlags.SELECTED)
-        self._titleEventBox.modify_bg(0, color.to_color())
-        color = context.get_color(Gtk.StateFlags.SELECTED)
-        self._titleLabel.modify_fg(0, color.to_color())
+        if pygobject:
+            context = self.get_style_context()
+            color = context.get_background_color(gtk.StateFlags.SELECTED)
+            self._titleEventBox.modify_bg(0, color.to_color())
+            color = context.get_color(gtk.StateFlags.SELECTED)
+            self._titleLabel.modify_fg(0, color.to_color())
+        else:
+            style = self.rc_get_style()
+            self._titleEventBox.modify_bg(0, style.bg[3])
+            self._titleLabel.modify_fg(0, style.fg[3])
 
     def initialize(self):
@@ -299,8 +305,8 @@
                                         xstr("login"), xstr("loginHelp"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(32)
@@ -308,12 +314,12 @@
         self.setMainWidget(alignment)
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("label_pilotID"))
+        label = gtk.Label(xstr("label_pilotID"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 0, 1)
 
-        self._pilotID = Gtk.Entry()
+        self._pilotID = gtk.Entry()
         self._pilotID.connect("changed", self._pilotIDChanged)
         self._pilotID.set_tooltip_text(xstr("login_pilotID_tooltip"))
@@ -321,12 +327,12 @@
         label.set_mnemonic_widget(self._pilotID)
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("label_password"))
+        label = gtk.Label(xstr("label_password"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 1, 2)
 
-        self._password = Gtk.Entry()
+        self._password = gtk.Entry()
         self._password.set_visibility(False)
         self._password.connect("changed", self._setControls)
@@ -335,5 +341,5 @@
         label.set_mnemonic_widget(self._password)
 
-        self._rememberButton = Gtk.CheckButton(xstr("remember_password"))
+        self._rememberButton = gtk.CheckButton(xstr("remember_password"))
         self._rememberButton.set_use_underline(True)
         self._rememberButton.set_tooltip_text(xstr("login_remember_tooltip"))
@@ -399,10 +405,10 @@
     def _offlineClicked(self, button):
         """Called when the offline button was clicked."""
-        print("mlx.flight.LoginPage: offline flight selected")
+        print "mlx.flight.LoginPage: offline flight selected"
         self._wizard.nextPage()
 
     def _loginClicked(self, button):
         """Called when the login button was clicked."""
-        print("mlx.flight.LoginPage: logging in")
+        print "mlx.flight.LoginPage: logging in"
         self._wizard.login(self._handleLoginResult,
                            self._pilotID.get_text(),
@@ -440,10 +446,10 @@
                                                   help, completedHelp = completedHelp)
 
-        mainBox = Gtk.HBox()
+        mainBox = gtk.HBox()
         mainBox.set_homogeneous(False)
 
-        leftVBox = Gtk.VBox()
-
-        alignment = Gtk.Alignment(xscale = 1.0)
+        leftVBox = gtk.VBox()
+
+        alignment = gtk.Alignment(xscale = 1.0)
         alignment.set_size_request(100, 0)
 
@@ -460,11 +466,11 @@
         mainBox.pack_start(self._flightList, False, False, 8)
 
-        flightButtonBox = Gtk.VBox()
-
-        alignment = Gtk.Alignment(xscale = 1.0)
+        flightButtonBox = gtk.VBox()
+
+        alignment = gtk.Alignment(xscale = 1.0)
         alignment.set_size_request(100, 0)
         flightButtonBox.pack_start(alignment, False, False, 0)
 
-        flightButtonWidthAlignment = Gtk.Alignment(xscale=1.0, yscale=0.0,
+        flightButtonWidthAlignment = gtk.Alignment(xscale=1.0, yscale=0.0,
                                                    xalign=0.0, yalign=0.0)
         flightButtonWidthAlignment.set_padding(padding_top = 0,
@@ -472,7 +478,7 @@
                                                padding_left = 8,
                                                padding_right = 0)
-        flightButtonWidthBox = Gtk.VBox()
-
-        self._saveButton = Gtk.Button(xstr("flightsel_save"))
+        flightButtonWidthBox = gtk.VBox()
+
+        self._saveButton = gtk.Button(xstr("flightsel_save"))
         self._saveButton.set_use_underline(True)
         self._saveButton.set_sensitive(False)
@@ -482,5 +488,5 @@
         flightButtonWidthBox.pack_start(self._saveButton, True, True, 4)
 
-        self._printButton = Gtk.Button(xstr("flightsel_print"))
+        self._printButton = gtk.Button(xstr("flightsel_print"))
         self._printButton.set_use_underline(True)
         self._printButton.set_sensitive(False)
@@ -490,5 +496,5 @@
         flightButtonWidthBox.pack_start(self._printButton, True, True, 4)
 
-        self._deleteButton = Gtk.Button(xstr("flightsel_delete"))
+        self._deleteButton = gtk.Button(xstr("flightsel_delete"))
         self._deleteButton.set_use_underline(True)
         self._deleteButton.set_sensitive(False)
@@ -641,17 +647,17 @@
         dialog.hide()
 
-        if response==Gtk.ResponseType.OK:
-            fileName = dialog.get_filename()
-            print("Saving", fileName)
+        if response==RESPONSETYPE_OK:
+            fileName = text2unicode(dialog.get_filename())
+            print "Saving", fileName
             try:
                 with open(fileName, "wt") as f:
                     flight.writeIntoFile(f)
-            except Exception as e:
-                print("Failed to save flight:", util.utf2unicode(str(e)))
-                dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                           type = Gtk.MessageType.ERROR,
+            except Exception, e:
+                print "Failed to save flight:", util.utf2unicode(str(e))
+                dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
+                                           type = MESSAGETYPE_ERROR,
                                            message_format =
                                            xstr("flightsel_save_failed"))
-                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 secondary = xstr("flightsel_save_failed_sec")
@@ -669,5 +675,5 @@
         flight = self._getSelectedFlight()
 
-        printOperation = Gtk.PrintOperation()
+        printOperation = gtk.PrintOperation()
         if self._printSettings is not None:
             printOperation.set_print_settings(self._printSettings)
@@ -684,10 +690,10 @@
         printOperation.set_use_full_page(False)
 
-        result = printOperation.run(Gtk.PrintOperationAction.PRINT_DIALOG,
+        result = printOperation.run(gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG,
                                     wizard.gui.mainWindow)
 
-        if result == Gtk.PrintOperationResult.APPLY:
+        if result == gtk.PRINT_OPERATION_RESULT_APPLY:
             self._printSettings = printOperation.get_print_settings()
-        elif result == Gtk.PrintOperationResult.ERROR:
+        elif result == gtk.PRINT_OPERATION_RESULT_ERROR:
             errorDialog(xstr("flightsel_print_failed",
                              wizard.gui.mainWindow,
@@ -700,10 +706,9 @@
         flight=self._getSelectedFlight()
 
-        print("DPI", context.get_dpi_x(), context.get_dpi_y())
+        print "DPI", context.get_dpi_x(), context.get_dpi_y()
 
         scale = context.get_dpi_x() / 72.0
 
         cr = context.get_cairo_context()
-
         cr.set_antialias(cairo.ANTIALIAS_GRAY)
 
@@ -713,15 +718,13 @@
         cr.stroke()
 
-        pcr = context.create_pango_context()
-
-        layout = Pango.Layout(pcr)
-        layout.set_text("Malév VA official briefing")
-        font = Pango.FontDescription("sans")
-        font.set_size(int(32 * Pango.SCALE))
-        font.set_weight(Pango.Weight.NORMAL)
+        layout = cr.create_layout()
+        layout.set_text(u"Malév VA official briefing")
+        font = pango.FontDescription("sans")
+        font.set_size(int(32 * scale * pango.SCALE))
+        font.set_weight(pango.WEIGHT_NORMAL)
         layout.set_font_description(font)
 
-        (_ink, logical) = layout.get_extents()
-        width = logical.width / Pango.SCALE
+        (_ink, (x0, y0, x1, y1)) = layout.get_extents()
+        width = float(x1 + 1 - x0) / pango.SCALE
 
         y = 25 * scale
@@ -729,28 +732,28 @@
         cr.move_to((context.get_width() - width)/2.0, y)
         cr.set_line_width(0.1 * scale)
-        PangoCairo.layout_path(cr, layout)
+        cr.layout_path(layout)
         cr.stroke_preserve()
         cr.fill()
 
-        y += logical.height / Pango.SCALE
+        y += float(y1 + 1 - y0) / pango.SCALE
         y += 6 * scale
 
-        layout = Pango.Layout(pcr)
-        layout.set_text("%s (%s) részére" %
+        layout = cr.create_layout()
+        layout.set_text(u"%s (%s) részére" %
                         (loginResult.pilotName, loginResult.pilotID))
-        font = Pango.FontDescription("sans")
-        font.set_size(int(16 * Pango.SCALE))
-        font.set_weight(Pango.Weight.MEDIUM)
+        font = pango.FontDescription("sans")
+        font.set_size(int(16 * scale * pango.SCALE))
+        font.set_weight(450)
         layout.set_font_description(font)
-        (_ink, logical) = layout.get_extents()
-        width = logical.width / Pango.SCALE
+        (_ink, (x0, y0, x1, y1)) = layout.get_extents()
+        width = float(x1 + 1 - x0) / pango.SCALE
 
         cr.move_to((context.get_width() - width)/2.0, y)
         cr.set_line_width(0.1 * scale)
-        PangoCairo.layout_path(cr, layout)
+        cr.layout_path(layout)
         cr.stroke_preserve()
         cr.fill()
 
-        y += logical.height / Pango.SCALE
+        y += float(y1 + 1 - y0) / pango.SCALE
         y += 4 * scale
 
@@ -762,7 +765,7 @@
         y += 20 * scale
 
-        font = Pango.FontDescription("sans")
-        font.set_size(int(7 * Pango.SCALE))
-        font.set_weight(Pango.Weight.ULTRALIGHT)
+        font = pango.FontDescription("sans")
+        font.set_size(int(7 * scale * pango.SCALE))
+        font.set_weight(150)
 
         table = []
@@ -796,13 +799,13 @@
         totalHeight = 0
         for (label, value) in table:
-            labelLayout = Pango.Layout(pcr)
+            labelLayout = cr.create_layout()
             labelLayout.set_text(label)
             labelLayout.set_font_description(font)
 
-            (_ink, logical) = labelLayout.get_extents()
-            maxLabelWidth = max(maxLabelWidth, logical.width)
-            labelHeight = logical.height
-
-            valueLayout = Pango.Layout(pcr)
+            (_ink, (x0, y0, x1, y1)) = labelLayout.get_extents()
+            maxLabelWidth = max(maxLabelWidth, x1 + 1 - x0)
+            labelHeight = y1 + 1 - y0
+
+            valueLayout = cr.create_layout()
             valueLayout.set_text(value)
             valueLayout.set_font_description(font)
@@ -810,5 +813,5 @@
             labelLayouts.append((labelLayout, valueLayout, labelHeight))
 
-        maxLabelWidth = maxLabelWidth / Pango.SCALE
+        maxLabelWidth = maxLabelWidth / pango.SCALE
 
         valueX = labelX + labelValueFill + maxLabelWidth
@@ -818,10 +821,10 @@
             (labelFill + maxLabelWidth + labelValueFill + valueFill)
         for (labelLayout, valueLayout, labelHeight) in labelLayouts:
-            valueLayout.set_width(int(valueWidth * Pango.SCALE))
-
-            (_ink, logical) = valueLayout.get_extents()
-            valueHeight = logical.height
-
-            height = float(max(labelHeight, valueHeight))/Pango.SCALE
+            valueLayout.set_width(int(valueWidth * pango.SCALE))
+
+            (_ink, (x0, y0, x1, y1)) = valueLayout.get_extents()
+            valueHeight = y1 + 1 - y0
+
+            height = float(max(labelHeight, valueHeight))/pango.SCALE
             layouts.append((labelLayout, valueLayout, height))
 
@@ -840,5 +843,5 @@
             cr.move_to(labelX, y)
             cr.set_line_width(0.1)
-            PangoCairo.layout_path(cr, labelLayout)
+            cr.layout_path(labelLayout)
             cr.stroke_preserve()
             cr.fill()
@@ -846,5 +849,5 @@
             cr.move_to(valueX, y)
             cr.set_line_width(0.1)
-            PangoCairo.layout_path(cr, valueLayout)
+            cr.layout_path(valueLayout)
             cr.stroke_preserve()
             cr.fill()
@@ -881,5 +884,5 @@
     def _deleteResultCallback(self, returned, result):
         """Called when the deletion result is available."""
-        GObject.idle_add(self._handleDeleteResult, returned, result)
+        gobject.idle_add(self._handleDeleteResult, returned, result)
 
     def _handleDeleteResult(self, returned, result):
@@ -935,7 +938,7 @@
         dialog.hide()
 
-        if response==Gtk.ResponseType.OK:
-            fileName = dialog.get_filename()
-            print("Loading", fileName)
+        if response==RESPONSETYPE_OK:
+            fileName = text2unicode(dialog.get_filename())
+            print "Loading", fileName
             bookedFlight = web.BookedFlight()
             try:
@@ -943,11 +946,11 @@
                     bookedFlight.readFromFile(f)
                 self.addFlight(bookedFlight)
-            except Exception as e:
-                print("Failed to load flight:", util.utf2unicode(str(e)))
-                dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                           type = Gtk.MessageType.ERROR,
+            except Exception, e:
+                print "Failed to load flight:", util.utf2unicode(str(e))
+                dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
+                                           type = MESSAGETYPE_ERROR,
                                            message_format =
                                            xstr("flightsel_load_failed"))
-                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 secondary = xstr("flightsel_load_failed_sec")
@@ -1027,20 +1030,20 @@
 
         gui = self._wizard.gui
-        dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+        dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                        xstr("flightsel_save_title"),
-                                       action = Gtk.FileChooserAction.SAVE,
-                                       buttons = (Gtk.STOCK_CANCEL,
-                                                  Gtk.ResponseType.CANCEL,
-                                                  Gtk.STOCK_OK, Gtk.ResponseType.OK),
+                                       action = FILE_CHOOSER_ACTION_SAVE,
+                                       buttons = (gtk.STOCK_CANCEL,
+                                                  RESPONSETYPE_CANCEL,
+                                                  gtk.STOCK_OK, RESPONSETYPE_OK),
                                        parent = gui.mainWindow)
         dialog.set_modal(True)
         dialog.set_do_overwrite_confirmation(True)
 
-        filter = Gtk.FileFilter()
+        filter = gtk.FileFilter()
         filter.set_name(xstr("flightsel_filter_flights"))
         filter.add_pattern("*.vaflight")
         dialog.add_filter(filter)
 
-        filter = Gtk.FileFilter()
+        filter = gtk.FileFilter()
         filter.set_name(xstr("file_filter_all"))
         filter.add_pattern("*.*")
@@ -1057,19 +1060,19 @@
 
         gui = self._wizard.gui
-        dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+        dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                        xstr("flightsel_load_title"),
-                                       action = Gtk.FileChooserAction.OPEN,
-                                       buttons = (Gtk.STOCK_CANCEL,
-                                                  Gtk.ResponseType.CANCEL,
-                                                  Gtk.STOCK_OK, Gtk.ResponseType.OK),
+                                       action = FILE_CHOOSER_ACTION_OPEN,
+                                       buttons = (gtk.STOCK_CANCEL,
+                                                  RESPONSETYPE_CANCEL,
+                                                  gtk.STOCK_OK, RESPONSETYPE_OK),
                                        parent = gui.mainWindow)
         dialog.set_modal(True)
 
-        filter = Gtk.FileFilter()
+        filter = gtk.FileFilter()
         filter.set_name(xstr("flightsel_filter_flights"))
         filter.add_pattern("*.vaflight")
         dialog.add_filter(filter)
 
-        filter = Gtk.FileFilter()
+        filter = gtk.FileFilter()
         filter.set_name(xstr("file_filter_all"))
         filter.add_pattern("*.*")
@@ -1082,7 +1085,7 @@
     def _createListPopupMenu(self):
         """Get the flight list popup menu."""
-        menu = Gtk.Menu()
-
-        menuItem = Gtk.MenuItem()
+        menu = gtk.Menu()
+
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("flightsel_popup_select"))
         menuItem.set_use_underline(True)
@@ -1092,5 +1095,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("flightsel_popup_save"))
         menuItem.set_use_underline(True)
@@ -1100,5 +1103,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("flightsel_popup_print"))
         menuItem.set_use_underline(True)
@@ -1108,5 +1111,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("flightsel_popup_delete"))
         menuItem.set_use_underline(True)
@@ -1149,7 +1152,7 @@
                                                 xstr("gatesel_help"))
 
-        self._listStore = Gtk.ListStore(str)
-        self._gateList = Gtk.TreeView(self._listStore)
-        column = Gtk.TreeViewColumn(None, Gtk.CellRendererText(),
+        self._listStore = gtk.ListStore(str)
+        self._gateList = gtk.TreeView(self._listStore)
+        column = gtk.TreeViewColumn(None, gtk.CellRendererText(),
                                     text = 0)
         column.set_expand(True)
@@ -1161,12 +1164,15 @@
         gateSelection.connect("changed", self._selectionChanged)
 
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(self._gateList)
         scrolledWindow.set_size_request(50, -1)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
-
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0, xscale = 0.0, yscale = 1.0)
+        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC,
+                                  gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(gtk.ShadowType.IN if pygobject
+                                       else gtk.SHADOW_IN)
+
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.0, xscale = 0.0, yscale = 1.0)
         alignment.add(scrolledWindow)
 
@@ -1230,8 +1236,8 @@
             self._wizard.jumpPage("connect")
         else:
-            dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = xstr("gatesel_conflict"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.format_secondary_markup(xstr("gatesel_conflict_sec"))
@@ -1268,10 +1274,10 @@
                                            xstr("register_help"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(12, 4)
+        table = gtk.Table(12, 3)
         table.set_row_spacings(4)
-        table.set_col_spacings(24)
+        table.set_col_spacings(32)
         alignment.add(table)
         self.setMainWidget(alignment)
@@ -1279,12 +1285,12 @@
         row = 0
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_name1"))
+        label = gtk.Label(xstr("register_name1"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        self._name1 = Gtk.Entry()
+        self._name1 = gtk.Entry()
         self._name1.connect("changed", self._updateButtons)
         self._name1.set_tooltip_text(xstr("register_name1_tooltip"))
@@ -1293,31 +1299,33 @@
         label.set_mnemonic_widget(self._name1)
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        row += 1
+
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_name2"))
+        label = gtk.Label(xstr("register_name2"))
         label.set_use_underline(True)
         labelAlignment.add(label)
-        table.attach(labelAlignment, 2, 3, row, row+1)
-
-        self._name2 = Gtk.Entry()
+        table.attach(labelAlignment, 0, 1, row, row+1)
+
+        self._name2 = gtk.Entry()
         self._name2.connect("changed", self._updateButtons)
         self._name2.set_tooltip_text(xstr("register_name2_tooltip"))
         self._name2.set_width_chars(15)
-        table.attach(self._name2, 3, 4, row, row+1)
+        table.attach(self._name2, 1, 2, row, row+1)
         label.set_mnemonic_widget(self._name2)
 
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_year_of_birth"))
+        label = gtk.Label(xstr("register_year_of_birth"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
 
-        self._yearOfBirth = Gtk.SpinButton()
+        self._yearOfBirth = gtk.SpinButton()
         self._yearOfBirth.set_increments(step = 1, page = 10)
         self._yearOfBirth.set_range(min = RegisterPage._minYearOfBirth,
@@ -1334,12 +1342,12 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_email"))
+        label = gtk.Label(xstr("register_email"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        self._emailAddress = Gtk.Entry()
+        self._emailAddress = gtk.Entry()
         self._emailAddress.connect("changed", self._updateButtons)
         self._emailAddress.set_tooltip_text(xstr("register_email_tooltip"))
@@ -1347,19 +1355,19 @@
         label.set_mnemonic_widget(self._emailAddress)
 
-        self._emailAddressPublic = Gtk.CheckButton(xstr("register_email_public"))
+        self._emailAddressPublic = gtk.CheckButton(xstr("register_email_public"))
         self._emailAddressPublic.set_use_underline(True)
         self._emailAddressPublic.set_tooltip_text(xstr("register_email_public_tooltip"))
-        table.attach(self._emailAddressPublic, 2, 4, row, row+1)
+        table.attach(self._emailAddressPublic, 2, 3, row, row+1)
 
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_vatsim_id"))
+        label = gtk.Label(xstr("register_vatsim_id"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
         self._vatsimID = IntegerEntry()
@@ -1371,12 +1379,14 @@
         label.set_mnemonic_widget(self._vatsimID)
 
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        row += 1
+
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_ivao_id"))
+        label = gtk.Label(xstr("register_ivao_id"))
         label.set_use_underline(True)
         labelAlignment.add(label)
-        table.attach(labelAlignment, 2, 3, row, row+1)
-
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        table.attach(labelAlignment, 0, 1, row, row+1)
+
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
         self._ivaoID = IntegerEntry()
@@ -1385,12 +1395,12 @@
         self._ivaoID.set_width_chars(7)
         alignment.add(self._ivaoID)
-        table.attach(alignment, 3, 4, row, row+1)
+        table.attach(alignment, 1, 2, row, row+1)
         label.set_mnemonic_widget(self._ivaoID)
 
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_phone_num"))
+        label = gtk.Label(xstr("register_phone_num"))
         label.set_use_underline(True)
         label.set_use_markup(True)
@@ -1398,5 +1408,5 @@
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        self._phoneNumber = Gtk.Entry()
+        self._phoneNumber = gtk.Entry()
         self._phoneNumber.set_tooltip_text(xstr("register_phone_num_tooltip"))
         table.attach(self._phoneNumber, 1, 2, row, row+1)
@@ -1405,7 +1415,7 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_nationality"))
+        label = gtk.Label(xstr("register_nationality"))
         label.set_use_underline(True)
         label.set_use_markup(True)
@@ -1414,26 +1424,26 @@
 
 
-        self._nationality = Gtk.Entry()
+        self._nationality = gtk.Entry()
         self._nationality.set_tooltip_text(xstr("register_nationality_tooltip"))
         table.attach(self._nationality, 1, 2, row, row+1)
         label.set_mnemonic_widget(self._nationality)
 
-        placeholder = Gtk.Label()
+        placeholder = gtk.Label()
         placeholder.set_text(xstr("register_password_mismatch"))
         placeholder.set_use_markup(True)
         placeholder.set_child_visible(False)
         placeholder.hide()
-        table.attach(placeholder, 2, 4, row, row+1)
+        table.attach(placeholder, 2, 3, row, row+1)
 
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_password"))
+        label = gtk.Label(xstr("register_password"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        self._password = Gtk.Entry()
+        self._password = gtk.Entry()
         self._password.set_visibility(False)
         self._password.connect("changed", self._updateButtons)
@@ -1442,20 +1452,20 @@
         label.set_mnemonic_widget(self._password)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
-        self._passwordStatus = Gtk.Label()
+        self._passwordStatus = gtk.Label()
         alignment.add(self._passwordStatus)
-        table.attach(alignment, 2, 4, row, row+1)
+        table.attach(alignment, 2, 3, row, row+1)
 
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("register_password2"))
+        label = gtk.Label(xstr("register_password2"))
         label.set_use_underline(True)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        self._password2 = Gtk.Entry()
+        self._password2 = gtk.Entry()
         self._password2.set_visibility(False)
         self._password2.connect("changed", self._updateButtons)
@@ -1464,16 +1474,16 @@
         label.set_mnemonic_widget(self._password2)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
-        self._password2Status = Gtk.Label()
+        self._password2Status = gtk.Label()
         alignment.add(self._password2Status)
-        table.attach(alignment, 2, 4, row, row+1)
+        table.attach(alignment, 2, 3, row, row+1)
 
         row += 1
 
-        self._rememberButton = Gtk.CheckButton(xstr("remember_password"))
+        self._rememberButton = gtk.CheckButton(xstr("remember_password"))
         self._rememberButton.set_use_underline(True)
         self._rememberButton.set_tooltip_text(xstr("login_remember_tooltip"))
-        table.attach(self._rememberButton, 1, 3, row, row+1)
+        table.attach(self._rememberButton, 1, 2, row, row+1)
 
         cancelButton = \
@@ -1619,13 +1629,13 @@
                                             self.phoneNumber, self.nationality,
                                             self.password)
-        print("Registering with data:")
-        print("  name:", self.name1, self.name2, registrationData.firstName, registrationData.surName, requestedNameOrder)
-        print("  yearOfBirth:", self.yearOfBirth, registrationData.yearOfBirth)
-        print("  emailAddress:", self.emailAddress, registrationData.emailAddress)
-        print("  emailAddressPublic:", self.emailAddressPublic, registrationData.emailAddressPublic)
-        print("  vatsimID:", self.vatsimID, registrationData.vatsimID)
-        print("  ivaoID:", self.ivaoID, registrationData.ivaoID)
-        print("  phoneNumber:", self.phoneNumber, registrationData.phoneNumber)
-        print("  nationality:", self.nationality, registrationData.nationality)
+        print "Registering with data:"
+        print "  name:", self.name1, self.name2, registrationData.firstName, registrationData.surName, requestedNameOrder
+        print "  yearOfBirth:", self.yearOfBirth, registrationData.yearOfBirth
+        print "  emailAddress:", self.emailAddress, registrationData.emailAddress
+        print "  emailAddressPublic:", self.emailAddressPublic, registrationData.emailAddressPublic
+        print "  vatsimID:", self.vatsimID, registrationData.vatsimID
+        print "  ivaoID:", self.ivaoID, registrationData.ivaoID
+        print "  phoneNumber:", self.phoneNumber, registrationData.phoneNumber
+        print "  nationality:", self.nationality, registrationData.nationality
 
         gui = self._wizard.gui
@@ -1635,5 +1645,5 @@
     def _registerResultCallback(self, returned, result):
         """Called when the registration result is available."""
-        GObject.idle_add(self._handleRegisterResult, returned, result)
+        gobject.idle_add(self._handleRegisterResult, returned, result)
 
     def _handleRegisterResult(self, returned, result):
@@ -1643,13 +1653,13 @@
         gui.endBusy()
 
-        print("Registration result:")
-        print("  returned:", returned)
+        print "Registration result:"
+        print "  returned:", returned
         if returned:
-            print("  registered:", result.registered)
+            print "  registered:", result.registered
             if result.registered:
-                print("  pilotID", result.pilotID)
-                print("  loggedIn", result.loggedIn)
-            print("  emailAlreadyRegistered:", result.emailAlreadyRegistered)
-            print("  invalidData:", result.invalidData)
+                print "  pilotID", result.pilotID
+                print "  loggedIn", result.loggedIn
+            print "  emailAlreadyRegistered:", result.emailAlreadyRegistered
+            print "  invalidData:", result.invalidData
 
         registrationOK = returned and result.registered
@@ -1663,5 +1673,5 @@
             else:
                 secondaryMessage = xstr("register_nologin") % (result.pilotID,)
-            messageType = Gtk.MessageType.INFO
+            messageType = MESSAGETYPE_INFO
 
             config = gui.config
@@ -1676,13 +1686,13 @@
         elif returned and result.emailAlreadyRegistered:
             secondaryMessage = xstr("register_email_already")
-            messageType = Gtk.MessageType.ERROR
+            messageType = MESSAGETYPE_ERROR
         elif returned and result.invalidData:
             secondaryMessage = xstr("register_invalid_data")
-            messageType = Gtk.MessageType.ERROR
+            messageType = MESSAGETYPE_ERROR
         else:
             secondaryMessage = xstr("register_error")
-            messageType = Gtk.MessageType.ERROR
-
-        dialog = Gtk.MessageDialog(parent = gui.mainWindow,
+            messageType = MESSAGETYPE_ERROR
+
+        dialog = gtk.MessageDialog(parent = gui.mainWindow,
                                    type = messageType,
                                    message_format = message)
@@ -1718,8 +1728,8 @@
         self._getEntryExamStatusCancelled = False
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.5, yscale = 0.0)
 
-        table = Gtk.Table(6, 4)
+        table = gtk.Table(6, 4)
         table.set_row_spacings(4)
         table.set_col_spacings(0)
@@ -1730,16 +1740,15 @@
         row = 0
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
                                        xscale=0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("student_entry_exam_status"))
+        label = gtk.Label(xstr("student_entry_exam_status"))
         label.set_alignment(0.0, 0.5)
         labelAlignment.add(label)
         labelAlignment.resize_children()
-        table.attach(labelAlignment, 0, 1, row, row + 1,
-                     xoptions = Gtk.AttachOptions.FILL)
-
-        alignment = Gtk.Alignment(xalign=0.0, yalign = 0.5,
+        table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = FILL)
+
+        alignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
                                   xscale=1.0, yscale = 0.0)
-        self._entryExamStatus = Gtk.Label()
+        self._entryExamStatus = gtk.Label()
         self._entryExamStatus.set_use_markup(True)
         self._entryExamStatus.set_alignment(0.0, 0.5)
@@ -1750,6 +1759,6 @@
         row += 1
 
-        buttonAlignment = Gtk.Alignment(xalign=0.0, xscale=1.0)
-        button = self._entryExamButton = Gtk.Button(xstr("student_entry_exam"))
+        buttonAlignment = gtk.Alignment(xalign=0.0, xscale=1.0)
+        button = self._entryExamButton = gtk.Button(xstr("student_entry_exam"))
         button.set_use_underline(True)
         button.connect("clicked", self._entryExamClicked)
@@ -1757,20 +1766,18 @@
 
         buttonAlignment.add(button)
-        table.attach(buttonAlignment, 0, 4, row, row + 1,
-                     xoptions = Gtk.AttachOptions.FILL,
+        table.attach(buttonAlignment, 0, 4, row, row + 1, xoptions = FILL,
                      ypadding = 4)
 
         row += 3
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
                                        xscale=0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("student_check_flight_status"))
+        label = gtk.Label(xstr("student_check_flight_status"))
         labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row + 1,
-                     xoptions = Gtk.AttachOptions.FILL)
-
-        alignment = Gtk.Alignment(xalign=0.0, yalign = 0.5,
+        table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = FILL)
+
+        alignment = gtk.Alignment(xalign=0.0, yalign = 0.5,
                                   xscale=1.0, yscale = 0.0)
-        self._checkFlightStatus = Gtk.Label()
+        self._checkFlightStatus = gtk.Label()
         self._checkFlightStatus.set_use_markup(True)
         self._checkFlightStatus.set_alignment(0.0, 0.5)
@@ -1780,19 +1787,19 @@
         row += 1
 
-        alignment = Gtk.Alignment(xalign=0.0, xscale=1.0)
-
-        hbox = Gtk.HBox()
+        alignment = gtk.Alignment(xalign=0.0, xscale=1.0)
+
+        hbox = gtk.HBox()
         hbox.set_homogeneous(False)
         hbox.set_spacing(0)
 
-        aircraftTypesModel = Gtk.ListStore(str, int)
+        aircraftTypesModel = gtk.ListStore(str, int)
         for aircraftType in web.BookedFlight.checkFlightTypes:
             aircraftTypesModel.append([aircraftNames[aircraftType],
                                        aircraftType])
 
-        aircraftTypeAlignment = Gtk.Alignment(xalign = 0.0, xscale = 1.0)
-
-        self._aircraftType = Gtk.ComboBox(model = aircraftTypesModel)
-        renderer = Gtk.CellRendererText()
+        aircraftTypeAlignment = gtk.Alignment(xalign = 0.0, xscale = 1.0)
+
+        self._aircraftType = gtk.ComboBox(model = aircraftTypesModel)
+        renderer = gtk.CellRendererText()
         self._aircraftType.pack_start(renderer, True)
         self._aircraftType.add_attribute(renderer, "text", 0)
@@ -1804,6 +1811,6 @@
         hbox.pack_start(aircraftTypeAlignment, False, False, 0)
 
-        buttonAlignment = Gtk.Alignment(xalign=0.0, xscale=1.0)
-        button = self._checkFlightButton = Gtk.Button(xstr("student_check_flight"))
+        buttonAlignment = gtk.Alignment(xalign=0.0, xscale=1.0)
+        button = self._checkFlightButton = gtk.Button(xstr("student_check_flight"))
         button.set_use_underline(True)
         button.connect("clicked", self._checkFlightClicked)
@@ -1813,6 +1820,5 @@
 
         alignment.add(hbox)
-        table.attach(alignment, 0, 4, row, row + 1,
-                     xoptions = Gtk.AttachOptions.FILL)
+        table.attach(alignment, 0, 4, row, row + 1, xoptions = FILL)
 
     @property
@@ -1824,5 +1830,5 @@
     def activate(self):
         """Activate the student page."""
-        print("StudentPage.activate")
+        print "StudentPage.activate"
         self._getEntryExamStatusCancelled = False
 
@@ -1838,5 +1844,5 @@
     def finalize(self):
         """Finalize the page."""
-        print("StudentPage.finalize")
+        print "StudentPage.finalize"
         self._getEntryExamStatusCancelled = True
 
@@ -1848,5 +1854,5 @@
         """Initiate the query of the entry exam status after the interval."""
         if not self._getEntryExamStatusCancelled:
-            GObject.timeout_add(StudentPage._entryExamStatusQueryInterval,
+            gobject.timeout_add(StudentPage._entryExamStatusQueryInterval,
                                 lambda: self._wizard.gui.webHandler. \
                                 getEntryExamStatus(self._entryExamStatusCallback))
@@ -1854,9 +1860,9 @@
     def _entryExamStatusCallback(self, returned, result):
         """Called when the entry exam status is available."""
-        GObject.idle_add(self._handleEntryExamStatus, returned, result)
+        gobject.idle_add(self._handleEntryExamStatus, returned, result)
 
     def _handleEntryExamStatus(self, returned, result):
         """Called when the entry exam status is availabe."""
-        print("_handleEntryExamStatus", returned, result)
+        print "_handleEntryExamStatus", returned, result
         if returned and not self._getEntryExamStatusCancelled:
             self._entryExamLink = result.entryExamLink
@@ -1901,9 +1907,9 @@
         gui = wizard.gui
 
-        dialog = Gtk.MessageDialog(parent = gui.mainWindow,
-                                   type = Gtk.MessageType.INFO,
+        dialog = gtk.MessageDialog(parent = gui.mainWindow,
+                                   type = MESSAGETYPE_INFO,
                                    message_format = xstr("student_fo"))
 
-        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         secondary = xstr("student_fo_secondary")
@@ -1931,8 +1937,8 @@
         self._selectSimulator = os.name=="nt" or "FORCE_SELECT_SIM" in os.environ
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(7 if self._selectSimulator else 5, 2)
+        table = gtk.Table(7 if self._selectSimulator else 5, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -1941,11 +1947,11 @@
         self.setMainWidget(alignment)
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("connect_flightno"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("connect_flightno"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 0, 1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._flightNumber = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._flightNumber = gtk.Label()
         self._flightNumber.set_width_chars(9)
         self._flightNumber.set_alignment(0.0, 0.5)
@@ -1953,11 +1959,11 @@
         table.attach(labelAlignment, 1, 2, 0, 1)
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("connect_acft"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("connect_acft"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 1, 2)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._aircraft = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._aircraft = gtk.Label()
         self._aircraft.set_width_chars(25)
         self._aircraft.set_alignment(0.0, 0.5)
@@ -1965,11 +1971,11 @@
         table.attach(labelAlignment, 1, 2, 1, 2)
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("connect_tailno"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("connect_tailno"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 2, 3)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._tailNumber = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._tailNumber = gtk.Label()
         self._tailNumber.set_width_chars(10)
         self._tailNumber.set_alignment(0.0, 0.5)
@@ -1977,11 +1983,11 @@
         table.attach(labelAlignment, 1, 2, 2, 3)
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("connect_airport"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("connect_airport"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 3, 4)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._departureICAO = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._departureICAO = gtk.Label()
         self._departureICAO.set_width_chars(6)
         self._departureICAO.set_alignment(0.0, 0.5)
@@ -1989,11 +1995,11 @@
         table.attach(labelAlignment, 1, 2, 3, 4)
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("connect_gate"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("connect_gate"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 4, 5)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._departureGate = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._departureGate = gtk.Label()
         self._departureGate.set_width_chars(5)
         self._departureGate.set_alignment(0.0, 0.5)
@@ -2002,21 +2008,29 @@
 
         if self._selectSimulator:
-            labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0, yalign=0.5)
-            label = Gtk.Label(xstr("connect_sim"))
+            labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0, yalign=0.5)
+            label = gtk.Label(xstr("connect_sim"))
             labelAlignment.add(label)
             table.attach(labelAlignment, 0, 1, 5, 7)
 
-            selectAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0, yalign=0.5)
-
-            selectBox = Gtk.HBox()
-            self._selectMSFS = \
-                Gtk.RadioButton.new_with_mnemonic_from_widget(None,
-                                                              xstr("connect_sim_msfs"))
+            selectAlignment = gtk.Alignment(xalign=0.0, xscale=0.0, yalign=0.5)
+
+            selectBox = gtk.HBox()
+            if pygobject:
+                self._selectMSFS = \
+                  gtk.RadioButton.new_with_mnemonic_from_widget(None,
+                                                                xstr("connect_sim_msfs"))
+            else:
+                self._selectMSFS = gtk.RadioButton(None,
+                                                   xstr("connect_sim_msfs"))
 
             selectBox.pack_start(self._selectMSFS, False, False, 0);
 
-            self._selectXPlane = \
-                Gtk.RadioButton.new_with_mnemonic_from_widget(self._selectMSFS,
-                                                              xstr("connect_sim_xplane"))
+            if pygobject:
+                self._selectXPlane = \
+                  gtk.RadioButton.new_with_mnemonic_from_widget(self._selectMSFS,
+                                                                xstr("connect_sim_xplane"))
+            else:
+                self._selectXPlane = gtk.RadioButton(self._selectMSFS,
+                                                     xstr("connect_sim_xplane"))
 
             selectBox.pack_start(self._selectXPlane, False, False, 8);
@@ -2108,8 +2122,8 @@
                                           completedHelp = xstr("payload_chelp"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(7, 3)
+        table = gtk.Table(7, 3)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -2118,5 +2132,5 @@
         self.setMainWidget(alignment)
 
-        label = Gtk.Label(xstr("payload_crew"))
+        label = gtk.Label(xstr("payload_crew"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -2130,5 +2144,5 @@
         label.set_mnemonic_widget(self._numCrew)
 
-        label = Gtk.Label(xstr("payload_pax"))
+        label = gtk.Label(xstr("payload_pax"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -2142,5 +2156,5 @@
         label.set_mnemonic_widget(self._numPassengers)
 
-        label = Gtk.Label(xstr("payload_bag"))
+        label = gtk.Label(xstr("payload_bag"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -2154,7 +2168,7 @@
         label.set_mnemonic_widget(self._bagWeight)
 
-        table.attach(Gtk.Label("kg"), 2, 3, 2, 3)
-
-        label = Gtk.Label(xstr("payload_cargo"))
+        table.attach(gtk.Label("kg"), 2, 3, 2, 3)
+
+        label = gtk.Label(xstr("payload_cargo"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -2168,7 +2182,7 @@
         label.set_mnemonic_widget(self._cargoWeight)
 
-        table.attach(Gtk.Label("kg"), 2, 3, 3, 4)
-
-        label = Gtk.Label(xstr("payload_mail"))
+        table.attach(gtk.Label("kg"), 2, 3, 3, 4)
+
+        label = gtk.Label(xstr("payload_mail"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -2182,19 +2196,19 @@
         label.set_mnemonic_widget(self._mailWeight)
 
-        table.attach(Gtk.Label("kg"), 2, 3, 4, 5)
-
-        label = Gtk.Label("<b>" + xstr("payload_zfw") + "</b>")
+        table.attach(gtk.Label("kg"), 2, 3, 4, 5)
+
+        label = gtk.Label("<b>" + xstr("payload_zfw") + "</b>")
         label.set_alignment(0.0, 0.5)
         label.set_use_markup(True)
         table.attach(label, 0, 1, 5, 6)
 
-        self._calculatedZFW = Gtk.Label()
+        self._calculatedZFW = gtk.Label()
         self._calculatedZFW.set_width_chars(6)
         self._calculatedZFW.set_alignment(1.0, 0.5)
         table.attach(self._calculatedZFW, 1, 2, 5, 6)
 
-        table.attach(Gtk.Label("kg"), 2, 3, 5, 6)
-
-        self._zfwButton = Gtk.Button(xstr("payload_fszfw"))
+        table.attach(gtk.Label("kg"), 2, 3, 5, 6)
+
+        self._zfwButton = gtk.Button(xstr("payload_fszfw"))
         self._zfwButton.set_use_underline(True)
         self._zfwButton.connect("clicked", self._zfwRequested)
@@ -2202,5 +2216,5 @@
         table.attach(self._zfwButton, 0, 1, 6, 7)
 
-        self._simulatorZFW = Gtk.Label("-")
+        self._simulatorZFW = gtk.Label("-")
         self._simulatorZFW.set_width_chars(6)
         self._simulatorZFW.set_alignment(1.0, 0.5)
@@ -2208,5 +2222,5 @@
         self._simulatorZFWValue = None
 
-        table.attach(Gtk.Label("kg"), 2, 3, 6, 7)
+        table.attach(gtk.Label("kg"), 2, 3, 6, 7)
 
         self.addCancelFlightButton()
@@ -2305,5 +2319,5 @@
     def _handleZFW(self, zfw):
         """Called when the ZFW value is retrieved."""
-        GObject.idle_add(self._processZFW, zfw)
+        gobject.idle_add(self._processZFW, zfw)
 
     def _processZFW(self, zfw):
@@ -2336,8 +2350,8 @@
                                        completedHelp = xstr("time_chelp"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -2346,21 +2360,21 @@
         self.setMainWidget(alignment)
 
-        label = Gtk.Label(xstr("time_departure"))
+        label = gtk.Label(xstr("time_departure"))
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 0, 1)
 
-        self._departure = Gtk.Label()
+        self._departure = gtk.Label()
         self._departure.set_alignment(0.0, 0.5)
         table.attach(self._departure, 1, 2, 0, 1)
 
-        label = Gtk.Label(xstr("time_arrival"))
+        label = gtk.Label(xstr("time_arrival"))
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 1, 2)
 
-        self._arrival = Gtk.Label()
+        self._arrival = gtk.Label()
         self._arrival.set_alignment(0.0, 0.5)
         table.attach(self._arrival, 1, 2, 1, 2)
 
-        self._timeButton = Gtk.Button(xstr("time_fs"))
+        self._timeButton = gtk.Button(xstr("time_fs"))
         self._timeButton.set_use_underline(True)
         self._timeButton.set_tooltip_text(xstr("time_fs_tooltip"))
@@ -2368,5 +2382,5 @@
         table.attach(self._timeButton, 0, 1, 2, 3)
 
-        self._simulatorTime = Gtk.Label("-")
+        self._simulatorTime = gtk.Label("-")
         self._simulatorTime.set_alignment(0.0, 0.5)
         table.attach(self._simulatorTime, 1, 2, 2, 3)
@@ -2395,5 +2409,5 @@
     def _handleTime(self, timestamp):
         """Handle the result of a time retrieval."""
-        GObject.idle_add(self._processTime, timestamp)
+        gobject.idle_add(self._processTime, timestamp)
 
     def _processTime(self, timestamp):
@@ -2439,5 +2453,5 @@
     def _handleFuel(self, fuelData):
         """Callback for the fuel query operation."""
-        GObject.idle_add(self._processFuel, fuelData)
+        gobject.idle_add(self._processFuel, fuelData)
 
     def _processFuel(self, fuelData):
@@ -2458,18 +2472,18 @@
                                         completedHelp = xstr("route_chelp"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         alignment.add(mainBox)
         self.setMainWidget(alignment)
 
-        levelBox = Gtk.HBox()
-
-        label = Gtk.Label(xstr("route_level"))
+        levelBox = gtk.HBox()
+
+        label = gtk.Label(xstr("route_level"))
         label.set_use_underline(True)
         levelBox.pack_start(label, True, True, 0)
 
-        self._cruiseLevel = Gtk.SpinButton()
+        self._cruiseLevel = gtk.SpinButton()
         self._cruiseLevel.set_increments(step = 10, page = 100)
         self._cruiseLevel.set_range(min = 0, max = 500)
@@ -2482,5 +2496,5 @@
         levelBox.pack_start(self._cruiseLevel, False, False, 8)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(levelBox)
@@ -2489,24 +2503,27 @@
 
 
-        routeBox = Gtk.VBox()
-
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        routeBox = gtk.VBox()
+
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
-        label = Gtk.Label(xstr("route_route"))
+        label = gtk.Label(xstr("route_route"))
         label.set_use_underline(True)
         alignment.add(label)
         routeBox.pack_start(alignment, True, True, 0)
 
-        routeWindow = Gtk.ScrolledWindow()
+        routeWindow = gtk.ScrolledWindow()
         routeWindow.set_size_request(400, 80)
-        routeWindow.set_shadow_type(Gtk.ShadowType.IN)
-        routeWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                               Gtk.PolicyType.AUTOMATIC)
+        routeWindow.set_shadow_type(gtk.ShadowType.IN if pygobject
+                                    else gtk.SHADOW_IN)
+        routeWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                               else gtk.POLICY_AUTOMATIC,
+                               gtk.PolicyType.AUTOMATIC if pygobject
+                               else gtk.POLICY_AUTOMATIC)
 
         self._uppercasingRoute = False
 
-        self._route = Gtk.TextView()
+        self._route = gtk.TextView()
         self._route.set_tooltip_text(xstr("route_route_tooltip"))
-        self._route.set_wrap_mode(Gtk.WrapMode.WORD)
+        self._route.set_wrap_mode(WRAP_WORD)
         self._route.get_buffer().connect("changed", self._routeChanged)
         self._route.get_buffer().connect_after("insert-text", self._routeInserted)
@@ -2518,11 +2535,11 @@
         mainBox.pack_start(routeBox, True, True, 8)
 
-        alternateBox = Gtk.HBox()
-
-        label = Gtk.Label(xstr("route_altn"))
+        alternateBox = gtk.HBox()
+
+        label = gtk.Label(xstr("route_altn"))
         label.set_use_underline(True)
         alternateBox.pack_start(label, True, True, 0)
 
-        self._alternate = Gtk.Entry()
+        self._alternate = gtk.Entry()
         self._alternate.set_width_chars(6)
         self._alternate.connect("changed", self._alternateChanged)
@@ -2532,5 +2549,5 @@
         alternateBox.pack_start(self._alternate, False, False, 8)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(alternateBox)
@@ -2626,5 +2643,5 @@
 #-----------------------------------------------------------------------------
 
-class SimBriefCredentialsDialog(Gtk.Dialog):
+class SimBriefCredentialsDialog(gtk.Dialog):
     """A dialog window to ask for SimBrief credentials."""
     def __init__(self, gui, userName, password, rememberPassword):
@@ -2633,11 +2650,11 @@
                                                         xstr("simbrief_credentials_title"),
                                                         gui.mainWindow,
-                                                        Gtk.DialogFlags.MODAL)
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.CANCEL)
-        self.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+                                                        DIALOG_MODAL)
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
+        self.add_button(xstr("button_ok"), RESPONSETYPE_OK)
 
         contentArea = self.get_content_area()
 
-        contentAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        contentAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                          xscale = 0.0, yscale = 0.0)
         contentAlignment.set_padding(padding_top = 4, padding_bottom = 16,
@@ -2646,18 +2663,18 @@
         contentArea.pack_start(contentAlignment, False, False, 0)
 
-        contentVBox = Gtk.VBox()
+        contentVBox = gtk.VBox()
         contentAlignment.add(contentVBox)
 
-        label = Gtk.Label(xstr("simbrief_login_failed"))
+        label = gtk.Label(xstr("simbrief_login_failed"))
         label.set_alignment(0.0, 0.0)
 
         contentVBox.pack_start(label, False, False, 0)
 
-        tableAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        tableAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         tableAlignment.set_padding(padding_top = 24, padding_bottom = 0,
                                    padding_left = 0, padding_right = 0)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -2667,10 +2684,10 @@
         contentVBox.pack_start(tableAlignment, True, True, 0)
 
-        label = Gtk.Label(xstr("simbrief_username"))
+        label = gtk.Label(xstr("simbrief_username"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 0, 1)
 
-        self._userName = Gtk.Entry()
+        self._userName = gtk.Entry()
         self._userName.set_width_chars(16)
         #self._userName.connect("changed",
@@ -2681,10 +2698,10 @@
         label.set_mnemonic_widget(self._userName)
 
-        label = Gtk.Label(xstr("simbrief_password"))
+        label = gtk.Label(xstr("simbrief_password"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 1, 2)
 
-        self._password = Gtk.Entry()
+        self._password = gtk.Entry()
         self._password.set_visibility(False)
         #self._password.connect("changed",
@@ -2695,5 +2712,5 @@
         label.set_mnemonic_widget(self._password)
 
-        self._rememberButton = Gtk.CheckButton(xstr("simbrief_remember_password"))
+        self._rememberButton = gtk.CheckButton(xstr("simbrief_remember_password"))
         self._rememberButton.set_use_underline(True)
         self._rememberButton.set_tooltip_text(xstr("simbrief_remember_tooltip"))
@@ -2786,8 +2803,8 @@
                                                 xstr("simbrief_setup_chelp"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(9, 3)
+        table = gtk.Table(9, 3)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -2796,10 +2813,10 @@
         self.setMainWidget(alignment)
 
-        label = Gtk.Label(xstr("simbrief_username"))
+        label = gtk.Label(xstr("simbrief_username"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 0, 1)
 
-        self._userName = Gtk.Entry()
+        self._userName = gtk.Entry()
         self._userName.set_width_chars(16)
         self._userName.connect("changed",
@@ -2809,10 +2826,10 @@
         label.set_mnemonic_widget(self._userName)
 
-        label = Gtk.Label(xstr("simbrief_password"))
+        label = gtk.Label(xstr("simbrief_password"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 1, 2)
 
-        self._password = Gtk.Entry()
+        self._password = gtk.Entry()
         self._password.set_visibility(False)
         self._password.connect("changed",
@@ -2822,10 +2839,10 @@
         label.set_mnemonic_widget(self._password)
 
-        self._rememberButton = Gtk.CheckButton(xstr("simbrief_remember_password"))
+        self._rememberButton = gtk.CheckButton(xstr("simbrief_remember_password"))
         self._rememberButton.set_use_underline(True)
         self._rememberButton.set_tooltip_text(xstr("simbrief_remember_tooltip"))
         table.attach(self._rememberButton, 1, 2, 2, 3, ypadding = 8)
 
-        label = Gtk.Label(xstr("simbrief_extra_fuel"))
+        label = gtk.Label(xstr("simbrief_extra_fuel"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
@@ -2838,12 +2855,12 @@
         label.set_mnemonic_widget(self._extraFuel)
 
-        table.attach(Gtk.Label("kg"), 2, 3, 3, 4)
-
-        label = Gtk.Label(xstr("simbrief_takeoff_runway"))
+        table.attach(gtk.Label("kg"), 2, 3, 3, 4)
+
+        label = gtk.Label(xstr("simbrief_takeoff_runway"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 4, 5)
 
-        self._takeoffRunway = Gtk.Entry()
+        self._takeoffRunway = gtk.Entry()
         self._takeoffRunway.set_width_chars(10)
         self._takeoffRunway.set_tooltip_text(xstr("simbrief_takeoff_runway_tooltip"))
@@ -2852,10 +2869,10 @@
         label.set_mnemonic_widget(self._takeoffRunway)
 
-        label = Gtk.Label(xstr("simbrief_landing_runway"))
+        label = gtk.Label(xstr("simbrief_landing_runway"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 5, 6)
 
-        self._landingRunway = Gtk.Entry()
+        self._landingRunway = gtk.Entry()
         self._landingRunway.set_width_chars(10)
         self._landingRunway.set_tooltip_text(xstr("simbrief_takeoff_runway_tooltip"))
@@ -2864,11 +2881,11 @@
         label.set_mnemonic_widget(self._landingRunway)
 
-        label = Gtk.Label(xstr("simbrief_climb_profile"))
+        label = gtk.Label(xstr("simbrief_climb_profile"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 6, 7)
 
-        self._climbProfile = Gtk.ComboBox()
-        renderer = Gtk.CellRendererText()
+        self._climbProfile = gtk.ComboBox()
+        renderer = gtk.CellRendererText()
         self._climbProfile.pack_start(renderer, True)
         self._climbProfile.add_attribute(renderer, "text", 0)
@@ -2877,11 +2894,11 @@
         label.set_mnemonic_widget(self._climbProfile)
 
-        label = Gtk.Label(xstr("simbrief_cruise_profile"))
+        label = gtk.Label(xstr("simbrief_cruise_profile"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 7, 8)
 
-        self._cruiseProfile = Gtk.ComboBox()
-        renderer = Gtk.CellRendererText()
+        self._cruiseProfile = gtk.ComboBox()
+        renderer = gtk.CellRendererText()
         self._cruiseProfile.pack_start(renderer, True)
         self._cruiseProfile.add_attribute(renderer, "text", 0)
@@ -2890,11 +2907,11 @@
         label.set_mnemonic_widget(self._cruiseProfile)
 
-        label = Gtk.Label(xstr("simbrief_descent_profile"))
+        label = gtk.Label(xstr("simbrief_descent_profile"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, 8, 9)
 
-        self._descentProfile = Gtk.ComboBox()
-        renderer = Gtk.CellRendererText()
+        self._descentProfile = gtk.ComboBox()
+        renderer = gtk.CellRendererText()
         self._descentProfile.pack_start(renderer, True)
         self._descentProfile.add_attribute(renderer, "text", 0)
@@ -2937,5 +2954,5 @@
                                     (self._descentProfile,
                                      simBriefData.descentProfiles)]:
-            model = Gtk.ListStore(str)
+            model = gtk.ListStore(str)
             for profile in profiles:
                 model.append([profile])
@@ -2974,5 +2991,5 @@
 
             plan = self._getPlan()
-            print("plan:", plan)
+            print "plan:", plan
 
             takeoffRunway = self._takeoffRunway.get_text()
@@ -3010,5 +3027,5 @@
         are returned. Otherwise a dialog box is displayed informing the user of
         invalid credentials and requesting another set of them."""
-        print("_getCredentials", count)
+        print "_getCredentials", count
         if count==0:
             return (self._userName.get_text(), self._password.get_text())
@@ -3023,5 +3040,5 @@
             response = dialog.run()
 
-            if response==Gtk.ResponseType.OK:
+            if response==RESPONSETYPE_OK:
                 userName = dialog.userName
                 self._userName.set_text(userName)
@@ -3044,5 +3061,5 @@
     def _simBriefProgress(self, progress, result, flightInfo):
         """The real SimBrief progress handler."""
-        print("_simBriefProgress", progress, result, flightInfo)
+        print "_simBriefProgress", progress, result, flightInfo
         if result==cef.SIMBRIEF_RESULT_NONE:
             message = SimBriefSetupPage.progress2Message.get(progress,
@@ -3060,11 +3077,11 @@
                 message = SimBriefSetupPage.result2Message.get(result,
                                                                "simbrief_result_unknown")
-                dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                           type = Gtk.MessageType.ERROR,
+                dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
+                                           type = MESSAGETYPE_ERROR,
                                            message_format =
                                            xstr(message) + "\n"+
                                            xstr("simbrief_cancelled"))
 
-                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 secondary = xstr("flightsel_save_failed_sec")
@@ -3162,5 +3179,5 @@
                                               xstr("simbrief_result_title"), "")
 
-        self._alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        self._alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                        xscale = 1.0, yscale = 1.0)
 
@@ -3231,5 +3248,5 @@
 #-----------------------------------------------------------------------------
 
-class FuelTank(Gtk.VBox):
+class FuelTank(gtk.VBox):
     """Widget for the fuel tank."""
     def __init__(self, fuelTank, name, capacity, currentWeight):
@@ -3243,23 +3260,25 @@
         self.expectedWeight = currentWeight
 
-        self._label = label = Gtk.Label("<b>" + name + "</b>")
+        label = gtk.Label("<b>" + name + "</b>")
         label.set_use_markup(True)
         label.set_use_underline(True)
-        label.set_justify(Gtk.Justification.CENTER)
+        label.set_justify(JUSTIFY_CENTER)
         label.set_alignment(0.5, 1.0)
-
-        self._tankFigure = Gtk.EventBox()
-        self._tankFigure.set_size_request(38, 200)
+        self.pack_start(label, False, False, 4)
+
+        self._tankFigure = gtk.EventBox()
+        self._tankFigure.set_size_request(38, -1)
         self._tankFigure.set_visible_window(False)
         self._tankFigure.set_tooltip_markup(xstr("fuel_tank_tooltip"))
 
-        self._tankFigure.connect("draw", self._drawTankFigure)
+        if pygobject:
+            self._tankFigure.connect("draw", self._drawTankFigure)
+        else:
+            self._tankFigure.connect("expose_event", self._drawTankFigure)
         self._tankFigure.connect("button_press_event", self._buttonPressed)
         self._tankFigure.connect("motion_notify_event", self._motionNotify)
-
-        self._tankFigure.add_events(Gdk.EventMask.SCROLL_MASK)
         self._tankFigure.connect("scroll-event", self._scrolled)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 1.0)
         alignment.add(self._tankFigure)
@@ -3267,5 +3286,5 @@
         self.pack_start(alignment, True, True, 4)
 
-        self._expectedButton = Gtk.SpinButton()
+        self._expectedButton = gtk.SpinButton()
         self._expectedButton.set_numeric(True)
         self._expectedButton.set_range(0, self.capacity)
@@ -3278,13 +3297,8 @@
         label.set_mnemonic_widget(self._expectedButton)
 
-    @property
-    def label(self):
-        """Get the label with the caption."""
-        return self._label
-
-    @property
-    def expectedButton(self):
-        """Get the button containing the expected value."""
-        return self._expectedButton
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
+                                  xscale = 0.0, yscale = 1.0)
+        alignment.add(self._expectedButton)
+        self.pack_start(alignment, False, False, 4)
 
     def setCurrent(self, currentWeight):
@@ -3310,9 +3324,12 @@
         triangleSize = 5
 
-        context = eventOrContext
-        (xOffset, yOffset) = (0, 0)
-
-        width = tankFigure.get_allocated_width()
-        height = tankFigure.get_allocated_height()
+        context = eventOrContext if pygobject else tankFigure.window.cairo_create()
+        (xOffset, yOffset) = (0, 0) if pygobject \
+                             else (tankFigure.allocation.x, tankFigure.allocation.y)
+
+        width = tankFigure.get_allocated_width() if pygobject \
+                else tankFigure.allocation.width
+        height = tankFigure.get_allocated_height() if pygobject \
+                 else tankFigure.allocation.height
 
         rectangleX0 = triangleSize
@@ -3388,5 +3405,5 @@
     def _motionNotify(self, tankFigure, event):
         """Called when the mouse pointer moves within the area of a tank figure."""
-        if self._enabled and event.state==Gdk.ModifierType.BUTTON1_MASK:
+        if self._enabled and event.state==BUTTON1_MASK:
             self._setExpectedFromY(event.y)
 
@@ -3394,11 +3411,11 @@
         """Called when a scroll event is received."""
         if self._enabled:
-            increment = 1 if event.state==Gdk.ModifierType.CONTROL_MASK \
-                        else 100 if event.state==Gdk.ModifierType.SHIFT_MASK \
+            increment = 1 if event.state==CONTROL_MASK \
+                        else 100 if event.state==SHIFT_MASK \
                         else 10 if event.state==0 else 0
             if increment!=0:
-                if event.direction==Gdk.ScrollDirection.DOWN:
+                if event.direction==SCROLL_DOWN:
                     increment *= -1
-                self._expectedButton.spin(Gtk.SpinType.USER_DEFINED, increment)
+                self._expectedButton.spin(SPIN_USER_DEFINED, increment)
 
     def _expectedChanged(self, spinButton):
@@ -3423,5 +3440,5 @@
         self._fuelTanks = []
         self._fuelTable = None
-        self._fuelAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        self._fuelAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                             xscale = 0.0, yscale = 1.0)
         self.setMainWidget(self._fuelAlignment)
@@ -3479,8 +3496,6 @@
 
         self._fuelTanks = []
-        self._fuelTable = Gtk.Grid()
-        self._fuelTable.set_column_homogeneous(True)
-        self._fuelTable.set_row_spacing(4)
-        self._fuelTable.set_column_spacing(16 if numTanks<5 else 0)
+        self._fuelTable = gtk.Table(numTanks, 1)
+        self._fuelTable.set_col_spacings(16)
         index = 0
         for (tank, current, capacity) in tankData:
@@ -3489,30 +3504,6 @@
                                      const.fuelTank2string(tank)),
                                 capacity, current)
+            self._fuelTable.attach(fuelTank, index, index+1, 0, 1)
             self._fuelTanks.append(fuelTank)
-
-            alignment = Gtk.Alignment(xalign = 0.5, yalign = 1.0,
-                                      xscale = 1.0, yscale = 0.0)
-            alignment.add(fuelTank.label)
-            self._fuelTable.attach(alignment,
-                                   index*(1 if numTanks<5 else 2), 0,
-                                   1 if numTanks<5 else 3, 1)
-
-            alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                      xscale = 0.0, yscale = 1.0)
-            alignment.add(fuelTank)
-            self._fuelTable.attach(alignment,
-                                   index*(1 if numTanks<5 else 2) +
-                                   (0 if numTanks<5 else 1), 1, 1, 1)
-
-
-            alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
-                                      xscale = 1.0, yscale = 0.0)
-            alignment.add(fuelTank.expectedButton)
-
-            self._fuelTable.attach(alignment,
-                                   index* (1 if numTanks<5 else 2),
-                                   2 if (index%2)==0 or numTanks<5 else 3,
-                                   1 if numTanks<5 else 3, 1)
-
             index += 1
 
@@ -3562,9 +3553,9 @@
             self._wizard.gui.simulator.setFuelLevel([(fuelTank.fuelTank,
                                                       currentLevel)])
-            GObject.timeout_add(50, self._pump)
+            gobject.timeout_add(50, self._pump)
 
     def _notamsCallback(self, returned, result):
         """Callback for the NOTAMs."""
-        GObject.idle_add(self._handleNOTAMs, returned, result)
+        gobject.idle_add(self._handleNOTAMs, returned, result)
 
     def _handleNOTAMs(self, returned, result):
@@ -3585,5 +3576,5 @@
     def _metarsCallback(self, returned, result):
         """Callback for the METARs."""
-        GObject.idle_add(self._handleMETARs, returned, result)
+        gobject.idle_add(self._handleMETARs, returned, result)
 
     def _handleMETARs(self, returned, result):
@@ -3622,24 +3613,26 @@
                                            completedHelp = xstr("briefing_chelp"))
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
 
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         alignment.add(mainBox)
         self.setMainWidget(alignment)
 
-        self._notamsFrame = Gtk.Frame()
+        self._notamsFrame = gtk.Frame()
         self._notamsFrame.set_label(xstr("briefing_notams_init"))
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.set_size_request(-1, 128)
         # FIXME: these constants should be in common
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        self._notams = Gtk.TextView()
+        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC,
+                                  gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC)
+        self._notams = gtk.TextView()
         self._notams.set_editable(False)
         self._notams.set_accepts_tab(False)
-        self._notams.set_wrap_mode(Gtk.WrapMode.WORD)
+        self._notams.set_wrap_mode(gtk.WrapMode.WORD if pygobject else gtk.WRAP_WORD)
         scrolledWindow.add(self._notams)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 0,
@@ -3649,20 +3642,22 @@
         mainBox.pack_start(self._notamsFrame, True, True, 4)
 
-        self._metarFrame = Gtk.Frame()
+        self._metarFrame = gtk.Frame()
         self._metarFrame.set_label(xstr("briefing_metar_init"))
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.set_size_request(-1, 32)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
+        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC,
+                                  gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC)
 
         self._updatingMETAR = False
 
-        self._metar = Gtk.TextView()
+        self._metar = gtk.TextView()
         self._metar.set_accepts_tab(False)
-        self._metar.set_wrap_mode(Gtk.WrapMode.WORD)
+        self._metar.set_wrap_mode(gtk.WrapMode.WORD if pygobject else gtk.WRAP_WORD)
         self._metar.get_buffer().connect("changed", self._metarChanged)
         self._metar.get_buffer().connect_after("insert-text", self._metarInserted)
         scrolledWindow.add(self._metar)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 0,
@@ -3763,5 +3758,5 @@
     def _metarChanged(self, buffer):
         """Called when the METAR has changed."""
-        print("BriefingPage.metarChanged", self._updatingMETAR)
+        print "BriefingPage.metarChanged", self._updatingMETAR
         if not self._updatingMETAR:
             self.metarEdited = True
@@ -3775,5 +3770,5 @@
 
         It uppercases all characters."""
-        print("BriefingPage.metarInserted", self._updatingMETAR)
+        print "BriefingPage.metarInserted", self._updatingMETAR
         if not self._updatingMETAR:
             self._updatingMETAR = True
@@ -3809,8 +3804,8 @@
         self._forwardAllowed = False
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(9, 24)
+        table = gtk.Table(9, 24)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -3821,10 +3816,10 @@
         row = 0
 
-        label = Gtk.Label(xstr("takeoff_metar"))
+        label = gtk.Label(xstr("takeoff_metar"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, row, row+1)
 
-        self._metar = Gtk.Entry()
+        self._metar = gtk.Entry()
         self._metar.set_width_chars(40)
         self._metar.set_tooltip_text(xstr("takeoff_metar_tooltip"))
@@ -3838,10 +3833,10 @@
         row += 1
 
-        label = Gtk.Label(xstr("takeoff_runway"))
+        label = gtk.Label(xstr("takeoff_runway"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, row, row+1)
 
-        self._runway = Gtk.Entry()
+        self._runway = gtk.Entry()
         self._runway.set_width_chars(10)
         self._runway.set_tooltip_text(xstr("takeoff_runway_tooltip"))
@@ -3852,10 +3847,13 @@
         row += 1
 
-        label = Gtk.Label(xstr("takeoff_sid"))
+        label = gtk.Label(xstr("takeoff_sid"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 0, 1, row, row+1)
 
-        self._sid = Gtk.ComboBox.new_with_model_and_entry(comboModel)
+        if pygobject:
+            self._sid = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        else:
+            self._sid = gtk.ComboBoxEntry(comboModel)
 
         self._sid.set_entry_text_column(0)
@@ -3868,5 +3866,5 @@
         row += 1
 
-        label = Gtk.Label(xstr("takeoff_v1"))
+        label = gtk.Label(xstr("takeoff_v1"))
         label.set_use_markup(True)
         label.set_use_underline(True)
@@ -3881,5 +3879,5 @@
         label.set_mnemonic_widget(self._v1)
 
-        self._v1Unit = Gtk.Label(xstr("label_knots"))
+        self._v1Unit = gtk.Label(xstr("label_knots"))
         self._v1Unit.set_alignment(0.0, 0.5)
         table.attach(self._v1Unit, 3, 4, row, row+1)
@@ -3887,5 +3885,5 @@
         row += 1
 
-        label = Gtk.Label(xstr("takeoff_vr"))
+        label = gtk.Label(xstr("takeoff_vr"))
         label.set_use_markup(True)
         label.set_use_underline(True)
@@ -3900,5 +3898,5 @@
         label.set_mnemonic_widget(self._vr)
 
-        self._vrUnit = Gtk.Label(xstr("label_knots"))
+        self._vrUnit = gtk.Label(xstr("label_knots"))
         self._vrUnit.set_alignment(0.0, 0.5)
         table.attach(self._vrUnit, 3, 4, row, row+1)
@@ -3906,5 +3904,5 @@
         row += 1
 
-        label = Gtk.Label(xstr("takeoff_v2"))
+        label = gtk.Label(xstr("takeoff_v2"))
         label.set_use_markup(True)
         label.set_use_underline(True)
@@ -3919,5 +3917,5 @@
         label.set_mnemonic_widget(self._v2)
 
-        self._v2Unit = Gtk.Label(xstr("label_knots"))
+        self._v2Unit = gtk.Label(xstr("label_knots"))
         self._v2Unit.set_alignment(0.0, 0.5)
         table.attach(self._v2Unit, 3, 4, row, row+1)
@@ -3927,5 +3925,5 @@
         self._derateType = acft.DERATE_NONE
 
-        self._derateLabel = Gtk.Label()
+        self._derateLabel = gtk.Label()
         self._derateLabel.set_use_underline(True)
         self._derateLabel.set_markup(xstr("takeoff_derate_tupolev"))
@@ -3933,5 +3931,5 @@
         table.attach(self._derateLabel, 0, 1, row, row+1)
 
-        self._derate = Gtk.Alignment()
+        self._derate = gtk.Alignment()
         table.attach(self._derate, 2, 4, row, row+1)
         self._derateWidget = None
@@ -3942,5 +3940,5 @@
         row += 1
 
-        self._antiIceOn = Gtk.CheckButton(xstr("takeoff_antiice"))
+        self._antiIceOn = gtk.CheckButton(xstr("takeoff_antiice"))
         self._antiIceOn.set_use_underline(True)
         self._antiIceOn.set_tooltip_text(xstr("takeoff_antiice_tooltip"))
@@ -3949,5 +3947,5 @@
         row += 1
 
-        self._rto = Gtk.CheckButton(xstr("takeoff_rto"))
+        self._rto = gtk.CheckButton(xstr("takeoff_rto"))
         self._rto.set_use_underline(True)
         self._rto.set_tooltip_text(xstr("takeoff_rto_tooltip"))
@@ -4027,5 +4025,5 @@
     def activate(self):
         """Activate the page."""
-        print("TakeoffPage.activate")
+        print "TakeoffPage.activate"
 
         self._updatingMETAR = True
@@ -4071,5 +4069,5 @@
     def allowForward(self):
         """Allow going to the next page."""
-        print("TakeoffPage.allowForward")
+        print "TakeoffPage.allowForward"
         self._forwardAllowed = True
         self._updateForwardButton()
@@ -4077,5 +4075,5 @@
     def reset(self):
         """Reset the page if the wizard is reset."""
-        print("TakeoffPage.reset")
+        print "TakeoffPage.reset"
 
         super(TakeoffPage, self).reset()
@@ -4097,5 +4095,5 @@
         pages."""
         if self._active:
-            print("TakeoffPage.changeMETAR")
+            print "TakeoffPage.changeMETAR"
             self._updatingMETAR = True
             self._metar.get_buffer().set_text(metar, -1)
@@ -4118,14 +4116,14 @@
                      self.derate is not None)
 
-        print("TakeoffPage._updateForwardButton: forwardAllowed:", self._forwardAllowed, ", sensitive:", sensitive)
+        print "TakeoffPage._updateForwardButton: forwardAllowed:", self._forwardAllowed, ", sensitive:", sensitive
         if self._forwardAllowed:
-            print("  METAR: ", self._metar.get_text())
-            print("  runway: ", self._runway.get_text())
-            print("  SID:", self.sid)
-            print("  V1:", self.v1)
-            print("  VR:", self.vr)
-            print("  V2:", self.v2)
-            print("  derateType:", self._derateType)
-            print("  derate:", self.derate)
+            print "  METAR: ", self._metar.get_text()
+            print "  runway: ", self._runway.get_text()
+            print "  SID:", self.sid
+            print "  V1:", self.v1
+            print "  VR:", self.vr
+            print "  V2:", self.v2
+            print "  derateType:", self._derateType
+            print "  derate:", self.derate
 
         self._button.set_sensitive(sensitive)
@@ -4133,5 +4131,5 @@
     def _valueChanged(self, widget, arg = None):
         """Called when the value of some widget has changed."""
-        print("TakeoffPage._valueChanged")
+        print "TakeoffPage._valueChanged"
 
         self._updateForwardButton()
@@ -4140,5 +4138,5 @@
         """Called when the value of some entry widget has changed and the value
         should be converted to uppercase."""
-        print("TakeoffPage._upperChanged")
+        print "TakeoffPage._upperChanged"
         entry.set_text(entry.get_text().upper())
         self._valueChanged(entry, arg)
@@ -4153,5 +4151,5 @@
     def _derateChanged(self, entry):
         """Called when the value of the derate is changed."""
-        print("TakeoffPage._derateChanged")
+        print "TakeoffPage._derateChanged"
         self._updateForwardButton()
 
@@ -4183,5 +4181,5 @@
             self._derateLabel.set_sensitive(True)
 
-            self._derateEntry = Gtk.Entry()
+            self._derateEntry = gtk.Entry()
             self._derateEntry.set_width_chars(7)
             self._derateEntry.set_tooltip_text(xstr("takeoff_derate_boeing_tooltip"))
@@ -4190,8 +4188,8 @@
             self._derateLabel.set_mnemonic_widget(self._derateEntry)
 
-            self._derateUnit = Gtk.Label("%")
+            self._derateUnit = gtk.Label("%")
             self._derateUnit.set_alignment(0.0, 0.5)
 
-            self._derateWidget = Gtk.Table(3, 1)
+            self._derateWidget = gtk.Table(3, 1)
             self._derateWidget.set_row_spacings(4)
             self._derateWidget.set_col_spacings(16)
@@ -4207,5 +4205,5 @@
             self._derateLabel.set_sensitive(True)
 
-            self._derateWidget = Gtk.Entry()
+            self._derateWidget = gtk.Entry()
             self._derateWidget.set_width_chars(7)
             self._derateWidget.set_tooltip_text(xstr("takeoff_derate_epr_tooltip"))
@@ -4220,14 +4218,22 @@
             self._derateLabel.set_sensitive(True)
 
-            nominal = Gtk.RadioButton.\
-                new_with_label_from_widget(None,
-                                           xstr("takeoff_derate_tupolev_nominal"))
+            if pygobject:
+                nominal = gtk.RadioButton.\
+                  new_with_label_from_widget(None,
+                                             xstr("takeoff_derate_tupolev_nominal"))
+            else:
+                nominal = gtk.RadioButton(None,
+                                          xstr("takeoff_derate_tupolev_nominal"))
             nominal.set_use_underline(True)
             nominal.set_tooltip_text(xstr("takeoff_derate_tupolev_nominal_tooltip"))
             nominal.connect("toggled", self._derateChanged)
 
-            takeoff = Gtk.RadioButton.\
-                new_with_label_from_widget(nominal,
-                                           xstr("takeoff_derate_tupolev_takeoff"))
+            if pygobject:
+                takeoff = gtk.RadioButton.\
+                  new_with_label_from_widget(nominal,
+                                             xstr("takeoff_derate_tupolev_takeoff"))
+            else:
+                takeoff = gtk.RadioButton(nominal,
+                                          xstr("takeoff_derate_tupolev_takeoff"))
 
             takeoff.set_use_underline(True)
@@ -4237,5 +4243,5 @@
             self._derateButtons = [nominal, takeoff]
 
-            self._derateWidget = Gtk.HBox()
+            self._derateWidget = gtk.HBox()
             self._derateWidget.pack_start(nominal, False, False, 4)
             self._derateWidget.pack_start(takeoff, False, False, 4)
@@ -4245,5 +4251,5 @@
             self._derateLabel.set_text("")
 
-            self._derateWidget = Gtk.CheckButton(xstr("takeoff_derate_b462"))
+            self._derateWidget = gtk.CheckButton(xstr("takeoff_derate_b462"))
             self._derateWidget.set_tooltip_text(xstr("takeoff_derate_b462_tooltip"))
             self._derateWidget.set_use_underline(True)
@@ -4256,5 +4262,5 @@
     def _metarChanged(self, entry):
         """Called when the METAR has changed."""
-        print("TakeoffPage.metarChanged", self._updatingMETAR)
+        print "TakeoffPage.metarChanged", self._updatingMETAR
         if not self._updatingMETAR:
             self._updateForwardButton()
@@ -4265,5 +4271,5 @@
 
         It uppercases all characters."""
-        print("TakeoffPage.metarInserted", self._updatingMETAR)
+        print "TakeoffPage.metarInserted", self._updatingMETAR
         if not self._updatingMETAR:
             self._updatingMETAR = True
@@ -4288,22 +4294,22 @@
         self._activated = False
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                   xscale = 0.0, yscale = 1.0)
 
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         alignment.add(mainBox)
         self.setMainWidget(alignment)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
         mainBox.pack_start(alignment, False, False, 16)
 
-        levelBox = Gtk.HBox()
-
-        label = Gtk.Label(xstr("route_level"))
+        levelBox = gtk.HBox()
+
+        label = gtk.Label(xstr("route_level"))
         label.set_use_underline(True)
         levelBox.pack_start(label, True, True, 0)
 
-        self._cruiseLevel = Gtk.SpinButton()
+        self._cruiseLevel = gtk.SpinButton()
         self._cruiseLevel.set_increments(step = 10, page = 100)
         self._cruiseLevel.set_range(min = 50, max = 500)
@@ -4315,5 +4321,5 @@
         levelBox.pack_start(self._cruiseLevel, False, False, 8)
 
-        self._updateButton = Gtk.Button(xstr("cruise_route_level_update"));
+        self._updateButton = gtk.Button(xstr("cruise_route_level_update"));
         self._updateButton.set_use_underline(True)
         self._updateButton.set_tooltip_text(xstr("cruise_route_level_update_tooltip"))
@@ -4324,5 +4330,5 @@
         mainBox.pack_start(levelBox, False, False, 0)
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 1.0)
         mainBox.pack_start(alignment, True, True, 0)
@@ -4402,8 +4408,8 @@
         self._flightEnded = False
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(7, 24)
+        table = gtk.Table(7, 24)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -4414,10 +4420,10 @@
         row = 0
 
-        label = Gtk.Label(xstr("landing_metar"))
+        label = gtk.Label(xstr("landing_metar"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row+1)
 
-        self._metar = Gtk.Entry()
+        self._metar = gtk.Entry()
         self._metar.set_width_chars(40)
         self._metar.set_tooltip_text(xstr("landing_metar_tooltip"))
@@ -4431,10 +4437,13 @@
         row += 1
 
-        label = Gtk.Label(xstr("landing_star"))
+        label = gtk.Label(xstr("landing_star"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
 
-        self._star = Gtk.ComboBox.new_with_model_and_entry(comboModel)
+        if pygobject:
+            self._star = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        else:
+            self._star = gtk.ComboBoxEntry(comboModel)
 
         self._star.set_entry_text_column(0)
@@ -4448,10 +4457,13 @@
         row += 1
 
-        label = Gtk.Label(xstr("landing_transition"))
+        label = gtk.Label(xstr("landing_transition"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
 
-        self._transition = Gtk.ComboBox.new_with_model_and_entry(comboModel)
+        if pygobject:
+            self._transition = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        else:
+            self._transition = gtk.ComboBoxEntry(comboModel)
 
         self._transition.set_entry_text_column(0)
@@ -4465,10 +4477,10 @@
         row += 1
 
-        label = Gtk.Label(xstr("landing_runway"))
+        label = gtk.Label(xstr("landing_runway"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
 
-        self._runway = Gtk.Entry()
+        self._runway = gtk.Entry()
         self._runway.set_width_chars(10)
         self._runway.set_tooltip_text(xstr("landing_runway_tooltip"))
@@ -4479,10 +4491,10 @@
         row += 1
 
-        label = Gtk.Label(xstr("landing_approach"))
+        label = gtk.Label(xstr("landing_approach"))
         label.set_use_underline(True)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
 
-        self._approachType = Gtk.Entry()
+        self._approachType = gtk.Entry()
         self._approachType.set_width_chars(10)
         self._approachType.set_tooltip_text(xstr("landing_approach_tooltip"))
@@ -4493,5 +4505,5 @@
         row += 1
 
-        label = Gtk.Label(xstr("landing_vref"))
+        label = gtk.Label(xstr("landing_vref"))
         label.set_use_markup(True)
         label.set_use_underline(True)
@@ -4506,10 +4518,10 @@
         label.set_mnemonic_widget(self._vref)
 
-        self._vrefUnit = Gtk.Label(xstr("label_knots"))
+        self._vrefUnit = gtk.Label(xstr("label_knots"))
         table.attach(self._vrefUnit, 4, 5, row, row + 1)
 
         row += 1
 
-        self._antiIceOn = Gtk.CheckButton(xstr("landing_antiice"))
+        self._antiIceOn = gtk.CheckButton(xstr("landing_antiice"))
         self._antiIceOn.set_use_underline(True)
         self._antiIceOn.set_tooltip_text(xstr("landing_antiice_tooltip"))
@@ -4616,5 +4628,5 @@
         pages."""
         if self._active:
-            print("LandingPage.changeMETAR")
+            print "LandingPage.changeMETAR"
             self._updatingMETAR = True
             self._metar.get_buffer().set_text(metar, -1)
@@ -4677,5 +4689,5 @@
     def _metarChanged(self, entry):
         """Called when the METAR has changed."""
-        print("LandingPage.metarChanged", self._updatingMETAR)
+        print "LandingPage.metarChanged", self._updatingMETAR
         if not self._updatingMETAR:
             self._updateForwardButton()
@@ -4686,5 +4698,5 @@
 
         It uppercases all characters."""
-        print("LandingPage.metarInserted", self._updatingMETAR)
+        print "LandingPage.metarInserted", self._updatingMETAR
         if not self._updatingMETAR:
             self._updatingMETAR = True
@@ -4728,5 +4740,5 @@
         self._lastSavePath = os.path.join(self._wizard.gui.config.pirepDirectory,
                                           self._getDefaultPIREPName())
-        self._lastSavePath = self._lastSavePath
+        self._lastSavePath = text2unicode(self._lastSavePath)
         self._savePIREP(page, automatic = True)
 
@@ -4764,6 +4776,6 @@
         dialog.hide()
 
-        if result==Gtk.ResponseType.OK:
-            self._lastSavePath = dialog.get_filename()
+        if result==RESPONSETYPE_OK:
+            self._lastSavePath = text2unicode(dialog.get_filename())
             self._savePIREP(page)
 
@@ -4783,9 +4795,9 @@
 
         if error:
-            type = Gtk.MessageType.ERROR
+            type = MESSAGETYPE_ERROR
             message = xstr("finish_save_failed")
-            secondary = xstr("finish_save_failed_sec") % (error,)
+            secondary = xstr("finish_save_failed_sec") % (text2unicode(error),)
         else:
-            type = Gtk.MessageType.INFO
+            type = MESSAGETYPE_INFO
             message = xstr("finish_save_done")
             if automatic:
@@ -4795,7 +4807,7 @@
             page.setPIREPSaved()
 
-        dialog = Gtk.MessageDialog(parent = gui.mainWindow,
+        dialog = gtk.MessageDialog(parent = gui.mainWindow,
                                    type = type, message_format = message)
-        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         if secondary is not None:
@@ -4811,20 +4823,20 @@
         if self._savePIREPDialog is None:
             gui = self._wizard.gui
-            dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+            dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                            xstr("finish_save_title"),
-                                           action = Gtk.FileChooserAction.SAVE,
-                                           buttons = (Gtk.STOCK_CANCEL,
-                                                      Gtk.ResponseType.CANCEL,
-                                                      Gtk.STOCK_OK, Gtk.ResponseType.OK),
+                                           action = FILE_CHOOSER_ACTION_SAVE,
+                                           buttons = (gtk.STOCK_CANCEL,
+                                                      RESPONSETYPE_CANCEL,
+                                                      gtk.STOCK_OK, RESPONSETYPE_OK),
                                            parent = gui.mainWindow)
             dialog.set_modal(True)
             dialog.set_do_overwrite_confirmation(True)
 
-            filter = Gtk.FileFilter()
+            filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_pireps"))
             filter.add_pattern("*.pirep")
             dialog.add_filter(filter)
 
-            filter = Gtk.FileFilter()
+            filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_all"))
             filter.add_pattern("*.*")
@@ -4845,8 +4857,8 @@
                                          xstr("finish_title"), help)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
 
-        table = Gtk.Table(10, 2)
+        table = gtk.Table(10, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
@@ -4857,11 +4869,11 @@
         row = 0
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_rating"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_rating"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._flightRating = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._flightRating = gtk.Label()
         self._flightRating.set_width_chars(8)
         self._flightRating.set_alignment(0.0, 0.5)
@@ -4872,11 +4884,11 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_dep_time"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_dep_time"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._depTime = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._depTime = gtk.Label()
         self._depTime.set_width_chars(13)
         self._depTime.set_alignment(0.0, 0.5)
@@ -4888,11 +4900,11 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_flight_time"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_flight_time"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._flightTime = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._flightTime = gtk.Label()
         self._flightTime.set_width_chars(10)
         self._flightTime.set_alignment(0.0, 0.5)
@@ -4903,11 +4915,11 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_block_time"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_block_time"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._blockTime = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._blockTime = gtk.Label()
         self._blockTime.set_width_chars(10)
         self._blockTime.set_alignment(0.0, 0.5)
@@ -4918,11 +4930,11 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_arr_time"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_arr_time"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._arrTime = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._arrTime = gtk.Label()
         self._arrTime.set_width_chars(13)
         self._arrTime.set_alignment(0.0, 0.5)
@@ -4934,11 +4946,11 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_distance"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_distance"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._distanceFlown = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._distanceFlown = gtk.Label()
         self._distanceFlown.set_width_chars(10)
         self._distanceFlown.set_alignment(0.0, 0.5)
@@ -4949,11 +4961,11 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign=1.0, xscale=0.0)
-        label = Gtk.Label(xstr("finish_fuel"))
+        labelAlignment = gtk.Alignment(xalign=1.0, xscale=0.0)
+        label = gtk.Label(xstr("finish_fuel"))
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        labelAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
-        self._fuelUsed = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
+        self._fuelUsed = gtk.Label()
         self._fuelUsed.set_width_chars(10)
         self._fuelUsed.set_alignment(0.0, 0.5)
@@ -4964,7 +4976,7 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, xscale = 0.0,
+        labelAlignment = gtk.Alignment(xalign = 1.0, xscale = 0.0,
                                        yalign = 0.5, yscale = 0.0)
-        label = Gtk.Label(xstr("finish_type"))
+        label = gtk.Label(xstr("finish_type"))
         label.set_use_underline(True)
         labelAlignment.add(label)
@@ -4975,5 +4987,5 @@
         self._flightType.set_active(0)
         self._flightType.connect("changed", self._flightTypeChanged)
-        flightTypeAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
+        flightTypeAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
         flightTypeAlignment.add(self._flightType)
         table.attach(flightTypeAlignment, 1, 2, row, row+1)
@@ -4982,8 +4994,8 @@
         row += 1
 
-        self._onlineFlight = Gtk.CheckButton(xstr("finish_online"))
+        self._onlineFlight = gtk.CheckButton(xstr("finish_online"))
         self._onlineFlight.set_use_underline(True)
         self._onlineFlight.set_tooltip_text(xstr("finish_online_tooltip"))
-        onlineFlightAlignment = Gtk.Alignment(xalign=0.0, xscale=0.0)
+        onlineFlightAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
         onlineFlightAlignment.add(self._onlineFlight)
         table.attach(onlineFlightAlignment, 1, 2, row, row + 1)
@@ -4991,20 +5003,20 @@
         row += 1
 
-        labelAlignment = Gtk.Alignment(xalign = 1.0, xscale = 0.0,
+        labelAlignment = gtk.Alignment(xalign = 1.0, xscale = 0.0,
                                        yalign = 0.5, yscale = 0.0)
-        self._gateLabel = Gtk.Label(xstr("finish_gate"))
+        self._gateLabel = gtk.Label(xstr("finish_gate"))
         self._gateLabel.set_use_underline(True)
         labelAlignment.add(self._gateLabel)
         table.attach(labelAlignment, 0, 1, row, row+1)
 
-        self._gatesModel = Gtk.ListStore(str)
-
-        self._gate = Gtk.ComboBox(model = self._gatesModel)
-        renderer = Gtk.CellRendererText()
+        self._gatesModel = gtk.ListStore(str)
+
+        self._gate = gtk.ComboBox(model = self._gatesModel)
+        renderer = gtk.CellRendererText()
         self._gate.pack_start(renderer, True)
         self._gate.add_attribute(renderer, "text", 0)
         self._gate.set_tooltip_text(xstr("finish_gate_tooltip"))
         self._gate.connect("changed", self._gateChanged)
-        gateAlignment = Gtk.Alignment(xalign=0.0, xscale=1.0)
+        gateAlignment = gtk.Alignment(xalign=0.0, xscale=1.0)
         gateAlignment.add(self._gate)
         table.attach(gateAlignment, 1, 2, row, row+1)
@@ -5158,15 +5170,15 @@
         gui = self._wizard.gui
         if not self._pirepSent and not self._pirepSaved:
-            dialog = Gtk.MessageDialog(parent = gui.mainWindow,
-                                       type = Gtk.MessageType.QUESTION,
+            dialog = gtk.MessageDialog(parent = gui.mainWindow,
+                                       type = MESSAGETYPE_QUESTION,
                                        message_format = xstr("finish_newFlight_question"))
 
-            dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
-            dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
+            dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
+            dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
 
             dialog.set_title(WINDOW_TITLE_BASE)
             result = dialog.run()
             dialog.hide()
-            if result!=Gtk.ResponseType.YES:
+            if result!=RESPONSETYPE_YES:
                 return
 
@@ -5205,8 +5217,7 @@
         pass
 
-    def _formatTime(self, scheduledTime, realTimestamp, warningError):
+    def _formatTime(self, scheduledTime, realTimestamp, (warning, error)):
         """Format the departure or arrival time based on the given data as a
         markup for a label."""
-        (warning, error) = warningError
         realTime = time.gmtime(realTimestamp)
 
@@ -5276,7 +5287,7 @@
                                                     "")
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
-        self._label = Gtk.Label()
+        self._label = gtk.Label()
         alignment.add(self._label)
 
@@ -5353,5 +5364,5 @@
     def _checkFlightPassedSetCallback(self, returned, result):
         """Called when the check flight status has been set."""
-        GObject.idle_add(self._checkFlightPassedSet, returned, result)
+        gobject.idle_add(self._checkFlightPassedSet, returned, result)
 
     def _checkFlightPassedSet(self, returned, result):
@@ -5364,6 +5375,6 @@
             self._resetGUI()
         else:
-            dialog = Gtk.MessageDialog(parent = gui.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = gui.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format =
                                        xstr("chkfinish_passedset_failed"))
@@ -5384,5 +5395,5 @@
 #-----------------------------------------------------------------------------
 
-class Wizard(Gtk.VBox):
+class Wizard(gtk.VBox):
     """The flight wizard."""
     def __init__(self, gui):
@@ -5443,5 +5454,4 @@
 
         self._initialize()
-        self._allocateSize()
 
     def _sizeAllocate(self, widget, allocation):
@@ -5449,12 +5459,4 @@
            self._requestedHeight is not None:
            return
-
-        (maxWidth, maxHeight) = self._allocateSize()
-
-        self._requestedWidth = maxWidth
-        self._requestedHeight = maxHeight
-
-    def _allocateSize(self):
-        """Perform the real size allocation."""
 
         if self._currentPage is not None:
@@ -5467,6 +5469,6 @@
             self.show_all()
             pageSizeRequest = page.size_request()
-            width = pageSizeRequest.width
-            height = pageSizeRequest.height
+            width = pageSizeRequest.width if pygobject else pageSizeRequest[0]
+            height = pageSizeRequest.height if pygobject else pageSizeRequest[1]
             maxWidth = max(maxWidth, width)
             maxHeight = max(maxHeight, height)
@@ -5476,7 +5478,7 @@
             self.add(self._pages[self._currentPage])
 
+        self._requestedWidth = maxWidth
+        self._requestedHeight = maxHeight
         self.set_size_request(maxWidth, maxHeight)
-
-        return (maxWidth, maxHeight)
 
     @property
@@ -5750,5 +5752,5 @@
         elif stage==const.STAGE_LANDING:
             if not self._arrivalBriefingPage.metarEdited:
-                print("Downloading arrival METAR again")
+                print "Downloading arrival METAR again"
                 self.gui.webHandler.getMETARs(self._arrivalMETARCallback,
                                               [self._bookedFlight.arrivalICAO])
@@ -5879,5 +5881,5 @@
     def _loginResultCallback(self, returned, result):
         """The login result callback, called in the web handler's thread."""
-        GObject.idle_add(self._handleLoginResult, returned, result)
+        gobject.idle_add(self._handleLoginResult, returned, result)
 
     def _handleLoginResult(self, returned, result):
@@ -5896,8 +5898,8 @@
                                    if self.entranceExam else
                                    xstr("login_invalid"))
-                dialog = Gtk.MessageDialog(parent = self.gui.mainWindow,
-                                           type = Gtk.MessageType.ERROR,
+                dialog = gtk.MessageDialog(parent = self.gui.mainWindow,
+                                           type = MESSAGETYPE_ERROR,
                                            message_format = message)
-                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 if isReload:
@@ -5913,8 +5915,8 @@
             message = xstr("reload_failconn") if isReload \
                       else xstr("login_failconn")
-            dialog = Gtk.MessageDialog(parent = self.gui.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self.gui.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = message)
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             secondary = xstr("reload_failconn_sec") if isReload \
@@ -5979,5 +5981,5 @@
     def _arrivalMETARCallback(self, returned, result):
         """Called when the METAR of the arrival airport is retrieved."""
-        GObject.idle_add(self._handleArrivalMETAR, returned, result)
+        gobject.idle_add(self._handleArrivalMETAR, returned, result)
 
     def _handleArrivalMETAR(self, returned, result):
Index: src/mlx/gui/flightlist.py
===================================================================
--- src/mlx/gui/flightlist.py	(revision 999)
+++ src/mlx/gui/flightlist.py	(revision 868)
@@ -22,5 +22,5 @@
         self._convertFn = convertFn
         self._renderer = \
-          Gtk.CellRendererText() if renderer is None else renderer
+          gtk.CellRendererText() if renderer is None else renderer
         self._extraColumnAttributes = extraColumnAttributes
         self._sortable = sortable
@@ -47,12 +47,12 @@
 
         @param index is the 0-based index of the column."""
-        if isinstance(self._renderer, Gtk.CellRendererText):
-            column = Gtk.TreeViewColumn(self._heading, self._renderer,
+        if isinstance(self._renderer, gtk.CellRendererText):
+            column = gtk.TreeViewColumn(self._heading, self._renderer,
                                         text = index)
-        elif isinstance(self._renderer, Gtk.CellRendererToggle):
-            column = Gtk.TreeViewColumn(self._heading, self._renderer,
+        elif isinstance(self._renderer, gtk.CellRendererToggle):
+            column = gtk.TreeViewColumn(self._heading, self._renderer,
                                         active = index)
         else:
-            column = Gtk.TreeViewColumn(self._heading, self._renderer)
+            column = gtk.TreeViewColumn(self._heading, self._renderer)
         column.set_expand(True)
         if self._sortable:
@@ -61,5 +61,5 @@
 
         if self._extraColumnAttributes is not None:
-            for (key, value) in self._extraColumnAttributes.items():
+            for (key, value) in self._extraColumnAttributes.iteritems():
                 if key=="alignment":
                     self._renderer.set_alignment(value, 0.5)
@@ -83,5 +83,5 @@
 #-----------------------------------------------------------------------------
 
-class FlightList(Gtk.Alignment):
+class FlightList(gtk.Alignment):
     """Construct the flight list.
 
@@ -114,13 +114,13 @@
             columnDescriptor.appendType(types)
 
-        self._model = Gtk.ListStore(*types)
+        self._model = gtk.ListStore(*types)
         if defaultSortableIndex is not None:
-            sortOrder = Gtk.SortType.DESCENDING \
+            sortOrder = SORT_DESCENDING \
               if self._columnDescriptors[defaultSortableIndex-1]._defaultDescending \
-              else Gtk.SortType.ASCENDING
+              else SORT_ASCENDING
             self._model.set_sort_column_id(defaultSortableIndex, sortOrder)
-        self._view = Gtk.TreeView(self._model)
-
-        flightIndexColumn = Gtk.TreeViewColumn()
+        self._view = gtk.TreeView(self._model)
+
+        flightIndexColumn = gtk.TreeViewColumn()
         flightIndexColumn.set_visible(False)
         self._view.append_column(flightIndexColumn)
@@ -138,14 +138,17 @@
         selection.connect("changed", self._selectionChanged)
         if multiSelection:
-            selection.set_mode(Gtk.SelectionMode.MULTIPLE)
-
-        scrolledWindow = Gtk.ScrolledWindow()
+            selection.set_mode(SELECTION_MULTIPLE)
+
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(self._view)
         if widthRequest is not None:
             scrolledWindow.set_size_request(widthRequest, -1)
         # FIXME: these should be constants in common.py
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC,
+                                  gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(gtk.ShadowType.IN if pygobject
+                                       else gtk.SHADOW_IN)
 
         super(FlightList, self).__init__(xalign = 0.5, yalign = 0.0,
@@ -168,5 +171,5 @@
     def hasFlights(self):
         """Determine if there are any flights in the list."""
-        return self._model.get_iter_first() is not None
+        return self._model.get_iter_root() is not None
 
     def clear(self):
@@ -206,5 +209,5 @@
     def _buttonPressEvent(self, widget, event):
         """Called when a mouse button is pressed or released."""
-        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3 or \
+        if event.type!=EVENT_BUTTON_PRESS or event.button!=3 or \
            self._popupMenuProducer is None:
             return
@@ -219,5 +222,8 @@
             self._popupMenu = self._popupMenuProducer()
         menu = self._popupMenu
-        menu.popup(None, None, None, None, event.button, event.time)
+        if pygobject:
+            menu.popup(None, None, None, None, event.button, event.time)
+        else:
+            menu.popup(None, None, None, event.button, event.time)
 
     def _selectionChanged(self, selection):
@@ -227,13 +233,13 @@
 #-------------------------------------------------------------------------------
 
-GObject.signal_new("row-activated", FlightList, GObject.SIGNAL_RUN_FIRST,
+gobject.signal_new("row-activated", FlightList, gobject.SIGNAL_RUN_FIRST,
                    None, (int,))
 
-GObject.signal_new("selection-changed", FlightList, GObject.SIGNAL_RUN_FIRST,
+gobject.signal_new("selection-changed", FlightList, gobject.SIGNAL_RUN_FIRST,
                    None, (object,))
 
 #-----------------------------------------------------------------------------
 
-class PendingFlightsFrame(Gtk.Frame):
+class PendingFlightsFrame(gtk.Frame):
     """A frame for a list of pending (reported or rejected) flights.
 
@@ -265,6 +271,5 @@
     def __init__(self, which, wizard, window, pirepEditable = False):
         """Construct the frame with the given title."""
-        super(PendingFlightsFrame, self).__init__()
-        self.set_label(xstr("pendflt_title_" + which))
+        super(PendingFlightsFrame, self).__init__(xstr("pendflt_title_" + which))
 
         self._which = which
@@ -273,9 +278,9 @@
         self._pirepEditable = pirepEditable
 
-        alignment = Gtk.Alignment(xscale = 1.0, yscale = 1.0)
+        alignment = gtk.Alignment(xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 2, padding_bottom = 8,
                               padding_left = 4, padding_right = 4)
 
-        hbox = Gtk.HBox()
+        hbox = gtk.HBox()
 
         self._flights = []
@@ -289,7 +294,7 @@
         hbox.pack_start(self._flightList, True, True, 4)
 
-        buttonBox = Gtk.VBox()
-
-        self._editButton = Gtk.Button(xstr("pendflt_" +
+        buttonBox = gtk.VBox()
+
+        self._editButton = gtk.Button(xstr("pendflt_" +
                                            ("edit" if pirepEditable else
                                             "view") + "_" + which))
@@ -299,5 +304,5 @@
         buttonBox.pack_start(self._editButton, False, False, 2)
 
-        self._reflyButton = Gtk.Button(xstr("pendflt_refly_" + which))
+        self._reflyButton = gtk.Button(xstr("pendflt_refly_" + which))
         self._reflyButton.set_sensitive(False)
         self._reflyButton.set_use_underline(True)
@@ -305,5 +310,5 @@
         buttonBox.pack_start(self._reflyButton, False, False, 2)
 
-        self._deleteButton = Gtk.Button(xstr("pendflt_delete_" + which))
+        self._deleteButton = gtk.Button(xstr("pendflt_delete_" + which))
         self._deleteButton.set_sensitive(False)
         self._deleteButton.set_use_underline(True)
@@ -355,5 +360,5 @@
     def _pirepResultCallback(self, returned, result):
         """Called when the PIREP query result is available."""
-        GObject.idle_add(self._handlePIREPResult, returned, result)
+        gobject.idle_add(self._handlePIREPResult, returned, result)
 
     def _handlePIREPResult(self, returned, result):
@@ -387,5 +392,5 @@
     def _reflyResultCallback(self, returned, result):
         """Called when the refly result is available."""
-        GObject.idle_add(self._handleReflyResult, returned, result)
+        gobject.idle_add(self._handleReflyResult, returned, result)
 
     def _handleReflyResult(self, returned, result):
@@ -396,5 +401,5 @@
         gui.endBusy()
 
-        print("PendingFlightsFrame._handleReflyResult", returned, result)
+        print "PendingFlightsFrame._handleReflyResult", returned, result
 
         if returned:
@@ -430,5 +435,5 @@
     def _deleteResultCallback(self, returned, result):
         """Called when the deletion result is available."""
-        GObject.idle_add(self._handleDeleteResult, returned, result)
+        gobject.idle_add(self._handleDeleteResult, returned, result)
 
     def _handleDeleteResult(self, returned, result):
@@ -439,5 +444,5 @@
         gui.endBusy()
 
-        print("PendingFlightsFrame._handleDeleteResult", returned, result)
+        print "PendingFlightsFrame._handleDeleteResult", returned, result
 
         if returned:
@@ -458,7 +463,7 @@
     def _producePopupMenu(self):
         """Create the popup menu for the flights."""
-        menu = Gtk.Menu()
-
-        menuItem = Gtk.MenuItem()
+        menu = gtk.Menu()
+
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("pendflt_" +
                                 ("edit" if self._pirepEditable else "view") +
@@ -470,5 +475,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("pendflt_refly_" + self._which))
         menuItem.set_use_underline(True)
@@ -478,5 +483,5 @@
         menu.append(menuItem)
 
-        menuItem = Gtk.MenuItem()
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("pendflt_delete_" + self._which))
         menuItem.set_use_underline(True)
@@ -503,5 +508,5 @@
 #-----------------------------------------------------------------------------
 
-class PendingFlightsWindow(Gtk.Window):
+class PendingFlightsWindow(gtk.Window):
     """The window to display the lists of the pending (reported or rejected)
     flights."""
@@ -517,10 +522,10 @@
         self.set_modal(True)
 
-        mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 1.0, yscale = 1.0)
         mainAlignment.set_padding(padding_top = 0, padding_bottom = 12,
                                   padding_left = 8, padding_right = 8)
 
-        vbox = Gtk.VBox()
+        vbox = gtk.VBox()
 
         self._reportedFrame = PendingFlightsFrame("reported", wizard, self,
@@ -531,9 +536,8 @@
         vbox.pack_start(self._rejectedFrame, True, True, 2)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
-        self._closeButton = Gtk.Button(xstr("button_ok"))
+        self._closeButton = gtk.Button(xstr("button_ok"))
         self._closeButton.connect("clicked", self._closeClicked)
-        self._closeButton.set_use_underline(True)
         alignment.add(self._closeButton)
         vbox.pack_start(alignment, False, False, 2)
@@ -580,5 +584,5 @@
         If the Escape key is pressed, 'delete-event' is emitted to close the
         window."""
-        if Gdk.keyval_name(event.keyval) == "Escape":
+        if gdk.keyval_name(event.keyval) == "Escape":
             self.emit("delete-event", None)
             return True
@@ -586,5 +590,5 @@
 #-----------------------------------------------------------------------------
 
-class AcceptedFlightsWindow(Gtk.Window):
+class AcceptedFlightsWindow(gtk.Window):
     """A window for a list of accepted flights."""
     def getFlightDuration(flightTimeStart, flight):
@@ -622,5 +626,5 @@
                          extraColumnAttributes =
                              { "alignment": 1.0 },
-                         cellDataFn = lambda col, cell, model, iter, data:
+                         cellDataFn = lambda col, cell, model, iter:
                              cell.set_property("text",
                                                "%.0f" %
@@ -638,11 +642,11 @@
         self.set_transient_for(gui.mainWindow)
 
-        alignment = Gtk.Alignment(xscale = 1.0, yscale = 1.0)
+        alignment = gtk.Alignment(xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 2, padding_bottom = 8,
                               padding_left = 4, padding_right = 4)
 
-        vbox = Gtk.VBox()
-
-        hbox = Gtk.HBox()
+        vbox = gtk.VBox()
+
+        hbox = gtk.HBox()
         vbox.pack_start(hbox, True, True, 4)
 
@@ -657,20 +661,18 @@
         hbox.pack_start(self._flightList, True, True, 4)
 
-        buttonBox = Gtk.VBox()
-
-        self._refreshButton = Gtk.Button(xstr("acceptedflt_refresh"))
+        buttonBox = gtk.VBox()
+
+        self._refreshButton = gtk.Button(xstr("acceptedflt_refresh"))
         self._refreshButton.set_sensitive(True)
-        self._refreshButton.set_use_underline(True)
         self._refreshButton.connect("clicked", self._refreshClicked)
         buttonBox.pack_start(self._refreshButton, False, False, 2)
 
-        filler = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        filler = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                xscale = 1.0, yscale = 1.0)
         filler.set_size_request(-1, 4)
         buttonBox.pack_start(filler, False, False, 0)
 
-        self._viewButton = Gtk.Button(xstr("acceptedflt_view"))
+        self._viewButton = gtk.Button(xstr("acceptedflt_view"))
         self._viewButton.set_sensitive(False)
-        self._viewButton.set_use_underline(True)
         self._viewButton.connect("clicked", self._viewClicked)
         buttonBox.pack_start(self._viewButton, False, False, 2)
@@ -678,10 +680,9 @@
         hbox.pack_start(buttonBox, False, False, 4)
 
-        buttonAlignment = Gtk.Alignment(xscale = 0.0, yscale = 0.0,
+        buttonAlignment = gtk.Alignment(xscale = 0.0, yscale = 0.0,
                                         xalign = 0.5, yalign = 0.5)
 
-        self._closeButton =  Gtk.Button(xstr("button_ok"))
+        self._closeButton =  gtk.Button(xstr("button_ok"))
         self._closeButton.connect("clicked", self._closeClicked)
-        self._closeButton.set_use_underline(True)
 
         buttonAlignment.add(self._closeButton)
@@ -741,5 +742,5 @@
     def _pirepResultCallback(self, returned, result):
         """Called when the PIREP query result is available."""
-        GObject.idle_add(self._handlePIREPResult, returned, result)
+        gobject.idle_add(self._handlePIREPResult, returned, result)
 
     def _handlePIREPResult(self, returned, result):
@@ -763,5 +764,5 @@
         If the Escape key is pressed, 'delete-event' is emitted to close the
         window."""
-        if Gdk.keyval_name(event.keyval) == "Escape":
+        if gdk.keyval_name(event.keyval) == "Escape":
             self.emit("delete-event", None)
             return True
Index: src/mlx/gui/gates.py
===================================================================
--- src/mlx/gui/gates.py	(revision 996)
+++ src/mlx/gui/gates.py	(revision 619)
@@ -19,5 +19,5 @@
 #-------------------------------------------------------------------------------
 
-class FleetGateStatus(Gtk.VBox):
+class FleetGateStatus(gtk.VBox):
     """The tab to display the fleet and gate status."""
     def __init__(self, gui):
@@ -27,5 +27,5 @@
         self._gui = gui
 
-        mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 1.0, yscale = 1.0)
         mainAlignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -33,20 +33,20 @@
         self.add(mainAlignment)
 
-        self._mainBox = mainBox = Gtk.VBox()
+        self._mainBox = mainBox = gtk.VBox()
         mainAlignment.add(mainBox)
     
-        self._statusBox = statusBox = Gtk.HBox()
+        self._statusBox = statusBox = gtk.HBox()
         mainBox.pack_start(statusBox, True, True, 4)
 
-        fleetFrame = Gtk.Frame(label = xstr("gates_fleet_title"))
+        fleetFrame = gtk.Frame(label = xstr("gates_fleet_title"))
         fleetLabel = fleetFrame.get_label_widget()
         fleetLabel.set_use_underline(True)
         statusBox.pack_start(fleetFrame, False, False, 4)
 
-        self._fleetStore = Gtk.ListStore(str, str)
-        self._fleetList = Gtk.TreeView(self._fleetStore)
+        self._fleetStore = gtk.ListStore(str, str)
+        self._fleetList = gtk.TreeView(self._fleetStore)
         self._fleetList.set_tooltip_markup(xstr("gates_planes_tooltip"))
         fleetLabel.set_mnemonic_widget(self._fleetList)
-        column = Gtk.TreeViewColumn(xstr("gates_tailno"), Gtk.CellRendererText(),
+        column = gtk.TreeViewColumn(xstr("gates_tailno"), gtk.CellRendererText(),
                                     text = 0)
         column.set_expand(True)
@@ -54,5 +54,5 @@
         self._fleetList.append_column(column)
 
-        column = Gtk.TreeViewColumn(xstr("gates_planestatus"), Gtk.CellRendererText(),
+        column = gtk.TreeViewColumn(xstr("gates_planestatus"), gtk.CellRendererText(),
                                     markup = 1)
         column.set_expand(True)
@@ -60,15 +60,18 @@
         self._fleetList.append_column(column)
 
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(self._fleetList)
         scrolledWindow.set_size_request(200, -1)
         # FIXME: these should be constants in common.py
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC,
+                                  gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(gtk.ShadowType.IN if pygobject
+                                       else gtk.SHADOW_IN)
 
 
         self._fleetAlignment =  alignment = \
-                               Gtk.Alignment(xalign = 0.5, yalign = 0.0,
+                               gtk.Alignment(xalign = 0.5, yalign = 0.0,
                                              xscale = 0.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -77,11 +80,11 @@
         fleetFrame.add(alignment)        
         
-        self._gatesFrame = gatesFrame = Gtk.Frame(label = xstr("gates_gates_title"))
+        self._gatesFrame = gatesFrame = gtk.Frame(label = xstr("gates_gates_title"))
         statusBox.pack_start(gatesFrame, True, True, 4)        
 
-        self._gatesTable = table = Gtk.Table(lhbpGates.numRows,
+        self._gatesTable = table = gtk.Table(lhbpGates.numRows,
                                              lhbpGates.numColumns)
         table.set_tooltip_markup(xstr("gates_gates_tooltip"))
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -97,5 +100,5 @@
                 gate = data
 
-                label = Gtk.Label()
+                label = gtk.Label()
                 label.set_markup("<b>" + gate.number + "</b>")
                 table.attach(label, column, column + 1, row, row + 1)
@@ -109,10 +112,10 @@
                 column += 1
 
-        button = Gtk.Button(xstr("gates_refresh"))
+        button = gtk.Button(xstr("gates_refresh"))
         button.set_use_underline(True)
         button.set_tooltip_text(xstr("gates_refresh_tooltip"))
         button.connect("clicked", self._refreshClicked)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(button)
@@ -140,5 +143,5 @@
         self._fleetStore.clear()
         if fleet is None:
-            for (gateNumber, label) in self._gateLabels.items():
+            for (gateNumber, label) in self._gateLabels.iteritems():
                 label.set_markup("<b>" + gateNumber + "</b>")
         else:        
@@ -162,5 +165,7 @@
                 self._fleetStore.append([tailNumber, status])
             # FIXME: this should be a constant in common.py
-            self._fleetStore.set_sort_column_id(0, Gtk.SortType.ASCENDING)
+            self._fleetStore.set_sort_column_id(0,
+                                                gtk.SortType.ASCENDING if pygobject
+                                                else gtk.SORT_ASCENDING)
 
             occupiedGateNumbers = fleet.getOccupiedGateNumbers()
Index: src/mlx/gui/gui.py
===================================================================
--- src/mlx/gui/gui.py	(revision 1010)
+++ src/mlx/gui/gui.py	(revision 951)
@@ -1,8 +1,8 @@
 # -*- coding: utf-8 -*-
 
-from .statusicon import StatusIcon
-from .statusbar import Statusbar
-from .info import FlightInfo
-from .update import Updater
+from statusicon import StatusIcon
+from statusbar import Statusbar
+from info import FlightInfo
+from update import Updater
 from mlx.gui.common import *
 from mlx.gui.flight import Wizard
@@ -18,5 +18,5 @@
 from mlx.gui.acars import ACARS
 from mlx.gui.timetable import TimetableWindow
-from . import cef
+import cef
 
 import mlx.const as const
@@ -51,17 +51,17 @@
 class GUI(fs.ConnectionListener):
     """The main GUI class."""
-    _authors = [ ("Váradi", "István", "prog_test"),
-                 ("Galyassy", "Tamás", "negotiation"),
-                 ("Kurják", "Ákos", "test"),
-                 ("Nagy", "Dániel", "test"),
-                 ("Radó", "Iván", "test"),
-                 ("Petrovszki", "Gábor", "test"),
-                 ("Serfőző", "Tamás", "test"),
-                 ("Szebenyi", "Bálint", "test"),
-                 ("Zsebényi-Loksa", "Gergely", "test") ]
+    _authors = [ (u"Váradi", u"István", "prog_test"),
+                 (u"Galyassy", u"Tamás", "negotiation"),
+                 (u"Kurják", u"Ákos", "test"),
+                 (u"Nagy", u"Dániel", "test"),
+                 (u"Radó", u"Iván", "test"),
+                 (u"Petrovszki", u"Gábor", "test"),
+                 (u"Serfőző", u"Tamás", "test"),
+                 (u"Szebenyi", u"Bálint", "test"),
+                 (u"Zsebényi-Loksa", u"Gergely", "test") ]
 
     def __init__(self, programDirectory, config):
         """Construct the GUI."""
-        GObject.threads_init()
+        gobject.threads_init()
 
         self._programDirectory = programDirectory
@@ -108,7 +108,5 @@
         """Build the GUI."""
 
-        self._mainWindow = window = Gtk.Window()
-        if os.name!="nt":
-            window.set_visual(window.get_screen().lookup_visual(0x21))
+        self._mainWindow = window = gtk.Window()
         window.set_title(WINDOW_TITLE_BASE)
         window.set_icon_from_file(os.path.join(iconDirectory, "logo.ico"))
@@ -118,9 +116,9 @@
         if os.name=="nt":
             window.connect("leave-notify-event", self._handleLeaveNotify)
-        accelGroup = Gtk.AccelGroup()
+        accelGroup = gtk.AccelGroup()
         window.add_accel_group(accelGroup)
         window.realize()
 
-        mainVBox = Gtk.VBox()
+        mainVBox = gtk.VBox()
         window.add(mainVBox)
 
@@ -137,9 +135,9 @@
         mainVBox.pack_start(menuBar, False, False, 0)
 
-        self._notebook = Gtk.Notebook()
+        self._notebook = gtk.Notebook()
         mainVBox.pack_start(self._notebook, True, True, 4)
 
         self._wizard = Wizard(self)
-        label = Gtk.Label(xstr("tab_flight"))
+        label = gtk.Label(xstr("tab_flight"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("tab_flight_tooltip"))
@@ -147,5 +145,5 @@
 
         self._flightInfo = FlightInfo(self)
-        label = Gtk.Label(xstr("tab_flight_info"))
+        label = gtk.Label(xstr("tab_flight_info"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("tab_flight_info_tooltip"))
@@ -154,5 +152,5 @@
 
         self._weightHelp = WeightHelp(self)
-        label = Gtk.Label(xstr("tab_weight_help"))
+        label = gtk.Label(xstr("tab_weight_help"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("tab_weight_help_tooltip"))
@@ -161,5 +159,5 @@
         (logWidget, self._logView)  = self._buildLogWidget()
         addFaultTag(self._logView.get_buffer())
-        label = Gtk.Label(xstr("tab_log"))
+        label = gtk.Label(xstr("tab_log"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("tab_log_tooltip"))
@@ -167,5 +165,5 @@
 
         self._fleetGateStatus = FleetGateStatus(self)
-        label = Gtk.Label(xstr("tab_gates"))
+        label = gtk.Label(xstr("tab_gates"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("tab_gates_tooltip"))
@@ -173,5 +171,5 @@
 
         self._acars = ACARS(self)
-        label = Gtk.Label("ACARS")
+        label = gtk.Label("ACARS")
         label.set_use_underline(True)
         self._notebook.append_page(self._acars, label)
@@ -180,5 +178,5 @@
         self._debugLogWidget.show_all()
 
-        mainVBox.pack_start(Gtk.HSeparator(), False, False, 0)
+        mainVBox.pack_start(gtk.HSeparator(), False, False, 0)
 
         self._statusbar = Statusbar(iconDirectory)
@@ -199,4 +197,6 @@
 
         window.show_all()
+        if os.name=="nt":
+            window.get_window().focus()
 
         self._wizard.grabDefault()
@@ -206,5 +206,6 @@
         self._statusIcon = StatusIcon(iconDirectory, self)
 
-        self._busyCursor = Gdk.Cursor(Gdk.CursorType.WATCH)
+        self._busyCursor = gdk.Cursor(gdk.CursorType.WATCH if pygobject
+                                      else gdk.WATCH)
 
         self._loadPIREPDialog = None
@@ -360,5 +361,5 @@
     def takeoffAntiIceOn(self, value):
         """Set the anti-ice on indicator."""
-        GObject.idle_add(self._setTakeoffAntiIceOn, value)
+        gobject.idle_add(self._setTakeoffAntiIceOn, value)
 
     @property
@@ -400,5 +401,5 @@
     def landingAntiIceOn(self, value):
         """Set the anti-ice on indicator."""
-        GObject.idle_add(self._setLandingAntiIceOn, value)
+        gobject.idle_add(self._setLandingAntiIceOn, value)
 
     @property
@@ -443,9 +444,10 @@
         return self._flightInfo.faultsFullyExplained
 
-    @property
-    def backgroundColour(self):
-        """Get the background colour of the main window."""
-        return self._mainWindow.get_style_context().\
-            get_background_color(Gtk.StateFlags.NORMAL)
+    if pygobject:
+        @property
+        def backgroundColour(self):
+            """Get the background colour of the main window."""
+            return self._mainWindow.get_style_context().\
+              get_background_color(gtk.StateFlags.NORMAL)
 
     def run(self):
@@ -461,5 +463,5 @@
 
         singleton.raiseCallback = self.raiseCallback
-        Gtk.main()
+        gtk.main()
         singleton.raiseCallback = None
 
@@ -470,5 +472,5 @@
     def updateDone(self):
         """Called when the update is done (and there is no need to restart)."""
-        GObject.idle_add(self._updateDone)
+        gobject.idle_add(self._updateDone)
 
     def connected(self, fsType, descriptor):
@@ -479,5 +481,5 @@
         fs.sendMessage(const.MESSAGETYPE_INFORMATION,
                        "Welcome to MAVA Logger X " + const.VERSION)
-        GObject.idle_add(self._handleConnected, fsType, descriptor)
+        gobject.idle_add(self._handleConnected, fsType, descriptor)
 
     def _handleConnected(self, fsType, descriptor):
@@ -494,5 +496,5 @@
         """Called when the connection failed."""
         self._logger.untimedMessage("Connection to the simulator failed")
-        GObject.idle_add(self._connectionFailed)
+        gobject.idle_add(self._connectionFailed)
 
     def _connectionFailed(self):
@@ -501,6 +503,6 @@
         self._statusbar.updateConnection(self._connecting, self._connected)
 
-        dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                   type = Gtk.MessageType.ERROR,
+        dialog = gtk.MessageDialog(parent = self._mainWindow,
+                                   type = MESSAGETYPE_ERROR,
                                    message_format = xstr("conn_failed"))
 
@@ -527,5 +529,5 @@
             self._flight.disconnected()
 
-        GObject.idle_add(self._disconnected)
+        gobject.idle_add(self._disconnected)
 
     def _disconnected(self):
@@ -533,5 +535,5 @@
         self._statusbar.updateConnection(self._connecting, self._connected)
 
-        dialog = Gtk.MessageDialog(type = Gtk.MessageType.ERROR,
+        dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
                                    message_format = xstr("conn_broken"),
                                    parent = self._mainWindow)
@@ -572,5 +574,5 @@
     def _bookFlightsCallback(self, returned, result):
         """Called when the booking of flights has finished."""
-        GObject.idle_add(self._handleBookFlightsResult, returned, result)
+        gobject.idle_add(self._handleBookFlightsResult, returned, result)
 
     def _handleBookFlightsResult(self, returned, result):
@@ -591,10 +593,10 @@
     def cancelFlight(self):
         """Cancel the current file, if the user confirms it."""
-        dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                   type = Gtk.MessageType.QUESTION,
+        dialog = gtk.MessageDialog(parent = self._mainWindow,
+                                   type = MESSAGETYPE_QUESTION,
                                    message_format = xstr("cancelFlight_question"))
 
-        dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
-        dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
+        dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
+        dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
 
         dialog.set_title(WINDOW_TITLE_BASE)
@@ -602,5 +604,5 @@
         dialog.hide()
 
-        if result==Gtk.ResponseType.YES:
+        if result==RESPONSETYPE_YES:
             self.reset()
 
@@ -653,5 +655,5 @@
     def insertFlightLogLine(self, index, timestampString, text, isFault):
         """Insert the flight log line with the given data."""
-        GObject.idle_add(self._insertFlightLogLine, index,
+        gobject.idle_add(self._insertFlightLogLine, index,
                          formatFlightLogLine(timestampString, text),
                          isFault)
@@ -668,19 +670,19 @@
     def removeFlightLogLine(self, index):
         """Remove the flight log line with the given index."""
-        GObject.idle_add(self._removeFlightLogLine, index)
+        gobject.idle_add(self._removeFlightLogLine, index)
 
     def addFault(self, id, timestampString, text):
         """Add a fault to the list of faults."""
         faultText = formatFlightLogLine(timestampString, text).strip()
-        GObject.idle_add(self._flightInfo.addFault, id, faultText)
+        gobject.idle_add(self._flightInfo.addFault, id, faultText)
 
     def updateFault(self, id, timestampString, text):
         """Update a fault in the list of faults."""
         faultText = formatFlightLogLine(timestampString, text).strip()
-        GObject.idle_add(self._flightInfo.updateFault, id, faultText)
+        gobject.idle_add(self._flightInfo.updateFault, id, faultText)
 
     def clearFault(self, id):
         """Clear a fault in the list of faults."""
-        GObject.idle_add(self._flightInfo.clearFault, id)
+        gobject.idle_add(self._flightInfo.clearFault, id)
 
     def _removeFlightLogLine(self, index):
@@ -694,6 +696,6 @@
     def check(self, flight, aircraft, logger, oldState, state):
         """Update the data."""
-        GObject.idle_add(self._monitorWindow.setData, state)
-        GObject.idle_add(self._statusbar.updateTime, state.timestamp)
+        gobject.idle_add(self._monitorWindow.setData, state)
+        gobject.idle_add(self._statusbar.updateTime, state.timestamp)
 
     def resetFlightStatus(self):
@@ -705,5 +707,5 @@
     def setStage(self, stage):
         """Set the stage of the flight."""
-        GObject.idle_add(self._setStage, stage)
+        gobject.idle_add(self._setStage, stage)
 
     def _setStage(self, stage):
@@ -721,5 +723,5 @@
     def setRating(self, rating):
         """Set the rating of the flight."""
-        GObject.idle_add(self._setRating, rating)
+        gobject.idle_add(self._setRating, rating)
 
     def _setRating(self, rating):
@@ -730,5 +732,5 @@
     def setNoGo(self, reason):
         """Set the rating of the flight to No-Go with the given reason."""
-        GObject.idle_add(self._setNoGo, reason)
+        gobject.idle_add(self._setNoGo, reason)
 
     def _setNoGo(self, reason):
@@ -739,14 +741,19 @@
     def _handleMainWindowState(self, window, event):
         """Hande a change in the state of the window"""
-        iconified = Gdk.WindowState.ICONIFIED
-
-        if (event.changed_mask&Gdk.WindowState.WITHDRAWN)!=0:
-            if (event.new_window_state&Gdk.WindowState.WITHDRAWN)!=0:
+        iconified = gdk.WindowState.ICONIFIED if pygobject \
+                    else gdk.WINDOW_STATE_ICONIFIED
+
+        if (event.changed_mask&WINDOW_STATE_WITHDRAWN)!=0:
+            if (event.new_window_state&WINDOW_STATE_WITHDRAWN)!=0:
                 self._statusIcon.mainWindowHidden()
             else:
                 self._statusIcon.mainWindowShown()
 
-        if (event.changed_mask&Gdk.WindowState.ICONIFIED)!=0 and \
-           (event.new_window_state&Gdk.WindowState.ICONIFIED)==0:
+        if self.config.hideMinimizedWindow and not pygobject and \
+           (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \
+           (event.new_window_state&WINDOW_STATE_ICONIFIED)!=0:
+            self.hideMainWindow(savePosition = False)
+        elif (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \
+             (event.new_window_state&WINDOW_STATE_ICONIFIED)==0:
             self._mainWindow.present()
 
@@ -756,9 +763,9 @@
         Here we reset the focus to the main window as CEF might have acquired
         it earlier."""
-        self._mainWindow.get_window().focus(0)
+        self._mainWindow.get_window().focus()
 
     def raiseCallback(self):
         """Callback for the singleton handling code."""
-        GObject.idle_add(self.raiseMainWindow)
+        gobject.idle_add(self.raiseMainWindow)
 
     def raiseMainWindow(self):
@@ -791,5 +798,8 @@
             self._mainWindow.move(self._mainWindowX, self._mainWindowY)
 
-        self._mainWindow.show()
+        if pygobject:
+            self._mainWindow.show()
+        else:
+            self._mainWindow.present()
         self._mainWindow.deiconify()
 
@@ -848,5 +858,5 @@
             self._stdioText += text
 
-        GObject.idle_add(self._writeStdIO)
+        gobject.idle_add(self._writeStdIO)
 
     def beginBusy(self, message):
@@ -875,5 +885,5 @@
     def getFleetAsync(self, callback = None, force = None):
         """Get the fleet asynchronously."""
-        GObject.idle_add(self.getFleet, callback, force)
+        gobject.idle_add(self.getFleet, callback, force)
 
     def getFleet(self, callback = None, force = False, busyCallback = None):
@@ -910,5 +920,5 @@
             self._wizard.updateRTO()
         else:
-            GObject.idle_add(self.updateRTO, True)
+            gobject.idle_add(self.updateRTO, True)
 
     def rtoToggled(self, indicated):
@@ -918,5 +928,5 @@
     def _fleetResultCallback(self, returned, result):
         """Called when the fleet has been queried."""
-        GObject.idle_add(self._handleFleetResult, returned, result)
+        gobject.idle_add(self._handleFleetResult, returned, result)
 
     def _handleFleetResult(self, returned, result):
@@ -930,8 +940,8 @@
             self._fleet = None
 
-            dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = xstr("fleet_failed"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -961,5 +971,5 @@
     def _updatePlaneResultCallback(self, returned, result):
         """Called when the status of a plane has been updated."""
-        GObject.idle_add(self._handleUpdatePlaneResult, returned, result)
+        gobject.idle_add(self._handleUpdatePlaneResult, returned, result)
 
     def _handleUpdatePlaneResult(self, returned, result):
@@ -975,8 +985,8 @@
                     self._fleetGateStatus.handleFleet(self._fleet)
         else:
-            dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = xstr("fleet_update_failed"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -1065,46 +1075,43 @@
     def _buildMenuBar(self, accelGroup):
         """Build the main menu bar."""
-        menuBar = Gtk.MenuBar()
-
-        fileMenuItem = Gtk.MenuItem(xstr("menu_file"))
-        fileMenu = Gtk.Menu()
+        menuBar = gtk.MenuBar()
+
+        fileMenuItem = gtk.MenuItem(xstr("menu_file"))
+        fileMenu = gtk.Menu()
         fileMenuItem.set_submenu(fileMenu)
         menuBar.append(fileMenuItem)
 
-        loadPIREPMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_OPEN)
+        loadPIREPMenuItem = gtk.ImageMenuItem(gtk.STOCK_OPEN)
         loadPIREPMenuItem.set_use_stock(True)
         loadPIREPMenuItem.set_label(xstr("menu_file_loadPIREP"))
         loadPIREPMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_file_loadPIREP_key")),
-                                          Gdk.ModifierType.CONTROL_MASK,
-                                          Gtk.AccelFlags.VISIBLE)
+                                          CONTROL_MASK, ACCEL_VISIBLE)
         loadPIREPMenuItem.connect("activate", self._loadPIREP)
         fileMenu.append(loadPIREPMenuItem)
 
-        fileMenu.append(Gtk.SeparatorMenuItem())
-
-        quitMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_QUIT)
+        fileMenu.append(gtk.SeparatorMenuItem())
+
+        quitMenuItem = gtk.ImageMenuItem(gtk.STOCK_QUIT)
         quitMenuItem.set_use_stock(True)
         quitMenuItem.set_label(xstr("menu_file_quit"))
         quitMenuItem.add_accelerator("activate", accelGroup,
                                      ord(xstr("menu_file_quit_key")),
-                                     Gdk.ModifierType.CONTROL_MASK,
-                                     Gtk.AccelFlags.VISIBLE)
+                                     CONTROL_MASK, ACCEL_VISIBLE)
         quitMenuItem.connect("activate", self._quit)
         fileMenu.append(quitMenuItem)
 
-        toolsMenuItem = Gtk.MenuItem(xstr("menu_tools"))
-        toolsMenu = Gtk.Menu()
+        toolsMenuItem = gtk.MenuItem(xstr("menu_tools"))
+        toolsMenu = gtk.Menu()
         toolsMenuItem.set_submenu(toolsMenu)
         menuBar.append(toolsMenuItem)
 
         self._timetableMenuItem = timetableMenuItem = \
-          Gtk.ImageMenuItem(Gtk.STOCK_INDENT)
+          gtk.ImageMenuItem(gtk.STOCK_INDENT)
         timetableMenuItem.set_use_stock(True)
         timetableMenuItem.set_label(xstr("menu_tools_timetable"))
         timetableMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_tools_timetable_key")),
-                                          Gdk.ModifierType.CONTROL_MASK,
-                                          Gtk.AccelFlags.VISIBLE)
+                                          CONTROL_MASK, ACCEL_VISIBLE)
         timetableMenuItem.connect("activate", self.showTimetable)
         self._timetableMenuItem.set_sensitive(False)
@@ -1112,63 +1119,58 @@
 
         self._flightsMenuItem = flightsMenuItem = \
-          Gtk.ImageMenuItem(Gtk.STOCK_SPELL_CHECK)
+          gtk.ImageMenuItem(gtk.STOCK_SPELL_CHECK)
         flightsMenuItem.set_use_stock(True)
         flightsMenuItem.set_label(xstr("menu_tools_flights"))
         flightsMenuItem.add_accelerator("activate", accelGroup,
                                         ord(xstr("menu_tools_flights_key")),
-                                        Gdk.ModifierType.CONTROL_MASK,
-                                        Gtk.AccelFlags.VISIBLE)
+                                        CONTROL_MASK, ACCEL_VISIBLE)
         flightsMenuItem.connect("activate", self.showFlights)
         self._flightsMenuItem.set_sensitive(False)
         toolsMenu.append(flightsMenuItem)
 
-        checklistMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_APPLY)
+        checklistMenuItem = gtk.ImageMenuItem(gtk.STOCK_APPLY)
         checklistMenuItem.set_use_stock(True)
         checklistMenuItem.set_label(xstr("menu_tools_chklst"))
         checklistMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_tools_chklst_key")),
-                                          Gdk.ModifierType.CONTROL_MASK,
-                                          Gtk.AccelFlags.VISIBLE)
+                                          CONTROL_MASK, ACCEL_VISIBLE)
         checklistMenuItem.connect("activate", self._editChecklist)
         toolsMenu.append(checklistMenuItem)
 
-        approachCalloutsMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_EDIT)
+        approachCalloutsMenuItem = gtk.ImageMenuItem(gtk.STOCK_EDIT)
         approachCalloutsMenuItem.set_use_stock(True)
         approachCalloutsMenuItem.set_label(xstr("menu_tools_callouts"))
         approachCalloutsMenuItem.add_accelerator("activate", accelGroup,
                                                  ord(xstr("menu_tools_callouts_key")),
-                                                 Gdk.ModifierType.CONTROL_MASK,
-                                                 Gtk.AccelFlags.VISIBLE)
+                                                 CONTROL_MASK, ACCEL_VISIBLE)
         approachCalloutsMenuItem.connect("activate", self._editApproachCallouts)
         toolsMenu.append(approachCalloutsMenuItem)
 
-        prefsMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_PREFERENCES)
+        prefsMenuItem = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES)
         prefsMenuItem.set_use_stock(True)
         prefsMenuItem.set_label(xstr("menu_tools_prefs"))
         prefsMenuItem.add_accelerator("activate", accelGroup,
                                       ord(xstr("menu_tools_prefs_key")),
-                                      Gdk.ModifierType.CONTROL_MASK,
-                                      Gtk.AccelFlags.VISIBLE)
+                                      CONTROL_MASK, ACCEL_VISIBLE)
         prefsMenuItem.connect("activate", self._editPreferences)
         toolsMenu.append(prefsMenuItem)
 
-        toolsMenu.append(Gtk.SeparatorMenuItem())
-
-        bugReportMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_PASTE)
+        toolsMenu.append(gtk.SeparatorMenuItem())
+
+        bugReportMenuItem = gtk.ImageMenuItem(gtk.STOCK_PASTE)
         bugReportMenuItem.set_use_stock(True)
         bugReportMenuItem.set_label(xstr("menu_tools_bugreport"))
         bugReportMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_tools_bugreport_key")),
-                                          Gdk.ModifierType.CONTROL_MASK,
-                                          Gtk.AccelFlags.VISIBLE)
+                                          CONTROL_MASK, ACCEL_VISIBLE)
         bugReportMenuItem.connect("activate", self._reportBug)
         toolsMenu.append(bugReportMenuItem)
 
-        viewMenuItem = Gtk.MenuItem(xstr("menu_view"))
-        viewMenu = Gtk.Menu()
+        viewMenuItem = gtk.MenuItem(xstr("menu_view"))
+        viewMenu = gtk.Menu()
         viewMenuItem.set_submenu(viewMenu)
         menuBar.append(viewMenuItem)
 
-        self._showMonitorMenuItem = Gtk.CheckMenuItem()
+        self._showMonitorMenuItem = gtk.CheckMenuItem()
         self._showMonitorMenuItem.set_label(xstr("menu_view_monitor"))
         self._showMonitorMenuItem.set_use_underline(True)
@@ -1176,10 +1178,9 @@
         self._showMonitorMenuItem.add_accelerator("activate", accelGroup,
                                                   ord(xstr("menu_view_monitor_key")),
-                                                  Gdk.ModifierType.CONTROL_MASK,
-                                                  Gtk.AccelFlags.VISIBLE)
+                                                  CONTROL_MASK, ACCEL_VISIBLE)
         self._showMonitorMenuItem.connect("toggled", self._toggleMonitorWindow)
         viewMenu.append(self._showMonitorMenuItem)
 
-        showDebugMenuItem = Gtk.CheckMenuItem()
+        showDebugMenuItem = gtk.CheckMenuItem()
         showDebugMenuItem.set_label(xstr("menu_view_debug"))
         showDebugMenuItem.set_use_underline(True)
@@ -1187,33 +1188,30 @@
         showDebugMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_view_debug_key")),
-                                          Gdk.ModifierType.CONTROL_MASK,
-                                          Gtk.AccelFlags.VISIBLE)
+                                          CONTROL_MASK, ACCEL_VISIBLE)
         showDebugMenuItem.connect("toggled", self._toggleDebugLog)
         viewMenu.append(showDebugMenuItem)
 
-        helpMenuItem = Gtk.MenuItem(xstr("menu_help"))
-        helpMenu = Gtk.Menu()
+        helpMenuItem = gtk.MenuItem(xstr("menu_help"))
+        helpMenu = gtk.Menu()
         helpMenuItem.set_submenu(helpMenu)
         menuBar.append(helpMenuItem)
 
-        manualMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_HELP)
+        manualMenuItem = gtk.ImageMenuItem(gtk.STOCK_HELP)
         manualMenuItem.set_use_stock(True)
         manualMenuItem.set_label(xstr("menu_help_manual"))
         manualMenuItem.add_accelerator("activate", accelGroup,
                                        ord(xstr("menu_help_manual_key")),
-                                       Gdk.ModifierType.CONTROL_MASK,
-                                       Gtk.AccelFlags.VISIBLE)
+                                       CONTROL_MASK, ACCEL_VISIBLE)
         manualMenuItem.connect("activate", self._showManual)
         helpMenu.append(manualMenuItem)
 
-        helpMenu.append(Gtk.SeparatorMenuItem())
-
-        aboutMenuItem = Gtk.ImageMenuItem(Gtk.STOCK_ABOUT)
+        helpMenu.append(gtk.SeparatorMenuItem())
+
+        aboutMenuItem = gtk.ImageMenuItem(gtk.STOCK_ABOUT)
         aboutMenuItem.set_use_stock(True)
         aboutMenuItem.set_label(xstr("menu_help_about"))
         aboutMenuItem.add_accelerator("activate", accelGroup,
                                       ord(xstr("menu_help_about_key")),
-                                      Gdk.ModifierType.CONTROL_MASK,
-                                      Gtk.AccelFlags.VISIBLE)
+                                      CONTROL_MASK, ACCEL_VISIBLE)
         aboutMenuItem.connect("activate", self._showAbout)
         helpMenu.append(aboutMenuItem)
@@ -1224,5 +1222,5 @@
         """Toggle the debug log."""
         if menuItem.get_active():
-            label = Gtk.Label(xstr("tab_debug_log"))
+            label = gtk.Label(xstr("tab_debug_log"))
             label.set_use_underline(True)
             label.set_tooltip_text(xstr("tab_debug_log_tooltip"))
@@ -1234,20 +1232,23 @@
     def _buildLogWidget(self):
         """Build the widget for the log."""
-        alignment = Gtk.Alignment(xscale = 1.0, yscale = 1.0)
+        alignment = gtk.Alignment(xscale = 1.0, yscale = 1.0)
 
         alignment.set_padding(padding_top = 8, padding_bottom = 8,
                               padding_left = 16, padding_right = 16)
 
-        logScroller = Gtk.ScrolledWindow()
+        logScroller = gtk.ScrolledWindow()
         # FIXME: these should be constants in common
-        logScroller.set_policy(Gtk.PolicyType.AUTOMATIC,
-                               Gtk.PolicyType.AUTOMATIC)
-        logScroller.set_shadow_type(Gtk.ShadowType.IN)
-        logView = Gtk.TextView()
+        logScroller.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                               else gtk.POLICY_AUTOMATIC,
+                               gtk.PolicyType.AUTOMATIC if pygobject
+                               else gtk.POLICY_AUTOMATIC)
+        logScroller.set_shadow_type(gtk.ShadowType.IN if pygobject
+                                    else gtk.SHADOW_IN)
+        logView = gtk.TextView()
         logView.set_editable(False)
         logView.set_cursor_visible(False)
         logScroller.add(logView)
 
-        logBox = Gtk.VBox()
+        logBox = gtk.VBox()
         logBox.pack_start(logScroller, True, True, 0)
         logBox.set_size_request(-1, 200)
@@ -1266,12 +1267,12 @@
         """Quit from the application."""
         if force:
-            result=Gtk.ResponseType.YES
-        else:
-            dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                       type = Gtk.MessageType.QUESTION,
+            result=RESPONSETYPE_YES
+        else:
+            dialog = gtk.MessageDialog(parent = self._mainWindow,
+                                       type = MESSAGETYPE_QUESTION,
                                        message_format = xstr("quit_question"))
 
-            dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
-            dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
+            dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
+            dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
 
             dialog.set_title(WINDOW_TITLE_BASE)
@@ -1279,12 +1280,12 @@
             dialog.hide()
 
-        if result==Gtk.ResponseType.YES:
+        if result==RESPONSETYPE_YES:
             self._statusIcon.destroy()
-            return Gtk.main_quit()
+            return gtk.main_quit()
 
     def _notebookPageSwitch(self, notebook, page, page_num):
         """Called when the current page of the notebook has changed."""
         if page_num==0:
-            GObject.idle_add(self._wizard.grabDefault)
+            gobject.idle_add(self._wizard.grabDefault)
         else:
             self._mainWindow.set_default(None)
@@ -1322,5 +1323,5 @@
     def _timetableCallback(self, returned, result):
         """Called when the timetable has been received."""
-        GObject.idle_add(self._handleTimetable, returned, result)
+        gobject.idle_add(self._handleTimetable, returned, result)
 
     def _handleTimetable(self, returned, result):
@@ -1335,8 +1336,8 @@
             self._timetableWindow.show_all()
         else:
-            dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = xstr("timetable_failed"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -1354,5 +1355,5 @@
     def _acceptedFlightsCallback(self, returned, result):
         """Called when the accepted flights have been received."""
-        GObject.idle_add(self._handleAcceptedFlights, returned, result)
+        gobject.idle_add(self._handleAcceptedFlights, returned, result)
 
     def _handleAcceptedFlights(self, returned, result):
@@ -1365,8 +1366,8 @@
             self._flightsWindow.show_all()
         else:
-            dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self.mainWindow,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = xstr("acceptedflt_failed"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -1431,5 +1432,5 @@
         self._pirepEditor.setPIREP(pirep)
         self._pirepEditor.show_all()
-        if self._pirepEditor.run()==Gtk.ResponseType.OK:
+        if self._pirepEditor.run()==RESPONSETYPE_OK:
             self.beginBusy(xstr("pirepEdit_save_busy"))
             self.webHandler.sendPIREP(self._pirepUpdatedCallback, pirep,
@@ -1440,5 +1441,5 @@
     def _pirepUpdatedCallback(self, returned, result):
         """Callback for the PIREP updating result."""
-        GObject.idle_add(self._handlePIREPUpdated, returned, result)
+        gobject.idle_add(self._handlePIREPUpdated, returned, result)
 
     def _handlePIREPUpdated(self, returned, result):
@@ -1446,5 +1447,5 @@
         self.endBusy()
         secondaryMarkup = None
-        type = Gtk.MessageType.ERROR
+        type = MESSAGETYPE_ERROR
         if returned:
             if result.success:
@@ -1459,12 +1460,12 @@
                 secondaryMarkup = xstr("sendPIREP_unknown_sec")
         else:
-            print("PIREP sending failed", result)
+            print "PIREP sending failed", result
             messageFormat = xstr("sendPIREP_failed")
             secondaryMarkup = xstr("sendPIREP_failed_sec")
 
         if type is not None:
-            dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
+            dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
                                        type = type, message_format = messageFormat)
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             if secondaryMarkup is not None:
@@ -1490,13 +1491,13 @@
         dialog.hide()
 
-        if result==Gtk.ResponseType.OK:
-            self._lastLoadedPIREP = dialog.get_filename()
+        if result==RESPONSETYPE_OK:
+            self._lastLoadedPIREP = text2unicode(dialog.get_filename())
 
             pirep = PIREP.load(self._lastLoadedPIREP)
             if pirep is None:
-                dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                           type = Gtk.MessageType.ERROR,
+                dialog = gtk.MessageDialog(parent = self._mainWindow,
+                                           type = MESSAGETYPE_ERROR,
                                            message_format = xstr("loadPIREP_failed"))
-                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 dialog.format_secondary_markup(xstr("loadPIREP_failed_sec"))
@@ -1509,5 +1510,5 @@
                     result = dialog.run()
 
-                    if result==Gtk.ResponseType.OK:
+                    if result==RESPONSETYPE_OK:
                         self.sendPIREP(pirep)
                     elif result==1:
@@ -1523,20 +1524,20 @@
         If it is not created yet, it will be created."""
         if self._loadPIREPDialog is None:
-            dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+            dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                            xstr("loadPIREP_browser_title"),
-                                           action = Gtk.FileChooserAction.OPEN,
-                                           buttons = (Gtk.STOCK_CANCEL,
-                                                      Gtk.ResponseType.CANCEL,
-                                                      Gtk.STOCK_OK, Gtk.ResponseType.OK),
+                                           action = FILE_CHOOSER_ACTION_OPEN,
+                                           buttons = (gtk.STOCK_CANCEL,
+                                                      RESPONSETYPE_CANCEL,
+                                                      gtk.STOCK_OK, RESPONSETYPE_OK),
                                            parent = self._mainWindow)
             dialog.set_modal(True)
 
 
-            filter = Gtk.FileFilter()
+            filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_pireps"))
             filter.add_pattern("*.pirep")
             dialog.add_filter(filter)
 
-            filter = Gtk.FileFilter()
+            filter = gtk.FileFilter()
             filter.set_name(xstr("file_filter_all"))
             filter.add_pattern("*.*")
@@ -1550,13 +1551,13 @@
         """Get a dialog displaying the main information of the flight from the
         PIREP and providing Cancel and Send buttons."""
-        dialog = Gtk.Dialog(title = WINDOW_TITLE_BASE + " - " +
+        dialog = gtk.Dialog(title = WINDOW_TITLE_BASE + " - " +
                             xstr("loadPIREP_send_title"),
                             parent = self._mainWindow,
-                            flags = Gtk.DialogFlags.MODAL)
+                            flags = DIALOG_MODAL)
 
         contentArea = dialog.get_content_area()
 
-        label = Gtk.Label(xstr("loadPIREP_send_help"))
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        label = gtk.Label(xstr("loadPIREP_send_help"))
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.set_padding(padding_top = 16, padding_bottom = 0,
@@ -1565,6 +1566,6 @@
         contentArea.pack_start(alignment, False, False, 8)
 
-        table = Gtk.Table(5, 2)
-        tableAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        table = gtk.Table(5, 2)
+        tableAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         tableAlignment.set_padding(padding_top = 0, padding_bottom = 32,
@@ -1577,59 +1578,59 @@
         bookedFlight = pirep.bookedFlight
 
-        label = Gtk.Label("<b>" + xstr("loadPIREP_send_flightno") + "</b>")
+        label = gtk.Label("<b>" + xstr("loadPIREP_send_flightno") + "</b>")
         label.set_use_markup(True)
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 0, 1)
 
-        label = Gtk.Label(bookedFlight.callsign)
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        label = gtk.Label(bookedFlight.callsign)
+        labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 1, 2, 0, 1)
 
-        label = Gtk.Label("<b>" + xstr("loadPIREP_send_date") + "</b>")
+        label = gtk.Label("<b>" + xstr("loadPIREP_send_date") + "</b>")
         label.set_use_markup(True)
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 1, 2)
 
-        label = Gtk.Label(str(bookedFlight.departureTime.date()))
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        label = gtk.Label(str(bookedFlight.departureTime.date()))
+        labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 1, 2, 1, 2)
 
-        label = Gtk.Label("<b>" + xstr("loadPIREP_send_from") + "</b>")
+        label = gtk.Label("<b>" + xstr("loadPIREP_send_from") + "</b>")
         label.set_use_markup(True)
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 2, 3)
 
-        label = Gtk.Label(bookedFlight.departureICAO)
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        label = gtk.Label(bookedFlight.departureICAO)
+        labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 1, 2, 2, 3)
 
-        label = Gtk.Label("<b>" + xstr("loadPIREP_send_to") + "</b>")
+        label = gtk.Label("<b>" + xstr("loadPIREP_send_to") + "</b>")
         label.set_use_markup(True)
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 0, 1, 3, 4)
 
-        label = Gtk.Label(bookedFlight.arrivalICAO)
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        label = gtk.Label(bookedFlight.arrivalICAO)
+        labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 1, 2, 3, 4)
 
-        label = Gtk.Label("<b>" + xstr("loadPIREP_send_rating") + "</b>")
+        label = gtk.Label("<b>" + xstr("loadPIREP_send_rating") + "</b>")
         label.set_use_markup(True)
-        labelAlignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
@@ -1637,5 +1638,5 @@
 
         rating = pirep.rating
-        label = Gtk.Label()
+        label = gtk.Label()
         if rating<0:
             label.set_markup('<b><span foreground="red">NO GO</span></b>')
@@ -1643,12 +1644,12 @@
             label.set_text("%.1f %%" % (rating,))
 
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.add(label)
         table.attach(labelAlignment, 1, 2, 4, 5)
 
-        dialog.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
+        dialog.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
         dialog.add_button(xstr("viewPIREP"), 1)
-        dialog.add_button(xstr("sendPIREP"), Gtk.ResponseType.OK)
+        dialog.add_button(xstr("sendPIREP"), RESPONSETYPE_OK)
 
         return dialog
@@ -1662,5 +1663,5 @@
     def _pirepSentCallback(self, returned, result):
         """Callback for the PIREP sending result."""
-        GObject.idle_add(self._handlePIREPSent, returned, result)
+        gobject.idle_add(self._handlePIREPSent, returned, result)
 
     def _handlePIREPSent(self, returned, result):
@@ -1668,8 +1669,8 @@
         self.endBusy()
         secondaryMarkup = None
-        type = Gtk.MessageType.ERROR
+        type = MESSAGETYPE_ERROR
         if returned:
             if result.success:
-                type = Gtk.MessageType.INFO
+                type = MESSAGETYPE_INFO
                 messageFormat = xstr("sendPIREP_success")
                 secondaryMarkup = xstr("sendPIREP_success_sec")
@@ -1683,11 +1684,11 @@
                 secondaryMarkup = xstr("sendPIREP_unknown_sec")
         else:
-            print("PIREP sending failed", result)
+            print "PIREP sending failed", result
             messageFormat = xstr("sendPIREP_failed")
             secondaryMarkup = xstr("sendPIREP_failed_sec")
 
-        dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
+        dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
                                    type = type, message_format = messageFormat)
-        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         if secondaryMarkup is not None:
@@ -1708,5 +1709,5 @@
 
         for (timestampString, text) in self._logger.lines:
-            description += str(formatFlightLogLine(timestampString, text))
+            description += unicode(formatFlightLogLine(timestampString, text))
 
         description += "\n\n" + ("=" * 40)
@@ -1729,5 +1730,5 @@
     def _bugReportSentCallback(self, returned, result):
         """Callback function for the bug report sending result."""
-        GObject.idle_add(self._handleBugReportSent, returned, result)
+        gobject.idle_add(self._handleBugReportSent, returned, result)
 
     def _handleBugReportSent(self, returned, result):
@@ -1735,8 +1736,8 @@
         self.endBusy()
         secondaryMarkup = None
-        type = Gtk.MessageType.ERROR
+        type = MESSAGETYPE_ERROR
         if returned:
             if result.success:
-                type = Gtk.MessageType.INFO
+                type = MESSAGETYPE_INFO
                 messageFormat = xstr("sendBugReport_success") % (result.ticketID,)
                 secondaryMarkup = xstr("sendBugReport_success_sec")
@@ -1748,7 +1749,7 @@
             secondaryMarkup = xstr("sendBugReport_error_sec")
 
-        dialog = Gtk.MessageDialog(parent = self._wizard.gui._bugReportDialog,
+        dialog = gtk.MessageDialog(parent = self._wizard.gui._bugReportDialog,
                                    type = type, message_format = messageFormat)
-        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         if secondaryMarkup is not None:
@@ -1795,11 +1796,11 @@
             for index in hotkeys:
                 if index==self._pilotHotkeyIndex:
-                    print("gui.GUI._handleHotkeys: pilot hotkey pressed")
+                    print "gui.GUI._handleHotkeys: pilot hotkey pressed"
                     self._flight.pilotHotkeyPressed()
                 elif index==self._checklistHotkeyIndex:
-                    print("gui.GUI._handleHotkeys: checklist hotkey pressed")
+                    print "gui.GUI._handleHotkeys: checklist hotkey pressed"
                     self._flight.checklistHotkeyPressed()
                 else:
-                    print("gui.GUI._handleHotkeys: unhandled hotkey index:", index)
+                    print "gui.GUI._handleHotkeys: unhandled hotkey index:", index
 
     def _showManual(self, menuitem):
@@ -1822,15 +1823,15 @@
         If it does not exist yet, it will be created."""
         if self._aboutDialog is None:
-            dialog = Gtk.AboutDialog()
+            dialog = gtk.AboutDialog()
             dialog.set_transient_for(self._mainWindow)
             dialog.set_modal(True)
 
             logoPath = os.path.join(self._programDirectory, "logo.png")
-            logo = GdkPixbuf.Pixbuf.new_from_file(logoPath)
+            logo = pixbuf_new_from_file(logoPath)
             dialog.set_logo(logo)
 
             dialog.set_program_name(PROGRAM_NAME)
             dialog.set_version(const.VERSION)
-            dialog.set_copyright("(c) 2012 - 2019 by István Váradi")
+            dialog.set_copyright("(c) 2012 by István Váradi")
             dialog.set_website("http://mlx.varadiistvan.hu")
             dialog.set_website_label(xstr("about_website"))
@@ -1848,4 +1849,7 @@
             dialog.set_license(xstr("about_license"))
 
+            if not pygobject:
+                gtk.about_dialog_set_url_hook(self._showAboutURL, None)
+
             self._aboutDialog = dialog
 
@@ -1871,5 +1875,5 @@
             self._credentialsAvailable = False
 
-            GObject.idle_add(self._getCredentials)
+            gobject.idle_add(self._getCredentials)
 
             while not self._credentialsAvailable:
@@ -1899,5 +1903,5 @@
             response = dialog.run()
 
-            if response==Gtk.ResponseType.OK:
+            if response==RESPONSETYPE_OK:
                 self._credentialsUserName = dialog.userName
                 self._credentialsPassword = dialog.password
@@ -1926,6 +1930,6 @@
 
         if not self.config.pilotID and not self.config.password:
-            dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                       type = Gtk.MessageType.QUESTION,
+            dialog = gtk.MessageDialog(parent = self._mainWindow,
+                                       type = MESSAGETYPE_QUESTION,
                                        message_format = xstr("register_ask"))
 
Index: src/mlx/gui/info.py
===================================================================
--- src/mlx/gui/info.py	(revision 999)
+++ src/mlx/gui/info.py	(revision 846)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 from mlx.gui.delaycodes import DelayCodeTable
@@ -21,5 +21,5 @@
 #------------------------------------------------------------------------------
 
-class FlightInfo(Gtk.VBox):
+class FlightInfo(gtk.VBox):
     """The flight info tab."""
     @staticmethod
@@ -31,19 +31,19 @@
         - the comment text editor."""
 
-        frame = Gtk.Frame(label = label)
+        frame = gtk.Frame(label = label)
         label = frame.get_label_widget()
         label.set_use_underline(True)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
                               padding_left = 8, padding_right = 8)
 
-        scroller = Gtk.ScrolledWindow()
-        scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
-        scroller.set_shadow_type(Gtk.ShadowType.IN)
-
-        comments = Gtk.TextView()
-        comments.set_wrap_mode(Gtk.WrapMode.WORD)
+        scroller = gtk.ScrolledWindow()
+        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scroller.set_shadow_type(SHADOW_IN)
+
+        comments = gtk.TextView()
+        comments.set_wrap_mode(WRAP_WORD)
         scroller.add(comments)
         alignment.add(scroller)
@@ -60,7 +60,7 @@
         self._callbackObject = callbackObject
 
-        self._commentsAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        self._commentsAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                                 xscale = 1.0, yscale = 1.0)
-        commentsBox = Gtk.HBox()
+        commentsBox = gtk.HBox()
         commentsBox.set_homogeneous(True)
 
@@ -77,9 +77,9 @@
         self.pack_start(self._commentsAlignment, True, True, 8)
 
-        frame = Gtk.Frame(label = xstr("info_delay"))
+        frame = gtk.Frame(label = xstr("info_delay"))
         label = frame.get_label_widget()
         label.set_use_underline(True)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -87,15 +87,14 @@
 
         self._delayCodeTable = table = DelayCodeTable(self)
-        self._delayWindow = scrolledWindow = Gtk.ScrolledWindow()
+        self._delayWindow = scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(table)
         scrolledWindow.set_size_request(-1, 185)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(SHADOW_IN)
 
         alignment.add(scrolledWindow)
         frame.add(alignment)
 
-        self._delayAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        self._delayAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                              xscale = 1.0, yscale = 1.0)
         self._delayAlignment.add(frame)
@@ -109,6 +108,6 @@
         """Get the comments."""
         buffer = self._comments.get_buffer()
-        return buffer.get_text(buffer.get_start_iter(),
-                               buffer.get_end_iter(), True)
+        return text2unicode(buffer.get_text(buffer.get_start_iter(),
+                                            buffer.get_end_iter(), True))
 
     @comments.setter
Index: src/mlx/gui/monitor.py
===================================================================
--- src/mlx/gui/monitor.py	(revision 1005)
+++ src/mlx/gui/monitor.py	(revision 765)
@@ -18,5 +18,5 @@
 #------------------------------------------------------------------------------
 
-class MonitorWindow(Gtk.Window):
+class MonitorWindow(gtk.Window):
     """The window for the data monitor."""
     def __init__(self, gui, iconDirectory):
@@ -32,10 +32,10 @@
                      lambda a, b: self._gui.hideMonitorWindow())
 
-        alignment = Gtk.Alignment(xscale = 1.0, yscale = 1.0)
+        alignment = gtk.Alignment(xscale = 1.0, yscale = 1.0)
 
         alignment.set_padding(padding_top = 4, padding_bottom = 10,
                               padding_left = 16, padding_right = 16)
 
-        table = Gtk.Table(rows = 9, columns = 14)
+        table = gtk.Table(rows = 9, columns = 14)
         table.set_homogeneous(False)
         table.set_row_spacings(4)
@@ -46,20 +46,20 @@
         table.attach(self._timestamp, 1, 2, 0, 1)
 
-        self._paused = Gtk.Label("PAUSED")
+        self._paused = gtk.Label("PAUSED")
         table.attach(self._paused, 2, 4, 0, 1)
 
-        self._trickMode = Gtk.Label("TRICKMODE")
+        self._trickMode = gtk.Label("TRICKMODE")
         table.attach(self._trickMode, 4, 6, 0, 1, xoptions = 0)
 
-        self._overspeed = Gtk.Label("OVERSPEED")
+        self._overspeed = gtk.Label("OVERSPEED")
         table.attach(self._overspeed, 6, 8, 0, 1)
 
-        self._stalled = Gtk.Label("STALLED")
+        self._stalled = gtk.Label("STALLED")
         table.attach(self._stalled, 8, 10, 0, 1)
 
-        self._onTheGround = Gtk.Label("ONTHEGROUND")
+        self._onTheGround = gtk.Label("ONTHEGROUND")
         table.attach(self._onTheGround, 10, 11, 0, 1)
 
-        self._antiIceOn = Gtk.Label("ANTI-ICE")
+        self._antiIceOn = gtk.Label("ANTI-ICE")
         table.attach(self._antiIceOn, 11, 12, 0, 1)
 
@@ -128,9 +128,9 @@
         table.attach(self._squawk, 7, 8, 3, 4)
 
-        (label, self._nav1) = self._createLabeledEntry("NAV1:", 6)
+        (label, self._nav1) = self._createLabeledEntry("NAV1:", 5)
         table.attach(label, 8, 9, 3, 4)
         table.attach(self._nav1, 9, 10, 3, 4)
 
-        (label, self._nav2) = self._createLabeledEntry("NAV2:", 6)
+        (label, self._nav2) = self._createLabeledEntry("NAV2:", 5)
         table.attach(label, 10, 11, 3, 4)
         table.attach(self._nav2, 11, 12, 3, 4)
@@ -148,29 +148,29 @@
         table.attach(self._reverser, 9, 12, 4, 5)
 
-        self._navLightsOn = Gtk.Label("NAV")
+        self._navLightsOn = gtk.Label("NAV")
         table.attach(self._navLightsOn, 0, 1, 5, 6)
 
-        self._antiCollisionLightsOn = Gtk.Label("ANTICOLLISION")
+        self._antiCollisionLightsOn = gtk.Label("ANTICOLLISION")
         table.attach(self._antiCollisionLightsOn, 1, 2, 5, 6)
 
-        self._strobeLightsOn = Gtk.Label("STROBE")
+        self._strobeLightsOn = gtk.Label("STROBE")
         table.attach(self._strobeLightsOn, 2, 3, 5, 6)
 
-        self._landingLightsOn = Gtk.Label("LANDING")
+        self._landingLightsOn = gtk.Label("LANDING")
         table.attach(self._landingLightsOn, 3, 4, 5, 6)
 
-        self._pitotHeatOn = Gtk.Label("PITOT HEAT")
+        self._pitotHeatOn = gtk.Label("PITOT HEAT")
         table.attach(self._pitotHeatOn, 4, 5, 5, 6)
 
-        self._parking = Gtk.Label("PARKING")
+        self._parking = gtk.Label("PARKING")
         table.attach(self._parking, 5, 6, 5, 6)
 
-        self._gearControlDown = Gtk.Label("GEAR LEVER DOWN")
+        self._gearControlDown = gtk.Label("GEAR LEVER DOWN")
         table.attach(self._gearControlDown, 6, 8, 5, 6)
 
-        self._gearsDown = Gtk.Label("GEARS DOWN")
+        self._gearsDown = gtk.Label("GEARS DOWN")
         table.attach(self._gearsDown, 8, 10, 5, 6)
 
-        self._spoilersArmed = Gtk.Label("SPOILERS ARMED")
+        self._spoilersArmed = gtk.Label("SPOILERS ARMED")
         table.attach(self._spoilersArmed, 10, 12, 5, 6)
 
@@ -195,8 +195,8 @@
         table.attach(self._elevatorTrim, 11, 12, 6, 7)
 
-        self._apMaster = Gtk.Label("AP MASTER")
+        self._apMaster = gtk.Label("AP MASTER")
         table.attach(self._apMaster, 0, 1, 7, 8)
 
-        self._apHeadingHold = Gtk.Label("AP HDG HOLD")
+        self._apHeadingHold = gtk.Label("AP HDG HOLD")
         table.attach(self._apHeadingHold, 1, 2, 7, 8)
 
@@ -205,8 +205,8 @@
         table.attach(self._apHeading, 3, 4, 7, 8)
 
-        self._xpdrC = Gtk.Label("XPDR C")
+        self._xpdrC = gtk.Label("XPDR C")
         table.attach(self._xpdrC, 4, 5, 7, 8)
 
-        self._apAltitudeHold = Gtk.Label("AP ALT HOLD")
+        self._apAltitudeHold = gtk.Label("AP ALT HOLD")
         table.attach(self._apAltitudeHold, 5, 6, 7, 8)
 
@@ -262,10 +262,10 @@
         - the entry."""
 
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5, xscale = 1.0)
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5, xscale = 1.0)
         alignment.set_padding(padding_top = 0, padding_bottom = 0,
                               padding_left = 0, padding_right = 16)
-        alignment.add(Gtk.Label(label))
-
-        entry = Gtk.Entry()
+        alignment.add(gtk.Label(label))
+
+        entry = gtk.Entry()
         entry.set_editable(False)
         entry.set_width_chars(width)
Index: src/mlx/gui/pirep.py
===================================================================
--- src/mlx/gui/pirep.py	(revision 999)
+++ src/mlx/gui/pirep.py	(revision 855)
@@ -1,7 +1,7 @@
 
-from .common import *
-from .dcdata import getTable
-from .info import FlightInfo
-from .flight import comboModel
+from common import *
+from dcdata import getTable
+from info import FlightInfo
+from flight import comboModel
 
 from mlx.pirep import PIREP
@@ -26,5 +26,5 @@
 #------------------------------------------------------------------------------
 
-class MessageFrame(Gtk.Frame):
+class MessageFrame(gtk.Frame):
     """A frame containing the information about a PIREP message.
 
@@ -33,21 +33,20 @@
     def __init__(self, message, senderPID, senderName):
         """Construct the frame."""
-        Gtk.Frame.__init__(self)
-
-        vbox = Gtk.VBox()
-
-        self._heading = heading = Gtk.TextView()
+        gtk.Frame.__init__(self)
+
+        vbox = gtk.VBox()
+
+        self._heading = heading = gtk.TextView()
         heading.set_editable(False)
         heading.set_can_focus(False)
-        heading.set_wrap_mode(Gtk.WrapMode.WORD)
-        heading.set_size_request(-1, 16)
+        heading.set_wrap_mode(WRAP_WORD)
 
         buffer = heading.get_buffer()
-        self._headingTag  = buffer.create_tag("heading", weight=Pango.Weight.BOLD)
+        self._headingTag  = buffer.create_tag("heading", weight=WEIGHT_BOLD)
         buffer.set_text("%s - %s" % (senderPID, senderName))
         buffer.apply_tag(self._headingTag,
                          buffer.get_start_iter(), buffer.get_end_iter())
 
-        headingAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        headingAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                          xscale = 1.0, yscale = 0.0)
         headingAlignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -56,8 +55,6 @@
         vbox.pack_start(headingAlignment, True, True, 4)
 
-        self._messageView = messageView = Gtk.TextView()
-        messageView.set_wrap_mode(Gtk.WrapMode.WORD)
-        messageView.set_editable(False)
-        messageView.set_can_focus(False)
+        self._messageView = messageView = gtk.TextView()
+        messageView.set_wrap_mode(WRAP_WORD)
         messageView.set_accepts_tab(False)
         messageView.set_size_request(-1, 60)
@@ -71,12 +68,16 @@
         self.show_all()
 
-        styleContext = self.get_style_context()
-        color = styleContext.get_background_color(Gtk.StateFlags.NORMAL)
-        heading.override_background_color(0, color)
+        if pygobject:
+            styleContext = self.get_style_context()
+            color = styleContext.get_background_color(gtk.StateFlags.NORMAL)
+            heading.override_background_color(0, color)
+        else:
+            style = self.rc_get_style()
+            heading.modify_base(0, style.bg[0])
 
 
 #-------------------------------------------------------------------------------
 
-class MessagesWidget(Gtk.Frame):
+class MessagesWidget(gtk.Frame):
     """The widget for the messages."""
     @staticmethod
@@ -86,5 +87,5 @@
 
     def __init__(self, gui):
-        Gtk.Frame.__init__(self)
+        gtk.Frame.__init__(self)
 
         self._gui = gui
@@ -93,16 +94,16 @@
         label.set_use_underline(True)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
                               padding_left = 4, padding_right = 4)
 
-        self._outerBox = outerBox = Gtk.EventBox()
+        self._outerBox = outerBox = gtk.EventBox()
         outerBox.add(alignment)
 
-        self._innerBox = innerBox = Gtk.EventBox()
+        self._innerBox = innerBox = gtk.EventBox()
         alignment.add(self._innerBox)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 1.0, yscale = 1.0)
         alignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -111,9 +112,9 @@
         innerBox.add(alignment)
 
-        scroller = Gtk.ScrolledWindow()
-        scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
-        scroller.set_shadow_type(Gtk.ShadowType.NONE)
-
-        self._messages = Gtk.VBox()
+        scroller = gtk.ScrolledWindow()
+        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scroller.set_shadow_type(SHADOW_NONE)
+
+        self._messages = gtk.VBox()
         self._messages.set_homogeneous(False)
         scroller.add_with_viewport(self._messages)
@@ -129,5 +130,5 @@
         """Add a message from the given sender."""
 
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                       xscale = 1.0, yscale = 0.0)
         alignment.set_padding(padding_top = 2, padding_bottom = 2,
@@ -154,5 +155,5 @@
 #------------------------------------------------------------------------------
 
-class PIREPViewer(Gtk.Dialog):
+class PIREPViewer(gtk.Dialog):
     """The dialog for PIREP viewing."""
     @staticmethod
@@ -167,12 +168,12 @@
         - the frame,
         - the inner VBox."""
-        frame = Gtk.Frame(label = label)
-
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        frame = gtk.Frame(label = label)
+
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 1.0, yscale = 1.0)
         frame.add(alignment)
         alignment.set_padding(padding_top = 4, padding_bottom = 4,
                               padding_left = 4, padding_right = 4)
-        box = Gtk.VBox()
+        box = gtk.VBox()
         alignment.add(box)
 
@@ -182,5 +183,5 @@
     def getLabel(text, extraText = ""):
         """Get a bold label with the given text."""
-        label = Gtk.Label("<b>" + text + "</b>" + extraText)
+        label = gtk.Label("<b>" + text + "</b>" + extraText)
         label.set_use_markup(True)
         label.set_alignment(0.0, 0.5)
@@ -190,5 +191,5 @@
     def getDataLabel(width = None, xAlignment = 0.0):
         """Get a bold label with the given text."""
-        label = Gtk.Label()
+        label = gtk.Label()
         if width is not None:
             label.set_width_chars(width)
@@ -203,11 +204,10 @@
         - the window,
         - the text view."""
-        scrolledWindow = Gtk.ScrolledWindow()
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-
-        textView = Gtk.TextView()
-        textView.set_wrap_mode(Gtk.WrapMode.WORD)
+        scrolledWindow = gtk.ScrolledWindow()
+        scrolledWindow.set_shadow_type(SHADOW_IN)
+        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+
+        textView = gtk.TextView()
+        textView.set_wrap_mode(WRAP_WORD)
         textView.set_editable(editable)
         textView.set_cursor_visible(editable)
@@ -227,5 +227,5 @@
 
         Returns the data label attached."""
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         table.attach(dataBox, column, column+1, row, row+1)
 
@@ -252,5 +252,5 @@
     def addHFiller(hBox, width = 8):
         """Add a filler to the given horizontal box."""
-        filler = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        filler = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                xscale = 1.0, yscale = 1.0)
         filler.set_size_request(width, -1)
@@ -260,5 +260,5 @@
     def addVFiller(vBox, height = 4):
         """Add a filler to the given vertical box."""
-        filler = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        filler = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                xscale = 1.0, yscale = 1.0)
         filler.set_size_request(-1, height)
@@ -285,9 +285,9 @@
         contentArea = self.get_content_area()
 
-        self._notebook = Gtk.Notebook()
+        self._notebook = gtk.Notebook()
         contentArea.pack_start(self._notebook, False, False, 4)
 
         dataTab = self._buildDataTab()
-        label = Gtk.Label(xstr("pirepView_tab_data"))
+        label = gtk.Label(xstr("pirepView_tab_data"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("pirepView_tab_data_tooltip"))
@@ -295,5 +295,5 @@
 
         commentsTab = self._buildCommentsTab()
-        label = Gtk.Label(xstr("pirepView_tab_comments"))
+        label = gtk.Label(xstr("pirepView_tab_comments"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("pirepView_tab_comments_tooltip"))
@@ -301,5 +301,5 @@
 
         logTab = self._buildLogTab()
-        label = Gtk.Label(xstr("pirepView_tab_log"))
+        label = gtk.Label(xstr("pirepView_tab_log"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("pirepView_tab_log_tooltip"))
@@ -309,10 +309,10 @@
         if showMessages:
             messagesTab = self._buildMessagesTab()
-            label = Gtk.Label(xstr("pirepView_tab_messages"))
+            label = gtk.Label(xstr("pirepView_tab_messages"))
             label.set_use_underline(True)
             label.set_tooltip_text(xstr("pirepView_tab_messages_tooltip"))
             self._notebook.append_page(messagesTab, label)
 
-        self._okButton = self.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+        self._okButton = self.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         self._okButton.set_can_default(True)
 
@@ -418,13 +418,13 @@
     def _buildDataTab(self):
         """Build the data tab of the viewer."""
-        table = Gtk.Table(1, 2)
+        table = gtk.Table(1, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
         table.set_homogeneous(True)
 
-        box1 = Gtk.VBox()
+        box1 = gtk.VBox()
         table.attach(box1, 0, 1, 0, 1)
 
-        box2 = Gtk.VBox()
+        box2 = gtk.VBox()
         table.attach(box2, 1, 2, 0, 1)
 
@@ -454,5 +454,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_flight"))
 
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -469,5 +469,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -479,5 +479,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -504,5 +504,5 @@
                                     width = 6)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -550,5 +550,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_route"))
 
-        levelBox = Gtk.HBox()
+        levelBox = gtk.HBox()
         mainBox.pack_start(levelBox, False, False, 0)
 
@@ -582,5 +582,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -609,5 +609,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        table = Gtk.Table(2, 2)
+        table = gtk.Table(2, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -640,5 +640,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_statistics"))
 
-        table = Gtk.Table(4, 2)
+        table = gtk.Table(4, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -686,5 +686,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_miscellaneous"))
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -738,5 +738,5 @@
     def _buildCommentsTab(self):
         """Build the tab with the comments and flight defects."""
-        table = Gtk.Table(2, 1)
+        table = gtk.Table(2, 1)
         table.set_col_spacings(16)
 
@@ -761,5 +761,5 @@
     def _buildLogTab(self):
         """Build the log tab."""
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
 
         (logWindow, self._log) = PIREPViewer.getTextWindow(heightRequest = -1)
@@ -771,5 +771,5 @@
     def _buildMessagesTab(self):
         """Build the messages tab."""
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
 
         self._messages = MessagesWidget(self._gui)
@@ -780,5 +780,5 @@
 #------------------------------------------------------------------------------
 
-class PIREPEditor(Gtk.Dialog):
+class PIREPEditor(gtk.Dialog):
     """A PIREP editor dialog."""
     _delayCodeRE = re.compile("([0-9]{2,3})( \([^\)]*\))")
@@ -790,7 +790,7 @@
         The label will got to cell (column, row), the widget to cell
         (column+1, row)."""
-        label = Gtk.Label("<b>" + labelText + "</b>")
+        label = gtk.Label("<b>" + labelText + "</b>")
         label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
@@ -808,5 +808,5 @@
         The label will got to cell (column, row), the spin button to cell
         (column+1, row)."""
-        button = Gtk.SpinButton()
+        button = gtk.SpinButton()
         button.set_range(min = minValue, max = maxValue)
         button.set_increments(step = stepIncrement, page = pageIncrement)
@@ -848,9 +848,9 @@
         contentArea = self.get_content_area()
 
-        self._notebook = Gtk.Notebook()
+        self._notebook = gtk.Notebook()
         contentArea.pack_start(self._notebook, False, False, 4)
 
         dataTab = self._buildDataTab()
-        label = Gtk.Label(xstr("pirepView_tab_data"))
+        label = gtk.Label(xstr("pirepView_tab_data"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("pirepView_tab_data_tooltip"))
@@ -858,5 +858,5 @@
 
         self._flightInfo = self._buildCommentsTab()
-        label = Gtk.Label(xstr("pirepView_tab_comments"))
+        label = gtk.Label(xstr("pirepView_tab_comments"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("pirepView_tab_comments_tooltip"))
@@ -864,12 +864,12 @@
 
         logTab = self._buildLogTab()
-        label = Gtk.Label(xstr("pirepView_tab_log"))
+        label = gtk.Label(xstr("pirepView_tab_log"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("pirepView_tab_log_tooltip"))
         self._notebook.append_page(logTab, label)
 
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.CANCEL)
-
-        self._okButton = self.add_button(xstr("button_save"), Gtk.ResponseType.NONE)
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
+
+        self._okButton = self.add_button(xstr("button_save"), RESPONSETYPE_NONE)
         self._okButton.connect("clicked", self._okClicked)
         self._okButton.set_can_default(True)
@@ -1015,13 +1015,13 @@
     def _buildDataTab(self):
         """Build the data tab of the viewer."""
-        table = Gtk.Table(1, 2)
+        table = gtk.Table(1, 2)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
         table.set_homogeneous(True)
 
-        box1 = Gtk.VBox()
+        box1 = gtk.VBox()
         table.attach(box1, 0, 1, 0, 1)
 
-        box2 = Gtk.VBox()
+        box2 = gtk.VBox()
         table.attach(box2, 1, 2, 0, 1)
 
@@ -1051,5 +1051,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_flight"))
 
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -1066,5 +1066,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -1076,5 +1076,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -1101,5 +1101,5 @@
                                     width = 6)
 
-        table = Gtk.Table(3, 2)
+        table = gtk.Table(3, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -1146,5 +1146,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_route"))
 
-        levelBox = Gtk.HBox()
+        levelBox = gtk.HBox()
         mainBox.pack_start(levelBox, False, False, 0)
 
@@ -1153,5 +1153,5 @@
         levelBox.pack_start(label, False, False, 0)
 
-        self._filedCruiseLevel = Gtk.SpinButton()
+        self._filedCruiseLevel = gtk.SpinButton()
         self._filedCruiseLevel.set_increments(step = 10, page = 100)
         self._filedCruiseLevel.set_range(min = 0, max = 500)
@@ -1168,5 +1168,5 @@
         levelBox.pack_start(label, False, False, 0)
 
-        self._modifiedCruiseLevel = Gtk.SpinButton()
+        self._modifiedCruiseLevel = gtk.SpinButton()
         self._modifiedCruiseLevel.set_increments(step = 10, page = 100)
         self._modifiedCruiseLevel.set_range(min = 0, max = 500)
@@ -1202,13 +1202,13 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = Gtk.HBox()
+        dataBox = gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
-        label = Gtk.Label("<b>" + xstr("pirepView_runway") + "</b>")
+        label = gtk.Label("<b>" + xstr("pirepView_runway") + "</b>")
         label.set_use_markup(True)
         dataBox.pack_start(label, False, False, 0)
 
         # FIXME: quite the same as the runway entry boxes in the wizard
-        self._departureRunway = Gtk.Entry()
+        self._departureRunway = gtk.Entry()
         self._departureRunway.set_width_chars(5)
         self._departureRunway.set_tooltip_text(xstr("takeoff_runway_tooltip"))
@@ -1216,5 +1216,5 @@
         dataBox.pack_start(self._departureRunway, False, False, 8)
 
-        label = Gtk.Label("<b>" + xstr("pirepView_sid") + "</b>")
+        label = gtk.Label("<b>" + xstr("pirepView_sid") + "</b>")
         label.set_use_markup(True)
         dataBox.pack_start(label, False, False, 0)
@@ -1222,5 +1222,8 @@
         # FIXME: quite the same as the SID combo box in
         # the flight wizard
-        self._sid = Gtk.ComboBox.new_with_model_and_entry(comboModel)
+        if pygobject:
+            self._sid = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        else:
+            self._sid = gtk.ComboBoxEntry(comboModel)
 
         self._sid.set_entry_text_column(0)
@@ -1248,5 +1251,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        table = Gtk.Table(2, 4)
+        table = gtk.Table(2, 4)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -1254,5 +1257,8 @@
 
         # FIXME: quite the same as in the wizard
-        self._star = Gtk.ComboBox.new_with_model_and_entry(comboModel)
+        if pygobject:
+            self._star = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        else:
+            self._star = gtk.ComboBoxEntry(comboModel)
 
         self._star.set_entry_text_column(0)
@@ -1266,5 +1272,8 @@
 
         # FIXME: quite the same as in the wizard
-        self._transition = Gtk.ComboBox.new_with_model_and_entry(comboModel)
+        if pygobject:
+            self._transition = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        else:
+            self._transition = gtk.ComboBoxEntry(comboModel)
 
         self._transition.set_entry_text_column(0)
@@ -1279,5 +1288,5 @@
 
         # FIXME: quite the same as in the wizard
-        self._approachType = Gtk.Entry()
+        self._approachType = gtk.Entry()
         self._approachType.set_width_chars(10)
         self._approachType.set_tooltip_text(xstr("landing_approach_tooltip"))
@@ -1289,5 +1298,5 @@
 
         # FIXME: quite the same as in the wizard
-        self._arrivalRunway = Gtk.Entry()
+        self._arrivalRunway = gtk.Entry()
         self._arrivalRunway.set_width_chars(10)
         self._arrivalRunway.set_tooltip_text(xstr("landing_runway_tooltip"))
@@ -1304,5 +1313,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_statistics"))
 
-        table = Gtk.Table(4, 4)
+        table = gtk.Table(4, 4)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -1356,5 +1365,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_miscellaneous"))
 
-        table = Gtk.Table(6, 2)
+        table = gtk.Table(6, 2)
         mainBox.pack_start(table, False, False, 0)
         table.set_row_spacings(4)
@@ -1404,5 +1413,5 @@
         self._flightType.set_tooltip_text(xstr("pirepEdit_flight_type_tooltip"))
 
-        self._online = Gtk.CheckButton(xstr("pirepEdit_online"))
+        self._online = gtk.CheckButton(xstr("pirepEdit_online"))
         table.attach(self._online, 2, 3, 2, 3)
         self._online.connect("toggled", self._updateButtons)
@@ -1426,5 +1435,5 @@
     def _buildLogTab(self):
         """Build the log tab."""
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
 
         (logWindow, self._log) = PIREPViewer.getTextWindow(heightRequest = -1)
@@ -1513,5 +1522,5 @@
         The PIREP is updated from the data in the window."""
         if not askYesNo(xstr("pirepEdit_save_question"), parent = self):
-            self.response(Gtk.ResponseType.CANCEL)
+            self.response(RESPONSETYPE_CANCEL)
 
         pirep = self._pirep
@@ -1560,5 +1569,5 @@
         pirep.flightDefects = self._flightInfo.faultsAndExplanations
 
-        self.response(Gtk.ResponseType.OK)
+        self.response(RESPONSETYPE_OK)
 
 
Index: src/mlx/gui/prefs.py
===================================================================
--- src/mlx/gui/prefs.py	(revision 999)
+++ src/mlx/gui/prefs.py	(revision 738)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 from mlx.i18n import xstr
@@ -6,5 +6,5 @@
 import mlx.config as config
 
-import urllib.parse
+import urlparse
 
 #------------------------------------------------------------------------------
@@ -20,5 +20,5 @@
 #------------------------------------------------------------------------------
 
-class Hotkey(Gtk.HBox):
+class Hotkey(gtk.HBox):
     """A widget to handle a hotkey."""
 
@@ -43,7 +43,7 @@
         super(Hotkey, self).__init__()
 
-        label = Gtk.Label(labelText)
+        label = gtk.Label(labelText)
         label.set_use_underline(True)
-        labelAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        labelAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                        xscale = 0.0, yscale = 0.0)
         labelAlignment.set_padding(padding_top = 0, padding_bottom = 0,
@@ -52,20 +52,20 @@
         self.pack_start(labelAlignment, False, False, 0)
 
-        self._ctrl = Gtk.CheckButton("Ctrl")
+        self._ctrl = gtk.CheckButton("Ctrl")
         self._ctrl.set_tooltip_text(tooltips[1])
         self._ctrl.connect("toggled", self._ctrlToggled)
         self.pack_start(self._ctrl, False, False, 4)
 
-        self._shift = Gtk.CheckButton("Shift")
+        self._shift = gtk.CheckButton("Shift")
         self._shift.set_tooltip_text(tooltips[2])
         self._shift.connect("toggled", self._shiftToggled)
         self.pack_start(self._shift, False, False, 4)
 
-        self._hotkeyModel = Gtk.ListStore(str)
-        for keyCode in list(range(ord("0"), ord("9")+1)) + list(range(ord("A"), ord("Z")+1)):
+        self._hotkeyModel = gtk.ListStore(str)
+        for keyCode in range(ord("0"), ord("9")+1) + range(ord("A"), ord("Z")+1):
             self._hotkeyModel.append([chr(keyCode)])
 
-        self._hotkey = Gtk.ComboBox(model = self._hotkeyModel)
-        cell = Gtk.CellRendererText()
+        self._hotkey = gtk.ComboBox(model = self._hotkeyModel)
+        cell = gtk.CellRendererText()
         self._hotkey.pack_start(cell, True)
         self._hotkey.add_attribute(cell, 'text', 0)
@@ -161,10 +161,10 @@
 #------------------------------------------------------------------------------
 
-GObject.signal_new("hotkey-changed", Hotkey, GObject.SIGNAL_RUN_FIRST,
+gobject.signal_new("hotkey-changed", Hotkey, gobject.SIGNAL_RUN_FIRST,
                    None, (int,))
 
 #------------------------------------------------------------------------------
 
-class Preferences(Gtk.Dialog):
+class Preferences(gtk.Dialog):
     """The preferences dialog."""
     def __init__(self, gui):
@@ -173,8 +173,8 @@
                                           xstr("prefs_title"),
                                           gui.mainWindow,
-                                          Gtk.DialogFlags.MODAL)
-
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
-        self.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
+                                          DIALOG_MODAL)
+
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
+        self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
         self.set_resizable(False)
 
@@ -184,9 +184,9 @@
         contentArea = self.get_content_area()
 
-        notebook = Gtk.Notebook()
+        notebook = gtk.Notebook()
         contentArea.pack_start(notebook, True, True, 4)
 
         general = self._buildGeneral()
-        label = Gtk.Label(xstr("prefs_tab_general"))
+        label = gtk.Label(xstr("prefs_tab_general"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("prefs_tab_general_tooltip"))
@@ -194,5 +194,5 @@
 
         messages = self._buildMessages()
-        label = Gtk.Label(xstr("prefs_tab_messages"))
+        label = gtk.Label(xstr("prefs_tab_messages"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("prefs_tab_message_tooltip"))
@@ -200,5 +200,5 @@
 
         sounds = self._buildSounds()
-        label = Gtk.Label(xstr("prefs_tab_sounds"))
+        label = gtk.Label(xstr("prefs_tab_sounds"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("prefs_tab_sounds_tooltip"))
@@ -206,5 +206,5 @@
 
         advanced = self._buildAdvanced()
-        label = Gtk.Label(xstr("prefs_tab_advanced"))
+        label = gtk.Label(xstr("prefs_tab_advanced"))
         label.set_use_underline(True)
         label.set_tooltip_text(xstr("prefs_tab_advanced_tooltip"))
@@ -222,5 +222,5 @@
         self.hide()
 
-        if response==Gtk.ResponseType.ACCEPT:
+        if response==RESPONSETYPE_ACCEPT:
             self._toConfig(config)
             config.save()
@@ -296,5 +296,5 @@
                                                        self._vsSmoothingLength)
         config.useSimBrief = self._useSimBrief.get_active()
-        config.pirepDirectory = self._pirepDirectory.get_text()
+        config.pirepDirectory = text2unicode(self._pirepDirectory.get_text())
         config.pirepAutoSave = self._pirepAutoSave.get_active()
 
@@ -326,22 +326,22 @@
     def _buildGeneral(self):
         """Build the page for the general settings."""
-        mainAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        mainAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                       xscale = 1.0, yscale = 0.0)
         mainAlignment.set_padding(padding_top = 0, padding_bottom = 8,
                                   padding_left = 4, padding_right = 4)
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         mainAlignment.add(mainBox)
 
         guiBox = self._createFrame(mainBox, xstr("prefs_frame_gui"))
 
-        languageBox = Gtk.HBox()
+        languageBox = gtk.HBox()
         guiBox.pack_start(languageBox, False, False, 4)
 
-        label = Gtk.Label(xstr("prefs_language"))
+        label = gtk.Label(xstr("prefs_language"))
         label.set_use_underline(True)
 
         languageBox.pack_start(label, False, False, 4)
 
-        self._languageList = Gtk.ListStore(str, str)
+        self._languageList = gtk.ListStore(str, str)
         for language in const.languages:
             self._languageList.append([xstr("prefs_lang_" + language),
@@ -349,6 +349,6 @@
 
         self._languageComboBox = languageComboBox = \
-            Gtk.ComboBox(model = self._languageList)
-        cell = Gtk.CellRendererText()
+            gtk.ComboBox(model = self._languageList)
+        cell = gtk.CellRendererText()
         languageComboBox.pack_start(cell, True)
         languageComboBox.add_attribute(cell, 'text', 0)
@@ -362,10 +362,10 @@
         self._warnedRestartNeeded = False
 
-        self._hideMinimizedWindow = Gtk.CheckButton(xstr("prefs_hideMinimizedWindow"))
+        self._hideMinimizedWindow = gtk.CheckButton(xstr("prefs_hideMinimizedWindow"))
         self._hideMinimizedWindow.set_use_underline(True)
         self._hideMinimizedWindow.set_tooltip_text(xstr("prefs_hideMinimizedWindow_tooltip"))
         guiBox.pack_start(self._hideMinimizedWindow, False, False, 4)
 
-        self._quitOnClose = Gtk.CheckButton(xstr("prefs_quitOnClose"))
+        self._quitOnClose = gtk.CheckButton(xstr("prefs_quitOnClose"))
         self._quitOnClose.set_use_underline(True)
         self._quitOnClose.set_tooltip_text(xstr("prefs_quitOnClose_tooltip"))
@@ -374,10 +374,10 @@
         onlineBox = self._createFrame(mainBox, xstr("prefs_frame_online"))
 
-        self._onlineGateSystem = Gtk.CheckButton(xstr("prefs_onlineGateSystem"))
+        self._onlineGateSystem = gtk.CheckButton(xstr("prefs_onlineGateSystem"))
         self._onlineGateSystem.set_use_underline(True)
         self._onlineGateSystem.set_tooltip_text(xstr("prefs_onlineGateSystem_tooltip"))
         onlineBox.pack_start(self._onlineGateSystem, False, False, 4)
 
-        self._onlineACARS = Gtk.CheckButton(xstr("prefs_onlineACARS"))
+        self._onlineACARS = gtk.CheckButton(xstr("prefs_onlineACARS"))
         self._onlineACARS.set_use_underline(True)
         self._onlineACARS.set_tooltip_text(xstr("prefs_onlineACARS_tooltip"))
@@ -386,15 +386,15 @@
         simulatorBox = self._createFrame(mainBox, xstr("prefs_frame_simulator"))
 
-        self._flareTimeFromFS = Gtk.CheckButton(xstr("prefs_flaretimeFromFS"))
+        self._flareTimeFromFS = gtk.CheckButton(xstr("prefs_flaretimeFromFS"))
         self._flareTimeFromFS.set_use_underline(True)
         self._flareTimeFromFS.set_tooltip_text(xstr("prefs_flaretimeFromFS_tooltip"))
         simulatorBox.pack_start(self._flareTimeFromFS, False, False, 4)
 
-        self._syncFSTime = Gtk.CheckButton(xstr("prefs_syncFSTime"))
+        self._syncFSTime = gtk.CheckButton(xstr("prefs_syncFSTime"))
         self._syncFSTime.set_use_underline(True)
         self._syncFSTime.set_tooltip_text(xstr("prefs_syncFSTime_tooltip"))
         simulatorBox.pack_start(self._syncFSTime, False, False, 4)
 
-        self._usingFS2Crew = Gtk.CheckButton(xstr("prefs_usingFS2Crew"))
+        self._usingFS2Crew = gtk.CheckButton(xstr("prefs_usingFS2Crew"))
         self._usingFS2Crew.set_use_underline(True)
         self._usingFS2Crew.set_tooltip_text(xstr("prefs_usingFS2Crew_tooltip"))
@@ -413,17 +413,17 @@
         simulatorBox.pack_start(vsSmoothingBox, False, False, 4)
 
-        self._useSimBrief = Gtk.CheckButton(xstr("prefs_useSimBrief"))
+        self._useSimBrief = gtk.CheckButton(xstr("prefs_useSimBrief"))
         self._useSimBrief.set_use_underline(True)
         self._useSimBrief.set_tooltip_text(xstr("prefs_useSimBrief_tooltip"))
         mainBox.pack_start(self._useSimBrief, False, False, 0)
 
-        pirepBox = Gtk.HBox()
+        pirepBox = gtk.HBox()
         mainBox.pack_start(pirepBox, False, False, 8)
 
-        label = Gtk.Label(xstr("prefs_pirepDirectory"))
+        label = gtk.Label(xstr("prefs_pirepDirectory"))
         label.set_use_underline(True)
         pirepBox.pack_start(label, False, False, 4)
 
-        self._pirepDirectory = Gtk.Entry()
+        self._pirepDirectory = gtk.Entry()
         self._pirepDirectory.set_tooltip_text(xstr("prefs_pirepDirectory_tooltip"))
         self._pirepDirectory.connect("changed", self._pirepDirectoryChanged)
@@ -431,10 +431,10 @@
         pirepBox.pack_start(self._pirepDirectory, True, True, 4)
 
-        self._pirepDirectoryButton = Gtk.Button(xstr("button_browse"))
+        self._pirepDirectoryButton = gtk.Button(xstr("button_browse"))
         self._pirepDirectoryButton.connect("clicked",
                                            self._pirepDirectoryButtonClicked)
         pirepBox.pack_start(self._pirepDirectoryButton, False, False, 4)
 
-        self._pirepAutoSave = Gtk.CheckButton(xstr("prefs_pirepAutoSave"))
+        self._pirepAutoSave = gtk.CheckButton(xstr("prefs_pirepAutoSave"))
         self._pirepAutoSave.set_use_underline(True)
         self._pirepAutoSave.set_tooltip_text(xstr("prefs_pirepAutoSave_tooltip"))
@@ -447,12 +447,12 @@
 
         Return the vbox."""
-        frame = Gtk.Frame(label = label)
+        frame = gtk.Frame(label = label)
         mainBox.pack_start(frame, False, False, 4)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                   xscale = 1.0, yscale = 0.0)
         alignment.set_padding(padding_top = 4, padding_bottom = 0,
                               padding_left = 0, padding_right = 0)
         frame.add(alignment)
-        vbox = Gtk.VBox()
+        vbox = gtk.VBox()
         alignment.add(vbox)
 
@@ -462,7 +462,7 @@
                             maxSeconds = 10):
         """Create a HBox that contains entry fields for smoothing some value."""
-        smoothingBox = Gtk.HBox()
-
-        smoothingEnabled = Gtk.CheckButton(checkBoxLabel)
+        smoothingBox = gtk.HBox()
+
+        smoothingEnabled = gtk.CheckButton(checkBoxLabel)
         smoothingEnabled.set_use_underline(True)
         smoothingEnabled.set_tooltip_text(checkBoxTooltip)
@@ -470,5 +470,5 @@
         smoothingBox.pack_start(smoothingEnabled, False, False, 0)
 
-        smoothingLength = Gtk.SpinButton()
+        smoothingLength = gtk.SpinButton()
         smoothingLength.set_numeric(True)
         smoothingLength.set_range(2, maxSeconds)
@@ -479,5 +479,5 @@
         smoothingBox.pack_start(smoothingLength, False, False, 0)
 
-        smoothingBox.pack_start(Gtk.Label(xstr("prefs_smoothing_seconds")),
+        smoothingBox.pack_start(gtk.Label(xstr("prefs_smoothing_seconds")),
                                 False, False, 4)
 
@@ -511,8 +511,8 @@
         """Called when the language has changed."""
         if not self._changingLanguage and not self._warnedRestartNeeded:
-            dialog = Gtk.MessageDialog(parent = self,
-                                       type = Gtk.MessageType.INFO,
+            dialog = gtk.MessageDialog(parent = self,
+                                       type = MESSAGETYPE_INFO,
                                        message_format = xstr("prefs_restart"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(self.get_title())
             dialog.format_secondary_markup(xstr("prefs_language_restart_sec"))
@@ -548,9 +548,9 @@
     def _pirepDirectoryButtonClicked(self, button):
         """Called when the PIREP directory button is clicked."""
-        dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
+        dialog = gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                        xstr("prefs_pirepDirectory_browser_title"),
-                                       action = Gtk.FileChooserAction.SELECT_FOLDER,
-                                       buttons = (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
-                                                  Gtk.STOCK_OK, Gtk.ResponseType.OK),
+                                       action = FILE_CHOOSER_ACTION_SELECT_FOLDER,
+                                       buttons = (gtk.STOCK_CANCEL, RESPONSETYPE_CANCEL,
+                                                  gtk.STOCK_OK, RESPONSETYPE_OK),
                                        parent = self)
         dialog.set_modal(True)
@@ -564,6 +564,6 @@
         dialog.hide()
 
-        if result==Gtk.ResponseType.OK:
-            self._pirepDirectory.set_text(dialog.get_filename())
+        if result==RESPONSETYPE_OK:
+            self._pirepDirectory.set_text(text2unicode(dialog.get_filename()))
 
     def _pirepDirectoryChanged(self, entry):
@@ -578,12 +578,12 @@
         """Build the page for the message settings."""
 
-        mainAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        mainAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                       xscale = 0.0, yscale = 0.0)
         mainAlignment.set_padding(padding_top = 16, padding_bottom = 8,
                                   padding_left = 4, padding_right = 4)
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         mainAlignment.add(mainBox)
 
-        table = Gtk.Table(len(const.messageTypes) + 1, 3)
+        table = gtk.Table(len(const.messageTypes) + 1, 3)
         table.set_row_spacings(8)
         table.set_col_spacings(32)
@@ -591,11 +591,11 @@
         mainBox.pack_start(table, False, False, 4)
 
-        label = Gtk.Label(xstr("prefs_msgs_fs"))
-        label.set_justify(Gtk.Justification.CENTER)
+        label = gtk.Label(xstr("prefs_msgs_fs"))
+        label.set_justify(JUSTIFY_CENTER)
         label.set_alignment(0.5, 1.0)
         table.attach(label, 1, 2, 0, 1)
 
-        label = Gtk.Label(xstr("prefs_msgs_sound"))
-        label.set_justify(Gtk.Justification.CENTER)
+        label = gtk.Label(xstr("prefs_msgs_sound"))
+        label.set_justify(JUSTIFY_CENTER)
         label.set_alignment(0.5, 1.0)
         table.attach(label, 2, 3, 0, 1)
@@ -606,12 +606,12 @@
         for messageType in const.messageTypes:
             messageTypeStr = const.messageType2string(messageType)
-            label = Gtk.Label(xstr("prefs_msgs_type_" + messageTypeStr))
-            label.set_justify(Gtk.Justification.CENTER)
+            label = gtk.Label(xstr("prefs_msgs_type_" + messageTypeStr))
+            label.set_justify(JUSTIFY_CENTER)
             label.set_use_underline(True)
             label.set_alignment(0.5, 0.5)
             table.attach(label, 0, 1, row, row+1)
 
-            fsCheckButton = Gtk.CheckButton()
-            alignment = Gtk.Alignment(xscale = 0.0, yscale = 0.0,
+            fsCheckButton = gtk.CheckButton()
+            alignment = gtk.Alignment(xscale = 0.0, yscale = 0.0,
                                       xalign = 0.5, yalign = 0.5)
             alignment.add(fsCheckButton)
@@ -619,6 +619,6 @@
             self._msgFSCheckButtons[messageType] = fsCheckButton
 
-            soundCheckButton = Gtk.CheckButton()
-            alignment = Gtk.Alignment(xscale = 0.0, yscale = 0.0,
+            soundCheckButton = gtk.CheckButton()
+            alignment = gtk.Alignment(xscale = 0.0, yscale = 0.0,
                                       xalign = 0.5, yalign = 0.5)
             alignment.add(soundCheckButton)
@@ -626,5 +626,5 @@
             self._msgSoundCheckButtons[messageType] = soundCheckButton
 
-            mnemonicWidget = Gtk.Label("")
+            mnemonicWidget = gtk.Label("")
             table.attach(mnemonicWidget, 3, 4, row, row+1)
             label.set_mnemonic_widget(mnemonicWidget)
@@ -655,16 +655,16 @@
     def _buildSounds(self):
         """Build the page for the sounds."""
-        mainAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        mainAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                       xscale = 1.0, yscale = 1.0)
         mainAlignment.set_padding(padding_top = 8, padding_bottom = 8,
                                   padding_left = 4, padding_right = 4)
 
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         mainAlignment.add(mainBox)
 
-        backgroundFrame = Gtk.Frame(label = xstr("prefs_sounds_frame_bg"))
+        backgroundFrame = gtk.Frame(label = xstr("prefs_sounds_frame_bg"))
         mainBox.pack_start(backgroundFrame, False, False, 4)
 
-        backgroundAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        backgroundAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                             xscale = 1.0, yscale = 0.0)
         backgroundAlignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -672,17 +672,17 @@
         backgroundFrame.add(backgroundAlignment)
 
-        backgroundBox = Gtk.VBox()
+        backgroundBox = gtk.VBox()
         backgroundAlignment.add(backgroundBox)
 
-        self._enableSounds = Gtk.CheckButton(xstr("prefs_sounds_enable"))
+        self._enableSounds = gtk.CheckButton(xstr("prefs_sounds_enable"))
         self._enableSounds.set_use_underline(True)
         self._enableSounds.set_tooltip_text(xstr("prefs_sounds_enable_tooltip"))
         self._enableSounds.connect("toggled", self._enableSoundsToggled)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 1.0, yscale = 0.0)
         alignment.add(self._enableSounds)
         backgroundBox.pack_start(alignment, False, False, 4)
 
-        self._pilotControlsSounds = Gtk.CheckButton(xstr("prefs_sounds_pilotControls"))
+        self._pilotControlsSounds = gtk.CheckButton(xstr("prefs_sounds_pilotControls"))
         self._pilotControlsSounds.set_use_underline(True)
         self._pilotControlsSounds.set_tooltip_text(xstr("prefs_sounds_pilotControls_tooltip"))
@@ -697,18 +697,18 @@
         backgroundBox.pack_start(self._pilotHotkey, False, False, 4)
 
-        self._enableApproachCallouts = Gtk.CheckButton(xstr("prefs_sounds_approachCallouts"))
+        self._enableApproachCallouts = gtk.CheckButton(xstr("prefs_sounds_approachCallouts"))
         self._enableApproachCallouts.set_use_underline(True)
         self._enableApproachCallouts.set_tooltip_text(xstr("prefs_sounds_approachCallouts_tooltip"))
         backgroundBox.pack_start(self._enableApproachCallouts, False, False, 4)
 
-        self._speedbrakeAtTD = Gtk.CheckButton(xstr("prefs_sounds_speedbrakeAtTD"))
+        self._speedbrakeAtTD = gtk.CheckButton(xstr("prefs_sounds_speedbrakeAtTD"))
         self._speedbrakeAtTD.set_use_underline(True)
         self._speedbrakeAtTD.set_tooltip_text(xstr("prefs_sounds_speedbrakeAtTD_tooltip"))
         backgroundBox.pack_start(self._speedbrakeAtTD, False, False, 4)
 
-        checklistFrame = Gtk.Frame(label = xstr("prefs_sounds_frame_checklists"))
+        checklistFrame = gtk.Frame(label = xstr("prefs_sounds_frame_checklists"))
         mainBox.pack_start(checklistFrame, False, False, 4)
 
-        checklistAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        checklistAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                            xscale = 1.0, yscale = 0.0)
         checklistAlignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -716,8 +716,8 @@
         checklistFrame.add(checklistAlignment)
 
-        checklistBox = Gtk.VBox()
+        checklistBox = gtk.VBox()
         checklistAlignment.add(checklistBox)
 
-        self._enableChecklists = Gtk.CheckButton(xstr("prefs_sounds_enableChecklists"))
+        self._enableChecklists = gtk.CheckButton(xstr("prefs_sounds_enableChecklists"))
         self._enableChecklists.set_use_underline(True)
         self._enableChecklists.set_tooltip_text(xstr("prefs_sounds_enableChecklists_tooltip"))
@@ -789,12 +789,12 @@
         """Build the page for the advanced settings."""
 
-        mainAlignment = Gtk.Alignment(xalign = 0.0, yalign = 0.0,
+        mainAlignment = gtk.Alignment(xalign = 0.0, yalign = 0.0,
                                       xscale = 1.0, yscale = 0.0)
         mainAlignment.set_padding(padding_top = 16, padding_bottom = 8,
                                   padding_left = 4, padding_right = 4)
-        mainBox = Gtk.VBox()
+        mainBox = gtk.VBox()
         mainAlignment.add(mainBox)
 
-        self._autoUpdate = Gtk.CheckButton(xstr("prefs_update_auto"))
+        self._autoUpdate = gtk.CheckButton(xstr("prefs_update_auto"))
         mainBox.pack_start(self._autoUpdate, False, False, 4)
 
@@ -804,11 +804,11 @@
         self._warnedAutoUpdate = False
 
-        updateURLBox = Gtk.HBox()
+        updateURLBox = gtk.HBox()
         mainBox.pack_start(updateURLBox, False, False, 4)
-        label = Gtk.Label(xstr("prefs_update_url"))
+        label = gtk.Label(xstr("prefs_update_url"))
         label.set_use_underline(True)
         updateURLBox.pack_start(label, False, False, 4)
 
-        self._updateURL = Gtk.Entry()
+        self._updateURL = gtk.Entry()
         label.set_mnemonic_widget(self._updateURL)
         self._updateURL.set_width_chars(40)
@@ -817,5 +817,5 @@
         updateURLBox.pack_start(self._updateURL, True, True, 4)
 
-        self._useRPC = Gtk.CheckButton(xstr("prefs_use_rpc"))
+        self._useRPC = gtk.CheckButton(xstr("prefs_use_rpc"))
         mainBox.pack_start(self._useRPC, False, False, 16)
 
@@ -829,10 +829,10 @@
         sensitive = False
         try:
-            result = urllib.parse.urlparse(self._updateURL.get_text())
+            result = urlparse.urlparse(self._updateURL.get_text())
             sensitive = result.scheme!="" and (result.netloc + result.path)!=""
         except:
             pass
 
-        okButton = self.get_widget_for_response(Gtk.ResponseType.ACCEPT)
+        okButton = self.get_widget_for_response(RESPONSETYPE_ACCEPT)
         okButton.set_sensitive(sensitive)
 
@@ -841,8 +841,8 @@
         if not self._settingFromConfig and not self._warnedAutoUpdate and \
            not self._autoUpdate.get_active():
-            dialog = Gtk.MessageDialog(parent = self,
-                                       type = Gtk.MessageType.INFO,
+            dialog = gtk.MessageDialog(parent = self,
+                                       type = MESSAGETYPE_INFO,
                                        message_format = xstr("prefs_update_auto_warning"))
-            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
             dialog.set_title(self.get_title())
             dialog.run()
Index: src/mlx/gui/statusbar.py
===================================================================
--- src/mlx/gui/statusbar.py	(revision 999)
+++ src/mlx/gui/statusbar.py	(revision 679)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 import mlx.const as const
@@ -20,9 +20,9 @@
 #-------------------------------------------------------------------------------
 
-class Statusbar(Gtk.Frame, FlightStatusHandler):
+class Statusbar(gtk.Frame, FlightStatusHandler):
     """A status bar for the logger."""
     def __init__(self, iconDirectory):
         """Construct the status bar."""
-        Gtk.Frame.__init__(self)
+        gtk.Frame.__init__(self)
         FlightStatusHandler.__init__(self)
 
@@ -30,7 +30,8 @@
         self._connected = False
         
-        self.set_shadow_type(Gtk.ShadowType.NONE)
+        self.set_shadow_type(gtk.ShadowType.NONE if pygobject
+                             else gtk.SHADOW_NONE)
 
-        frameAlignment = Gtk.Alignment(xscale = 1.0, yscale = 1.0)
+        frameAlignment = gtk.Alignment(xscale = 1.0, yscale = 1.0)
 
         frameAlignment.set_padding(padding_top = 2, padding_bottom = 2,
@@ -38,30 +39,33 @@
         self.add(frameAlignment)
 
-        statusBox = Gtk.HBox()
+        statusBox = gtk.HBox()
         frameAlignment.add(statusBox)
 
         iconPath = os.path.join(iconDirectory, "conn_grey.png")
-        self._connGreyIcon = GdkPixbuf.Pixbuf.new_from_file(iconPath)
+        self._connGreyIcon = pixbuf_new_from_file(iconPath)
 
         iconPath = os.path.join(iconDirectory, "conn_red.png")
-        self._connRedIcon = GdkPixbuf.Pixbuf.new_from_file(iconPath)
+        self._connRedIcon = pixbuf_new_from_file(iconPath)
 
         iconPath = os.path.join(iconDirectory, "conn_green.png")
-        self._connGreenIcon = GdkPixbuf.Pixbuf.new_from_file(iconPath)
+        self._connGreenIcon = pixbuf_new_from_file(iconPath)
 
-        self._connStateArea = Gtk.DrawingArea()
+        self._connStateArea = gtk.DrawingArea()
         self._connStateArea.set_size_request(18, 18)
         self._connStateArea.set_tooltip_markup(xstr("statusbar_conn_tooltip"))
 
-        self._connStateArea.connect("draw", self._drawConnState)
+        if pygobject:
+            self._connStateArea.connect("draw", self._drawConnState)
+        else:
+            self._connStateArea.connect("expose_event", self._drawConnState)
 
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5)
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5)
         alignment.add(self._connStateArea)        
 
         statusBox.pack_start(alignment, False, False, 8)
 
-        statusBox.pack_start(Gtk.VSeparator(), False, False, 8)
+        statusBox.pack_start(gtk.VSeparator(), False, False, 8)
 
-        self._stageLabel = Gtk.Label()
+        self._stageLabel = gtk.Label()
         longestStage = xstr("flight_stage_" +
                             const.stage2string(const.STAGE_PUSHANDTAXI))
@@ -72,7 +76,7 @@
         statusBox.pack_start(self._stageLabel, False, False, 8)
 
-        statusBox.pack_start(Gtk.VSeparator(), False, False, 8)
+        statusBox.pack_start(gtk.VSeparator(), False, False, 8)
 
-        self._timeLabel = Gtk.Label("--:--:--")
+        self._timeLabel = gtk.Label("--:--:--")
         self._timeLabel.set_width_chars(8)
         self._timeLabel.set_tooltip_text(xstr("statusbar_time_tooltip"))
@@ -81,7 +85,7 @@
         statusBox.pack_start(self._timeLabel, False, False, 8)
 
-        statusBox.pack_start(Gtk.VSeparator(), False, False, 8)
+        statusBox.pack_start(gtk.VSeparator(), False, False, 8)
 
-        self._ratingLabel = Gtk.Label()
+        self._ratingLabel = gtk.Label()
         self._ratingLabel.set_width_chars(20)
         self._ratingLabel.set_tooltip_text(xstr("statusbar_rating_tooltip"))
@@ -90,5 +94,5 @@
         statusBox.pack_start(self._ratingLabel, False, False, 8)
 
-        self._busyLabel = Gtk.Label()
+        self._busyLabel = gtk.Label()
         self._busyLabel.set_width_chars(30)
         self._busyLabel.set_tooltip_text(xstr("statusbar_busy_tooltip"))
@@ -126,6 +130,11 @@
             icon = self._connGreyIcon
 
-        Gdk.cairo_set_source_pixbuf(eventOrContext, icon, 0, 0)
-        eventOrContext.paint()
+        if pygobject:
+            gdk.cairo_set_source_pixbuf(eventOrContext, icon, 0, 0)
+            eventOrContext.paint()
+        else:
+            gc = connStateArea.get_style().fg_gc[gtk.STATE_NORMAL]
+            drawable = connStateArea.get_window()
+            drawable.draw_pixbuf(gc, icon, 0, 0, 0, 0)
 
     def _updateFlightStatus(self):
Index: src/mlx/gui/statusicon.py
===================================================================
--- src/mlx/gui/statusicon.py	(revision 998)
+++ src/mlx/gui/statusicon.py	(revision 544)
@@ -1,4 +1,4 @@
 
-from .common import *
+from common import *
 
 import mlx.const as const
@@ -30,20 +30,20 @@
         self._selfToggling = False
 
-        menu = Gtk.Menu()
+        menu = gtk.Menu()
 
         if appIndicator:
-            self._stageMenuItem = Gtk.MenuItem("-")
+            self._stageMenuItem = gtk.MenuItem("-")
             self._stageMenuItem.show()
             menu.append(self._stageMenuItem)
 
-            self._ratingMenuItem = Gtk.MenuItem("-")
+            self._ratingMenuItem = gtk.MenuItem("-")
             self._ratingMenuItem.show()
             menu.append(self._ratingMenuItem)
 
-            separator = Gtk.SeparatorMenuItem()
+            separator = gtk.SeparatorMenuItem()
             separator.show()
             menu.append(separator)
 
-        self._showHideMenuItem = Gtk.CheckMenuItem()
+        self._showHideMenuItem = gtk.CheckMenuItem()
         self._showHideMenuItem.set_label(xstr("statusicon_showmain"))
         self._showHideMenuItem.set_active(True)
@@ -52,5 +52,5 @@
         menu.append(self._showHideMenuItem)
 
-        self._showMonitorMenuItem = Gtk.CheckMenuItem()
+        self._showMonitorMenuItem = gtk.CheckMenuItem()
         self._showMonitorMenuItem.set_label(xstr("statusicon_showmonitor"))
         self._showMonitorMenuItem.set_active(False)
@@ -59,9 +59,9 @@
         menu.append(self._showMonitorMenuItem)
 
-        separator = Gtk.SeparatorMenuItem()
+        separator = gtk.SeparatorMenuItem()
         separator.show()
         menu.append(separator)
 
-        self._quitMenuItem = Gtk.MenuItem()
+        self._quitMenuItem = gtk.MenuItem()
         self._quitMenuItem.set_label(xstr("statusicon_quit"))
         self._quitMenuItem.show()
@@ -74,7 +74,12 @@
 
         if appIndicator:
-            indicator = AppIndicator3.Indicator.new ("mava-logger-x", iconFile,
-                                                     AppIndicator3.IndicatorCategory.APPLICATION_STATUS)
-            indicator.set_status (AppIndicator3.IndicatorStatus.ACTIVE)
+            if pygobject:
+                indicator = appindicator.Indicator.new ("mava-logger-x", iconFile,
+                                                        appindicator.IndicatorCategory.APPLICATION_STATUS)
+                indicator.set_status (appindicator.IndicatorStatus.ACTIVE)
+            else:
+                indicator = appindicator.Indicator ("mava-logger-x", iconFile,
+                                                    appindicator.CATEGORY_APPLICATION_STATUS)
+                indicator.set_status (appindicator.STATUS_ACTIVE)
 
             indicator.set_menu(menu)
@@ -82,8 +87,8 @@
         else:
             def popup_menu(status, button, time):
-                menu.popup(None, None, Gtk.status_icon_position_menu,
+                menu.popup(None, None, gtk.status_icon_position_menu,
                            button, time, status)
 
-            statusIcon = Gtk.StatusIcon()
+            statusIcon = gtk.StatusIcon()
             statusIcon.set_from_file(iconFile)
             statusIcon.set_visible(True)
@@ -122,5 +127,8 @@
         """Hide and destroy the status icon."""
         if appIndicator:
-            self._indicator.set_status(AppIndicator3.IndicatorStatus.PASSIVE)
+            if pygobject:
+                self._indicator.set_status(appindicator.IndicatorStatus.PASSIVE)
+            else:
+                self._indicator.set_status(appindicator.STATUS_PASSIVE)
         else:
             self._statusIcon.set_visible(False)
@@ -146,5 +154,5 @@
     def _updateFlightStatus(self):
         """Update the flight status."""
-        stage = "-" if self._stage is None \
+        stage = u"-" if self._stage is None \
                 else xstr("flight_stage_" + const.stage2string(self._stage))
 
@@ -164,5 +172,5 @@
             if self._noGoReason is not None:
                 rating = '<span foreground="red">' + rating + '</span>'
-            markup = "MAVA Logger X %s\n\n%s: %s\n%s: %s" %\
+            markup = u"MAVA Logger X %s\n\n%s: %s\n%s: %s" %\
                      (const.VERSION, xstr("statusicon_stage"), stage,
                       xstr("statusicon_rating"), rating)
Index: src/mlx/gui/timetable.py
===================================================================
--- src/mlx/gui/timetable.py	(revision 1012)
+++ src/mlx/gui/timetable.py	(revision 879)
@@ -4,5 +4,5 @@
 
 from mlx.gui.common import *
-from .flightlist import ColumnDescriptor
+from flightlist import ColumnDescriptor
 from mlx.rpc import ScheduledFlight
 
@@ -14,9 +14,9 @@
 #-----------------------------------------------------------------------------
 
-class Timetable(Gtk.Alignment):
+class Timetable(gtk.Alignment):
     """The widget for the time table."""
     def _getVIPRenderer():
         """Get the renderer for the VIP column."""
-        renderer = Gtk.CellRendererToggle()
+        renderer = gtk.CellRendererToggle()
         renderer.set_activatable(True)
         return renderer
@@ -74,15 +74,17 @@
             columnDescriptor.appendType(types)
 
-        self._model = Gtk.ListStore(*types)
+        self._model = gtk.ListStore(*types)
         if defaultSortableIndex is not None:
-            sortOrder = Gtk.SortType.DESCENDING \
+            sortOrder = SORT_DESCENDING \
               if self._columnDescriptors[defaultSortableIndex-1]._defaultDescending \
-              else Gtk.SortType.ASCENDING
+              else SORT_ASCENDING
             self._model.set_sort_column_id(defaultSortableIndex, sortOrder)
-        self._view = Gtk.TreeView(self._model)
-
+        self._view = gtk.TreeView(self._model)
+
+        self._tooltips = gtk.Tooltips()
+        self._tooltips.disable()
         self._view.connect("motion-notify-event", self._updateTooltip)
 
-        flightPairIndexColumn = Gtk.TreeViewColumn()
+        flightPairIndexColumn = gtk.TreeViewColumn()
         flightPairIndexColumn.set_visible(False)
         self._view.append_column(flightPairIndexColumn)
@@ -102,12 +104,15 @@
         selection.connect("changed", self._selectionChanged)
 
-        scrolledWindow = Gtk.ScrolledWindow()
+        scrolledWindow = gtk.ScrolledWindow()
         scrolledWindow.add(self._view)
         scrolledWindow.set_size_request(800, -1)
 
         # FIXME: these should be constants in common.py
-        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
-                                  Gtk.PolicyType.AUTOMATIC)
-        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC,
+                                  gtk.PolicyType.AUTOMATIC if pygobject
+                                  else gtk.POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(gtk.ShadowType.IN if pygobject
+                                       else gtk.SHADOW_IN)
 
         super(Timetable, self).__init__(xalign = 0.5, yalign = 0.0,
@@ -175,5 +180,5 @@
     def _buttonPressEvent(self, widget, event):
         """Called when a mouse button is pressed or released."""
-        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3 or \
+        if event.type!=EVENT_BUTTON_PRESS or event.button!=3 or \
            self._popupMenuProducer is None:
             return
@@ -188,5 +193,8 @@
             self._popupMenu = self._popupMenuProducer()
         menu = self._popupMenu
-        menu.popup(None, None, None, None, event.button, event.time)
+        if pygobject:
+            menu.popup(None, None, None, None, event.button, event.time)
+        else:
+            menu.popup(None, None, None, event.button, event.time)
 
     def _selectionChanged(self, selection):
@@ -217,5 +225,6 @@
             result = widget.get_path_at_pos( int(event.x), int(event.y))
             if result is None:
-                widget.set_tooltip_text("")
+                self._tooltips.set_tip(widget, "")
+                self._tooltips.disable()
             else:
                 (path, col, x, y) = result
@@ -235,22 +244,17 @@
                         text += date.strftime("%Y-%m-%d")
 
-                    widget.set_tooltip_text(text)
+                    self._tooltips.set_tip(widget, text)
+                    self._tooltips.enable()
                 else:
-                    widget.set_tooltip_text("")
-        except Exception as e:
-            print(e)
-            widget.set_tooltip_text("")
+                    self._tooltips.set_tip(widget, "")
+                    self._tooltips.disable()
+        except Exception, e:
+            print e
+            self._tooltips.set_tip(widget, "")
+            self._tooltips.disable()
 
 #-----------------------------------------------------------------------------
 
-GObject.signal_new("row-activated", Timetable, GObject.SIGNAL_RUN_FIRST,
-                   None, (int,))
-
-GObject.signal_new("selection-changed", Timetable, GObject.SIGNAL_RUN_FIRST,
-                   None, (object,))
-
-#-----------------------------------------------------------------------------
-
-class CalendarWindow(Gtk.Window):
+class CalendarWindow(gtk.Window):
     """A window for a calendar."""
     def __init__(self):
@@ -262,10 +266,10 @@
         self.connect("key-press-event", self._keyPressed)
 
-        mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 1.0, yscale = 1.0)
         #mainAlignment.set_padding(padding_top = 0, padding_bottom = 12,
         #                              padding_left = 8, padding_right = 8)
 
-        self._calendar = Gtk.Calendar()
+        self._calendar = gtk.Calendar()
         self._calendar.connect("day-selected-double-click", self._daySelectedDoubleClick)
         mainAlignment.add(self._calendar)
@@ -292,5 +296,5 @@
         If the Escape key is pressed, 'delete-event' is emitted to close the
         window."""
-        keyName = Gdk.keyval_name(event.keyval)
+        keyName = gdk.keyval_name(event.keyval)
         if keyName =="Escape":
             self.emit("delete-event", None)
@@ -300,10 +304,10 @@
             return True
 
-GObject.signal_new("date-selected", CalendarWindow, GObject.SIGNAL_RUN_FIRST,
+gobject.signal_new("date-selected", CalendarWindow, gobject.SIGNAL_RUN_FIRST,
                    None, ())
 
 #-----------------------------------------------------------------------------
 
-class BookDialog(Gtk.Dialog):
+class BookDialog(gtk.Dialog):
     """The dialog box to select additional data for a booking."""
     def __init__(self, timetableWindow, flightPair, planes):
@@ -315,18 +319,18 @@
         contentArea = self.get_content_area()
 
-        frame = Gtk.Frame(label = xstr("timetable_book_frame_title"))
+        frame = gtk.Frame(xstr("timetable_book_frame_title"))
         frame.set_size_request(600, -1)
 
-        mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 0.0, yscale = 0.0)
         mainAlignment.set_padding(padding_top = 16, padding_bottom = 12,
                                   padding_left = 8, padding_right = 8)
 
-        table = Gtk.Table(6, 2)
+        table = gtk.Table(6, 2)
         table.set_row_spacings(8)
         table.set_col_spacings(16)
 
         row = 0
-        label = Gtk.Label()
+        label = gtk.Label()
         label.set_markup(xstr("timetable_book_callsign"))
         label.set_alignment(0.0, 0.5)
@@ -336,5 +340,5 @@
         if flightPair.flight1 is not None:
             text += " / " + flightPair.flight1.callsign
-        label = Gtk.Label(text)
+        label = gtk.Label(text)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
@@ -342,5 +346,5 @@
         row += 1
 
-        label = Gtk.Label()
+        label = gtk.Label()
         label.set_markup(xstr("timetable_book_from_to"))
         label.set_alignment(0.0, 0.5)
@@ -351,5 +355,5 @@
         if flightPair.flight1 is not None:
             text += " - " + flightPair.flight1.arrivalICAO
-        label = Gtk.Label(text)
+        label = gtk.Label(text)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
@@ -359,5 +363,5 @@
         if flightPair.flight0.type==ScheduledFlight.TYPE_VIP and \
            flightPair.flight0.date!=const.defaultDate:
-            label = Gtk.Label()
+            label = gtk.Label()
             label.set_markup(xstr("timetable_book_flightDate"))
             label.set_use_underline(True)
@@ -365,5 +369,5 @@
             table.attach(label, 0, 1, row, row + 1)
 
-            self._flightDate = Gtk.Button()
+            self._flightDate = gtk.Button()
             self._flightDate.connect("clicked", self._flightDateClicked)
             self._flightDate.set_tooltip_text(xstr("timetable_book_flightDate_tooltip"))
@@ -384,5 +388,5 @@
             self._calendarWindow = None
 
-        label = Gtk.Label()
+        label = gtk.Label()
         label.set_markup(xstr("timetable_book_dep_arr"))
         label.set_alignment(0.0, 0.5)
@@ -394,5 +398,5 @@
             text += " / " + str(flightPair.flight1.departureTime) + " - " + \
                     str(flightPair.flight1.arrivalTime)
-        label = Gtk.Label(text)
+        label = gtk.Label(text)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
@@ -400,5 +404,5 @@
         row += 1
 
-        label = Gtk.Label()
+        label = gtk.Label()
         label.set_markup(xstr("timetable_book_duration"))
         label.set_alignment(0.0, 0.5)
@@ -411,5 +415,5 @@
             duration = flightPair.flight0.duration
             text += " / %02d:%02d" % (duration/3600, (duration%3600)/60)
-        label = Gtk.Label(text)
+        label = gtk.Label(text)
         label.set_alignment(0.0, 0.5)
         table.attach(label, 1, 2, row, row + 1)
@@ -417,5 +421,5 @@
         row += 2
 
-        label = Gtk.Label()
+        label = gtk.Label()
         label.set_markup(xstr("timetable_book_tailNumber"))
         label.set_alignment(0.0, 0.5)
@@ -423,10 +427,10 @@
 
         self._planes = planes
-        tailNumbersModel = Gtk.ListStore(str)
+        tailNumbersModel = gtk.ListStore(str)
         for plane in planes:
             tailNumbersModel.append((plane.tailNumber,))
 
-        self._tailNumber = Gtk.ComboBox(model = tailNumbersModel)
-        renderer = Gtk.CellRendererText()
+        self._tailNumber = gtk.ComboBox(model = tailNumbersModel)
+        renderer = gtk.CellRendererText()
         self._tailNumber.pack_start(renderer, True)
         self._tailNumber.add_attribute(renderer, "text", 0)
@@ -441,7 +445,7 @@
         contentArea.pack_start(frame, True, True, 4)
 
-        self.add_button(xstr("button_cancel"), Gtk.ResponseType.CANCEL)
-
-        self._okButton = self.add_button(xstr("button_book"), Gtk.ResponseType.OK)
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
+
+        self._okButton = self.add_button(xstr("button_book"), RESPONSETYPE_OK)
         self._okButton.set_use_underline(True)
         self._okButton.set_can_default(True)
@@ -465,5 +469,5 @@
     def _flightDateClicked(self, button):
         """Called when the flight date button is clicked."""
-        self._calendarWindow.set_position(Gtk.WindowPosition.MOUSE)
+        self._calendarWindow.set_position(gtk.WIN_POS_MOUSE)
         self.set_focus(self._calendarWindow)
         self._calendarWindow.show_all()
@@ -481,5 +485,5 @@
 #-----------------------------------------------------------------------------
 
-class TimetableWindow(Gtk.Window):
+class TimetableWindow(gtk.Window):
     """The window to display the timetable."""
     typeFamilies = [
@@ -506,28 +510,27 @@
         self.connect("key-press-event", self._keyPressed)
 
-        mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 1.0, yscale = 1.0)
         mainAlignment.set_padding(padding_top = 0, padding_bottom = 12,
                                   padding_left = 8, padding_right = 8)
 
-        vbox = Gtk.VBox()
-
-        filterAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        vbox = gtk.VBox()
+
+        filterAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                         xscale = 1.0, yscale = 1.0)
 
-        filterFrame = Gtk.Frame()
-        filterFrame.set_label(xstr("timetable_filter"))
-
-        filterVBox = Gtk.VBox()
-
-        topAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        filterFrame = gtk.Frame(xstr("timetable_filter"))
+
+        filterVBox = gtk.VBox()
+
+        topAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                      xscale = 0.0, yscale = 0.0)
-        topHBox = Gtk.HBox()
-
-        label = Gtk.Label(xstr("timetable_flightdate"))
+        topHBox = gtk.HBox()
+
+        label = gtk.Label(xstr("timetable_flightdate"))
         label.set_use_underline(True)
         topHBox.pack_start(label, False, False, 4)
 
-        self._flightDate = Gtk.Button()
+        self._flightDate = gtk.Button()
         self._flightDate.connect("clicked", self._flightDateClicked)
         self._flightDate.connect("clicked", self._flightDateClicked)
@@ -536,9 +539,9 @@
         topHBox.pack_start(self._flightDate, False, False, 4)
 
-        filler = Gtk.Alignment()
+        filler = gtk.Alignment()
         filler.set_size_request(48, 2)
         topHBox.pack_start(filler, False, True, 0)
 
-        self._regularFlights = Gtk.CheckButton(xstr("timetable_show_regular"))
+        self._regularFlights = gtk.CheckButton(xstr("timetable_show_regular"))
         self._regularFlights.set_use_underline(True)
         self._regularFlights.set_tooltip_text(xstr("timetable_show_regular_tooltip"))
@@ -547,5 +550,5 @@
         topHBox.pack_start(self._regularFlights, False, False, 8)
 
-        self._vipFlights = Gtk.CheckButton(xstr("timetable_show_vip"))
+        self._vipFlights = gtk.CheckButton(xstr("timetable_show_vip"))
         self._vipFlights.set_use_underline(True)
         self._vipFlights.set_tooltip_text(xstr("timetable_show_vip_tooltip"))
@@ -558,8 +561,8 @@
         filterVBox.pack_start(topAlignment, False, False, 4)
 
-        separator = Gtk.HSeparator()
+        separator = gtk.HSeparator()
         filterVBox.pack_start(separator, False, False, 4)
 
-        typeAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        typeAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 0.0, yscale = 0.0)
 
@@ -567,5 +570,5 @@
         numRows = (len(TimetableWindow.typeFamilies)+numColumns-1)/numColumns
 
-        typeTable = Gtk.Table(numRows, numColumns)
+        typeTable = gtk.Table(numRows, numColumns)
         typeTable.set_col_spacings(8)
         row = 0
@@ -573,5 +576,5 @@
         self._typeFamilyButtons = {}
         for typeFamily in TimetableWindow.typeFamilies:
-            checkButton = Gtk.CheckButton(aircraftFamilyNames[typeFamily])
+            checkButton = gtk.CheckButton(aircraftFamilyNames[typeFamily])
             checkButton.set_active(True)
             checkButton.connect("toggled", self._filterChanged)
@@ -599,9 +602,9 @@
         vbox.pack_start(self._timetable, True, True, 2)
 
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
-        buttonBox = Gtk.HBox()
-
-        self._bookButton = Gtk.Button(xstr("button_book"))
+        buttonBox = gtk.HBox()
+
+        self._bookButton = gtk.Button(xstr("button_book"))
         self._bookButton.set_use_underline(True)
         self._bookButton.set_can_default(True)
@@ -610,5 +613,5 @@
         buttonBox.pack_start(self._bookButton, False, False, 4);
 
-        self._closeButton = Gtk.Button(xstr("button_close"))
+        self._closeButton = gtk.Button(xstr("button_close"))
         self._closeButton.set_use_underline(True)
         self._closeButton.connect("clicked", self._closeClicked)
@@ -653,5 +656,5 @@
             typeFamilies.add(const.aircraftType2Family(aircraftType))
 
-        for (typeFamily, checkButton) in self._typeFamilyButtons.items():
+        for (typeFamily, checkButton) in self._typeFamilyButtons.iteritems():
             checkButton.set_sensitive(typeFamily in typeFamilies)
 
@@ -678,5 +681,5 @@
     def _flightDateClicked(self, button):
         """Called when the flight date button is clicked."""
-        self._calendarWindow.set_position(Gtk.WindowPosition.MOUSE)
+        self._calendarWindow.set_position(gtk.WIN_POS_MOUSE)
         self.set_focus(self._calendarWindow)
         self._calendarWindow.show_all()
@@ -702,5 +705,5 @@
         If the Escape key is pressed, 'delete-event' is emitted to close the
         window."""
-        if Gdk.keyval_name(event.keyval) == "Escape":
+        if gdk.keyval_name(event.keyval) == "Escape":
             self.emit("delete-event", None)
             return True
@@ -709,5 +712,5 @@
         """Update the timetable list."""
         aircraftTypes = []
-        for (aircraftFamily, button) in self._typeFamilyButtons.items():
+        for (aircraftFamily, button) in self._typeFamilyButtons.iteritems():
             if button.get_active():
                 aircraftTypes += const.aircraftFamily2Types[aircraftFamily]
@@ -749,5 +752,5 @@
         planes = [plane for plane in fleet
                   if plane.aircraftType == aircraftType]
-        planes.sort(key = lambda p: p.tailNumber)
+        planes.sort(cmp = lambda p1, p2: cmp(p1.tailNumber, p2.tailNumber))
 
         dialog = BookDialog(self, flightPair, planes)
@@ -755,5 +758,5 @@
         result = dialog.run()
         dialog.hide()
-        if result==Gtk.ResponseType.OK:
+        if result==RESPONSETYPE_OK:
             flightIDs = [flightPair.flight0.id]
             if flightPair.flight1 is not None:
@@ -771,15 +774,15 @@
         """Called when the booking has finished."""
         if returned:
-            dialog = Gtk.MessageDialog(parent = self,
-                                       type = Gtk.MessageType.INFO,
+            dialog = gtk.MessageDialog(parent = self,
+                                       type = MESSAGETYPE_INFO,
                                        message_format = xstr("bookflights_successful"))
             dialog.format_secondary_markup(xstr("bookflights_successful_secondary"))
         else:
-            dialog = Gtk.MessageDialog(parent = self,
-                                       type = Gtk.MessageType.ERROR,
+            dialog = gtk.MessageDialog(parent = self,
+                                       type = MESSAGETYPE_ERROR,
                                        message_format = xstr("bookflights_failed"))
             dialog.format_secondary_markup(xstr("bookflights_failed_secondary"))
 
-        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
+        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         dialog.set_title(WINDOW_TITLE_BASE)
 
@@ -789,7 +792,7 @@
     def _createTimetablePopupMenu(self):
         """Get the popuop menu for the timetable."""
-        menu = Gtk.Menu()
-
-        menuItem = Gtk.MenuItem()
+        menu = gtk.Menu()
+
+        menuItem = gtk.MenuItem()
         menuItem.set_label(xstr("timetable_popup_book"))
         menuItem.set_use_underline(True)
Index: src/mlx/gui/update.py
===================================================================
--- src/mlx/gui/update.py	(revision 996)
+++ src/mlx/gui/update.py	(revision 755)
@@ -46,5 +46,5 @@
             return
 
-        Updater._progressWindow = window = Gtk.Window()
+        Updater._progressWindow = window = gtk.Window()
         window.set_title(WINDOW_TITLE_BASE + " " + xstr("update_title"))
         window.set_transient_for(parentWindow)
@@ -55,44 +55,47 @@
         window.connect("delete-event", lambda a, b: True)
         window.set_deletable(False)
-        window.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
-
-        mainAlignment = Gtk.Alignment(xscale = 1.0)
+        window.set_position(gtk.WindowPosition.CENTER_ON_PARENT if pygobject
+                            else gtk.WIN_POS_CENTER_ON_PARENT)
+
+        mainAlignment = gtk.Alignment(xscale = 1.0)
         mainAlignment.set_padding(padding_top = 4, padding_bottom = 10,
                                   padding_left = 16, padding_right = 16)
         window.add(mainAlignment)
 
-        mainVBox = Gtk.VBox()
+        mainVBox = gtk.VBox()
         mainAlignment.add(mainVBox)
 
-        labelAlignment = Gtk.Alignment(xalign = 0.0, xscale = 0.0)
-        Updater._progressLabel = progressLabel = Gtk.Label()
+        labelAlignment = gtk.Alignment(xalign = 0.0, xscale = 0.0)
+        Updater._progressLabel = progressLabel = gtk.Label()
         labelAlignment.add(progressLabel)
         mainVBox.pack_start(labelAlignment, True, True, 4)
         
-        Updater._progressBar = progressBar = Gtk.ProgressBar()
+        Updater._progressBar = progressBar = gtk.ProgressBar()
         mainVBox.pack_start(progressBar, True, True, 4)
 
-        buttonAlignment = Gtk.Alignment(xalign = 0.5, xscale = 0.1)
-        Updater._progressOKButton = progressOKButton = Gtk.Button("OK")
+        buttonAlignment = gtk.Alignment(xalign = 0.5, xscale = 0.1)
+        Updater._progressOKButton = progressOKButton = gtk.Button("OK")
         buttonAlignment.add(progressOKButton)        
         mainVBox.pack_start(buttonAlignment, True, True, 4)
 
         Updater._sudoDialog = sudoDialog = \
-            Gtk.Dialog(WINDOW_TITLE_BASE + " " + xstr("update_title"),
+            gtk.Dialog(WINDOW_TITLE_BASE + " " + xstr("update_title"),
                        parentWindow,
-                       Gtk.DialogFlags.MODAL)
+                       gtk.DialogFlags.MODAL if pygobject else gtk.DIALOG_MODAL)
         sudoDialog.add_button(xstr("button_cancel"), 0)
         sudoDialog.add_button(xstr("button_ok"), 1)
                        
-        infoLabelAlignment = Gtk.Alignment(xalign = 0.5, xscale = 0.1)
+        infoLabelAlignment = gtk.Alignment(xalign = 0.5, xscale = 0.1)
         infoLabelAlignment.set_padding(padding_top = 4, padding_bottom = 10,
                                        padding_left = 16, padding_right = 16)
 
-        infoLabel = Gtk.Label(xstr("update_needsudo"))
-        infoLabel.set_justify(Gtk.Justification.CENTER)
+        infoLabel = gtk.Label(xstr("update_needsudo"))
+        infoLabel.set_justify(gtk.Justification.CENTER if pygobject
+                              else gtk.JUSTIFY_CENTER)
         infoLabelAlignment.add(infoLabel)
         sudoDialog.vbox.pack_start(infoLabelAlignment, True, True, 4)
 
-        sudoDialog.set_position(Gtk.WindowPosition.CENTER_ON_PARENT)
+        sudoDialog.set_position(gtk.WindowPosition.CENTER_ON_PARENT if pygobject
+                                else gtk.WIN_POS_CENTER_ON_PARENT)
 
     def __init__(self, gui, programDirectory, updateURL, parentWindow):
@@ -117,13 +120,13 @@
     def run(self):
         """Execute the thread's operation."""
-        GObject.idle_add(self._startUpdate)
+        gobject.idle_add(self._startUpdate)
         update(self._programDirectory, self._updateURL, self, fromGUI = True)
         if not self._waitAfterFinish:
-            GObject.idle_add(self._progressWindow.hide)
+            gobject.idle_add(self._progressWindow.hide)
             self._gui.updateDone()
 
     def downloadingManifest(self):
         """Called when the downloading of the manifest has started."""
-        GObject.idle_add(self._downloadingManifest)
+        gobject.idle_add(self._downloadingManifest)
 
     def _downloadingManifest(self):
@@ -134,5 +137,5 @@
     def downloadedManifest(self):
         """Called when the downloading of the manifest has finished."""
-        GObject.idle_add(self._downloadedManifest)
+        gobject.idle_add(self._downloadedManifest)
 
     def _downloadedManifest(self):
@@ -144,5 +147,5 @@
         """Called when the program is interested in whether we want to run a
         program with administrator rights to do the update."""
-        GObject.idle_add(self._needSudo)
+        gobject.idle_add(self._needSudo)
         with self._sudoCondition:
             while self._sudoReply is None:
@@ -184,5 +187,5 @@
         """Called when a certain number of bytes are downloaded."""
         self._downloaded = downloaded
-        GObject.idle_add(self._setDownloaded, downloaded)
+        gobject.idle_add(self._setDownloaded, downloaded)
 
     def _setDownloaded(self, downloaded):
@@ -194,5 +197,5 @@
     def startRenaming(self):
         """Called when the renaming of files has started."""
-        GObject.idle_add(self._startRenaming)
+        gobject.idle_add(self._startRenaming)
 
     def _startRenaming(self):
@@ -203,5 +206,5 @@
         """Called when a file has been renamed."""
         self._numModifiedOrNew = count
-        GObject.idle_add(self._renamed, path, count)
+        gobject.idle_add(self._renamed, path, count)
 
     def _renamed(self, path, count):
@@ -212,5 +215,5 @@
     def startRemoving(self):
         """Called when the removing of files has started."""
-        GObject.idle_add(self._startRemoving)
+        gobject.idle_add(self._startRemoving)
 
     def _startRemoving(self):
@@ -221,5 +224,5 @@
         """Called when a file has been removed."""
         self._numRemoved = count
-        GObject.idle_add(self._removed, path, count)
+        gobject.idle_add(self._removed, path, count)
 
     def _removed(self, path, count):
@@ -230,5 +233,5 @@
     def writingManifest(self):
         """Called when the writing of the new manifest file has started."""
-        GObject.idle_add(self._writingManifest)
+        gobject.idle_add(self._writingManifest)
 
     def _writingManifest(self):
@@ -238,5 +241,5 @@
     def done(self):
         """Called when the update has been done."""
-        GObject.idle_add(self._done)
+        gobject.idle_add(self._done)
         self._restart = self._waitAfterFinish
 
@@ -261,5 +264,5 @@
         """Called when the downloading has failed."""
         self._waitAfterFinish = True
-        GObject.idle_add(self._failed, what)
+        gobject.idle_add(self._failed, what)
 
     def _failed(self, what):
Index: src/mlx/gui/weighthelp.py
===================================================================
--- src/mlx/gui/weighthelp.py	(revision 996)
+++ src/mlx/gui/weighthelp.py	(revision 303)
@@ -15,5 +15,5 @@
 #-------------------------------------------------------------------------------
 
-class WeightHelp(Gtk.VBox):
+class WeightHelp(gtk.VBox):
     """The weight calculation help tab."""
     @staticmethod
@@ -40,5 +40,5 @@
         self._gui = gui
 
-        mainAlignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        mainAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                       xscale = 1.0, yscale = 1.0)
         mainAlignment.set_padding(padding_top = 4, padding_bottom = 4,
@@ -46,8 +46,8 @@
         self.add(mainAlignment)
 
-        self._mainBox = mainBox = Gtk.VBox()
+        self._mainBox = mainBox = gtk.VBox()
         mainAlignment.add(mainBox)
 
-        self._usingHelp = Gtk.CheckButton(xstr("weighthelp_usinghelp"))
+        self._usingHelp = gtk.CheckButton(xstr("weighthelp_usinghelp"))
         self._usingHelp.set_use_underline(True)
         self._usingHelp.set_tooltip_text(xstr("weighthelp_usinghelp_tooltip"))
@@ -56,250 +56,252 @@
 
         
-        self._weightsTable = table = Gtk.Table(16, 5)
+        self._weightsTable = table = gtk.Table(16, 5)
         table.set_homogeneous(False)
         table.set_row_spacings(4)
         table.set_col_spacings(16)
-        alignment = Gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(table)
         mainBox.pack_start(alignment, True, True, 4)
 
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
         alignment.set_padding(padding_bottom = 16, padding_top = 0,
                               padding_left = 0, padding_right = 0)
-        label = Gtk.Label(xstr("weighthelp_header_calculated"))
+        label = gtk.Label(xstr("weighthelp_header_calculated"))
         label.set_use_markup(True)
         # FIXME: should be a constant in common
-        label.set_justify(Gtk.Justification.CENTER)
+        label.set_justify(gtk.Justification.CENTER if pygobject
+                          else gtk.JUSTIFY_CENTER)        
         alignment.add(label)
         table.attach(alignment, 1, 2, 0, 1)
         
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.0,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.0,
                                   xscale = 0.0, yscale = 0.0)
         alignment.set_padding(padding_bottom = 16, padding_top = 0,
                               padding_left = 0, padding_right = 0)
-        button = Gtk.Button(xstr("weighthelp_header_simulator"))
+        button = gtk.Button(xstr("weighthelp_header_simulator"))
         button.set_tooltip_markup(xstr("weighthelp_header_simulator_tooltip"))
         button.connect("clicked", self._fsButtonClicked)
         label = button.get_child()
-        label.set_justify(Gtk.Justification.CENTER)
+        label.set_justify(gtk.Justification.CENTER if pygobject
+                          else gtk.JUSTIFY_CENTER)        
         alignment.add(button)
         table.attach(alignment, 3, 4, 0, 1)
         
 
-        self._crewLabel = Gtk.Label(xstr("weighthelp_crew") % ("99",))
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        self._crewLabel = gtk.Label(xstr("weighthelp_crew") % ("99",))
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._crewLabel)
         table.attach(alignment, 0, 1, 1, 2)
 
-        self._crewWeight = Gtk.Label("0")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._crewWeight = gtk.Label("0")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._crewWeight)
         table.attach(alignment, 1, 2, 1, 2)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 1, 2)
+        table.attach(gtk.Label("kg"), 2, 3, 1, 2)
 
         text = xstr("weighthelp_pax") % ("999",)
-        self._paxLabel = Gtk.Label(text)
+        self._paxLabel = gtk.Label(text)
         self._paxLabel.set_width_chars(len(text))
         self._paxLabel.set_alignment(0.0, 0.5)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._paxLabel)
         table.attach(alignment, 0, 1, 2, 3)
 
-        self._paxWeight = Gtk.Label("20000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._paxWeight = gtk.Label("20000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._paxWeight)
         table.attach(alignment, 1, 2, 2, 3)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 2, 3)
-        
-        label = Gtk.Label(xstr("weighthelp_baggage"))
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 2, 3)
+        
+        label = gtk.Label(xstr("weighthelp_baggage"))
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 3, 4)
 
-        self._bagWeight = Gtk.Label("2000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._bagWeight = gtk.Label("2000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._bagWeight)
         table.attach(alignment, 1, 2, 3, 4)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 3, 4)
-        
-        label = Gtk.Label(xstr("weighthelp_cargo"))
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 3, 4)
+        
+        label = gtk.Label(xstr("weighthelp_cargo"))
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 4, 5)
 
-        self._cargoWeight = Gtk.Label("2000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._cargoWeight = gtk.Label("2000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._cargoWeight)
         table.attach(alignment, 1, 2, 4, 5)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 4, 5)
-        
-        label = Gtk.Label(xstr("weighthelp_mail"))
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 4, 5)
+        
+        label = gtk.Label(xstr("weighthelp_mail"))
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 5, 6)
 
-        self._mailWeight = Gtk.Label("2000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._mailWeight = gtk.Label("2000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mailWeight)
         table.attach(alignment, 1, 2, 5, 6)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 5, 6)
-
-        table.attach(Gtk.HSeparator(), 1, 2, 6, 7)
-
-        label = Gtk.Label("<b>" + xstr("weighthelp_payload") + "</b>")
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 5, 6)
+
+        table.attach(gtk.HSeparator(), 1, 2, 6, 7)
+
+        label = gtk.Label("<b>" + xstr("weighthelp_payload") + "</b>")
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 7, 8)
 
-        self._payload = Gtk.Label("<b>32000</b>")
+        self._payload = gtk.Label("<b>32000</b>")
         self._payload.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._payload)
         table.attach(alignment, 1, 2, 7, 8)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 7, 8)
-
-        self._fsPayload = Gtk.Label("<b>32001</b>")
+        table.attach(gtk.Label("kg"), 2, 3, 7, 8)
+
+        self._fsPayload = gtk.Label("<b>32001</b>")
         self._fsPayload.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsPayload)
         table.attach(alignment, 3, 4, 7, 8)
         
-        table.attach(Gtk.Label("kg"), 4, 5, 7, 8)
-
-        label = Gtk.Label(xstr("weighthelp_dow"))
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 4, 5, 7, 8)
+
+        label = gtk.Label(xstr("weighthelp_dow"))
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 8, 9)
 
-        self._dow = Gtk.Label("35000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._dow = gtk.Label("35000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._dow)
         table.attach(alignment, 1, 2, 8, 9)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 8, 9)
-
-        self._fsDOW = Gtk.Label("33012")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 8, 9)
+
+        self._fsDOW = gtk.Label("33012")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsDOW)
         table.attach(alignment, 3, 4, 8, 9)
         
-        table.attach(Gtk.Label("kg"), 4, 5, 8, 9)
-
-        table.attach(Gtk.HSeparator(), 1, 2, 9, 10)
-
-        table.attach(Gtk.HSeparator(), 3, 4, 9, 10)
-
-        label = Gtk.Label("<b>" + xstr("weighthelp_zfw") + "</b>")
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 4, 5, 8, 9)
+
+        table.attach(gtk.HSeparator(), 1, 2, 9, 10)
+
+        table.attach(gtk.HSeparator(), 3, 4, 9, 10)
+
+        label = gtk.Label("<b>" + xstr("weighthelp_zfw") + "</b>")
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 10, 11)
 
-        self._zfw = Gtk.Label("<b>122000</b>")
+        self._zfw = gtk.Label("<b>122000</b>")
         self._zfw.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._zfw)
         table.attach(alignment, 1, 2, 10, 11)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 10, 11)
-
-        self._fsZFW = Gtk.Label("<b>124000</b>")
+        table.attach(gtk.Label("kg"), 2, 3, 10, 11)
+
+        self._fsZFW = gtk.Label("<b>124000</b>")
         self._fsZFW.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsZFW)
         table.attach(alignment, 3, 4, 10, 11)
         
-        table.attach(Gtk.Label("kg"), 4, 5, 10, 11)
-
-        table.attach(Gtk.HSeparator(), 0, 5, 11, 12)
-        
-        label = Gtk.Label(xstr("weighthelp_gross"))
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 4, 5, 10, 11)
+
+        table.attach(gtk.HSeparator(), 0, 5, 11, 12)
+        
+        label = gtk.Label(xstr("weighthelp_gross"))
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 12, 13)
 
-        self._fsGross = Gtk.Label("124000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._fsGross = gtk.Label("124000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._fsGross)
         table.attach(alignment, 3, 4, 12, 13)
         
-        table.attach(Gtk.Label("kg"), 4, 5, 12, 13)
-
-        label = Gtk.Label(xstr("weighthelp_mzfw"))
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 4, 5, 12, 13)
+
+        label = gtk.Label(xstr("weighthelp_mzfw"))
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 13, 14)
 
-        self._mzfw = Gtk.Label("35000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._mzfw = gtk.Label("35000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mzfw)
         table.attach(alignment, 1, 2, 13, 14)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 13, 14)
-
-        label = Gtk.Label(xstr("weighthelp_mtow"))
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 13, 14)
+
+        label = gtk.Label(xstr("weighthelp_mtow"))
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 14, 15)
 
-        self._mtow = Gtk.Label("35000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._mtow = gtk.Label("35000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mtow)
         table.attach(alignment, 1, 2, 14, 15)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 14, 15)
-
-        label = Gtk.Label(xstr("weighthelp_mlw"))
-        label.set_use_markup(True)
-        alignment = Gtk.Alignment(xalign = 0.0, yalign = 0.5,
+        table.attach(gtk.Label("kg"), 2, 3, 14, 15)
+
+        label = gtk.Label(xstr("weighthelp_mlw"))
+        label.set_use_markup(True)
+        alignment = gtk.Alignment(xalign = 0.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(label)
         table.attach(alignment, 0, 1, 15, 16)
 
-        self._mlw = Gtk.Label("35000")
-        alignment = Gtk.Alignment(xalign = 1.0, yalign = 0.5,
+        self._mlw = gtk.Label("35000")
+        alignment = gtk.Alignment(xalign = 1.0, yalign = 0.5,
                                   xscale = 0.0, yscale = 0.0)
         alignment.add(self._mlw)
         table.attach(alignment, 1, 2, 15, 16)
         
-        table.attach(Gtk.Label("kg"), 2, 3, 15, 16)
+        table.attach(gtk.Label("kg"), 2, 3, 15, 16)
 
         self.show_all()
@@ -466,5 +468,5 @@
     def _handleWeights(self, dow, payload, zfw, grossWeight):
         """Handle the given weights."""
-        GObject.idle_add(self._processWeights, dow, payload, zfw, grossWeight)
+        gobject.idle_add(self._processWeights, dow, payload, zfw, grossWeight)
 
     def _processWeights(self, dow, payload, zfw, grossWeight):
