Index: src/mlx/gui/timetable.py
===================================================================
--- src/mlx/gui/timetable.py	(revision 995)
+++ src/mlx/gui/timetable.py	(revision 996)
@@ -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,5 +74,5 @@
             columnDescriptor.appendType(types)
 
-        self._model = gtk.ListStore(*types)
+        self._model = Gtk.ListStore(*types)
         if defaultSortableIndex is not None:
             sortOrder = SORT_DESCENDING \
@@ -80,9 +80,9 @@
               else SORT_ASCENDING
             self._model.set_sort_column_id(defaultSortableIndex, sortOrder)
-        self._view = gtk.TreeView(self._model)
+        self._view = Gtk.TreeView(self._model)
 
         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 +102,12 @@
         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,
+                                  Gtk.PolicyType.AUTOMATIC)
+        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
 
         super(Timetable, self).__init__(xalign = 0.5, yalign = 0.0,
@@ -252,5 +252,5 @@
 #-----------------------------------------------------------------------------
 
-class CalendarWindow(gtk.Window):
+class CalendarWindow(Gtk.Window):
     """A window for a calendar."""
     def __init__(self):
@@ -262,10 +262,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)
@@ -305,5 +305,5 @@
 #-----------------------------------------------------------------------------
 
-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 +315,18 @@
         contentArea = self.get_content_area()
 
-        frame = gtk.Frame(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 +336,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 +342,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 +351,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 +359,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 +365,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 +384,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 +394,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 +400,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 +411,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 +417,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 +423,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)
@@ -465,5 +465,5 @@
     def _flightDateClicked(self, button):
         """Called when the flight date button is clicked."""
-        self._calendarWindow.set_position(gtk.WIN_POS_MOUSE)
+        self._calendarWindow.set_position(Gtk.WIN_POS_MOUSE)
         self.set_focus(self._calendarWindow)
         self._calendarWindow.show_all()
@@ -481,5 +481,5 @@
 #-----------------------------------------------------------------------------
 
-class TimetableWindow(gtk.Window):
+class TimetableWindow(Gtk.Window):
     """The window to display the timetable."""
     typeFamilies = [
@@ -506,28 +506,28 @@
         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 = Gtk.Frame()
         filterFrame.set_label(xstr("timetable_filter"))
 
-        filterVBox = gtk.VBox()
-
-        topAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
+        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 +536,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 +547,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 +558,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 +567,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 +573,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 +599,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 +610,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)
@@ -678,5 +678,5 @@
     def _flightDateClicked(self, button):
         """Called when the flight date button is clicked."""
-        self._calendarWindow.set_position(gtk.WIN_POS_MOUSE)
+        self._calendarWindow.set_position(Gtk.WIN_POS_MOUSE)
         self.set_focus(self._calendarWindow)
         self._calendarWindow.show_all()
@@ -771,10 +771,10 @@
         """Called when the booking has finished."""
         if returned:
-            dialog = gtk.MessageDialog(parent = self,
+            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,
+            dialog = Gtk.MessageDialog(parent = self,
                                        type = MESSAGETYPE_ERROR,
                                        message_format = xstr("bookflights_failed"))
@@ -789,7 +789,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)
