Index: src/mlx/gui/pirep.py
===================================================================
--- src/mlx/gui/pirep.py	(revision 994)
+++ src/mlx/gui/pirep.py	(revision 996)
@@ -26,5 +26,5 @@
 #------------------------------------------------------------------------------
 
-class MessageFrame(gtk.Frame):
+class MessageFrame(Gtk.Frame):
     """A frame containing the information about a PIREP message.
 
@@ -33,9 +33,9 @@
     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)
@@ -49,5 +49,5 @@
                          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,5 +56,5 @@
         vbox.pack_start(headingAlignment, True, True, 4)
 
-        self._messageView = messageView = gtk.TextView()
+        self._messageView = messageView = Gtk.TextView()
         messageView.set_wrap_mode(WRAP_WORD)
         messageView.set_editable(False)
@@ -72,5 +72,5 @@
 
         styleContext = self.get_style_context()
-        color = styleContext.get_background_color(gtk.StateFlags.NORMAL)
+        color = styleContext.get_background_color(Gtk.StateFlags.NORMAL)
         heading.override_background_color(0, color)
 
@@ -78,5 +78,5 @@
 #-------------------------------------------------------------------------------
 
-class MessagesWidget(gtk.Frame):
+class MessagesWidget(Gtk.Frame):
     """The widget for the messages."""
     @staticmethod
@@ -86,5 +86,5 @@
 
     def __init__(self, gui):
-        gtk.Frame.__init__(self)
+        Gtk.Frame.__init__(self)
 
         self._gui = gui
@@ -93,16 +93,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 +111,9 @@
         innerBox.add(alignment)
 
-        scroller = gtk.ScrolledWindow()
+        scroller = Gtk.ScrolledWindow()
         scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
         scroller.set_shadow_type(SHADOW_NONE)
 
-        self._messages = gtk.VBox()
+        self._messages = Gtk.VBox()
         self._messages.set_homogeneous(False)
         scroller.add_with_viewport(self._messages)
@@ -129,5 +129,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 +154,5 @@
 #------------------------------------------------------------------------------
 
-class PIREPViewer(gtk.Dialog):
+class PIREPViewer(Gtk.Dialog):
     """The dialog for PIREP viewing."""
     @staticmethod
@@ -167,12 +167,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 +182,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 +190,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,9 +203,9 @@
         - the window,
         - the text view."""
-        scrolledWindow = gtk.ScrolledWindow()
+        scrolledWindow = Gtk.ScrolledWindow()
         scrolledWindow.set_shadow_type(SHADOW_IN)
         scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
 
-        textView = gtk.TextView()
+        textView = Gtk.TextView()
         textView.set_wrap_mode(WRAP_WORD)
         textView.set_editable(editable)
@@ -226,5 +226,5 @@
 
         Returns the data label attached."""
-        dataBox = gtk.HBox()
+        dataBox = Gtk.HBox()
         table.attach(dataBox, column, column+1, row, row+1)
 
@@ -251,5 +251,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)
@@ -259,5 +259,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)
@@ -284,9 +284,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"))
@@ -294,5 +294,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"))
@@ -300,5 +300,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"))
@@ -308,5 +308,5 @@
         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"))
@@ -417,13 +417,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)
 
@@ -453,5 +453,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_flight"))
 
-        dataBox = gtk.HBox()
+        dataBox = Gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -468,5 +468,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = gtk.HBox()
+        dataBox = Gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -478,5 +478,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)
@@ -503,5 +503,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)
@@ -549,5 +549,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_route"))
 
-        levelBox = gtk.HBox()
+        levelBox = Gtk.HBox()
         mainBox.pack_start(levelBox, False, False, 0)
 
@@ -581,5 +581,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = gtk.HBox()
+        dataBox = Gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -608,5 +608,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)
@@ -639,5 +639,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)
@@ -685,5 +685,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)
@@ -737,5 +737,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)
 
@@ -760,5 +760,5 @@
     def _buildLogTab(self):
         """Build the log tab."""
-        mainBox = gtk.VBox()
+        mainBox = Gtk.VBox()
 
         (logWindow, self._log) = PIREPViewer.getTextWindow(heightRequest = -1)
@@ -770,5 +770,5 @@
     def _buildMessagesTab(self):
         """Build the messages tab."""
-        mainBox = gtk.VBox()
+        mainBox = Gtk.VBox()
 
         self._messages = MessagesWidget(self._gui)
@@ -779,5 +779,5 @@
 #------------------------------------------------------------------------------
 
-class PIREPEditor(gtk.Dialog):
+class PIREPEditor(Gtk.Dialog):
     """A PIREP editor dialog."""
     _delayCodeRE = re.compile("([0-9]{2,3})( \([^\)]*\))")
@@ -789,7 +789,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)
@@ -807,5 +807,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)
@@ -847,9 +847,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"))
@@ -857,5 +857,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"))
@@ -863,5 +863,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"))
@@ -1014,13 +1014,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)
 
@@ -1050,5 +1050,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_flight"))
 
-        dataBox = gtk.HBox()
+        dataBox = Gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -1065,5 +1065,5 @@
         PIREPViewer.addVFiller(mainBox)
 
-        dataBox = gtk.HBox()
+        dataBox = Gtk.HBox()
         mainBox.pack_start(dataBox, False, False, 0)
 
@@ -1075,5 +1075,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)
@@ -1100,5 +1100,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)
@@ -1145,5 +1145,5 @@
         (frame, mainBox) = PIREPViewer.createFrame(xstr("pirepView_frame_route"))
 
-        levelBox = gtk.HBox()
+        levelBox = Gtk.HBox()
         mainBox.pack_start(levelBox, False, False, 0)
 
@@ -1152,5 +1152,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)
@@ -1167,5 +1167,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)
@@ -1201,13 +1201,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"))
@@ -1215,5 +1215,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)
@@ -1221,5 +1221,5 @@
         # FIXME: quite the same as the SID combo box in
         # the flight wizard
-        self._sid = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        self._sid = Gtk.ComboBox.new_with_model_and_entry(comboModel)
 
         self._sid.set_entry_text_column(0)
@@ -1247,5 +1247,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)
@@ -1253,5 +1253,5 @@
 
         # FIXME: quite the same as in the wizard
-        self._star = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        self._star = Gtk.ComboBox.new_with_model_and_entry(comboModel)
 
         self._star.set_entry_text_column(0)
@@ -1265,5 +1265,5 @@
 
         # FIXME: quite the same as in the wizard
-        self._transition = gtk.ComboBox.new_with_model_and_entry(comboModel)
+        self._transition = Gtk.ComboBox.new_with_model_and_entry(comboModel)
 
         self._transition.set_entry_text_column(0)
@@ -1278,5 +1278,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"))
@@ -1288,5 +1288,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"))
@@ -1303,5 +1303,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)
@@ -1355,5 +1355,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)
@@ -1403,5 +1403,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)
@@ -1425,5 +1425,5 @@
     def _buildLogTab(self):
         """Build the log tab."""
-        mainBox = gtk.VBox()
+        mainBox = Gtk.VBox()
 
         (logWindow, self._log) = PIREPViewer.getTextWindow(heightRequest = -1)
