Index: src/mlx/gui/bugreport.py
===================================================================
--- src/mlx/gui/bugreport.py	(revision 996)
+++ src/mlx/gui/bugreport.py	(revision 999)
@@ -24,8 +24,8 @@
                                               xstr("bugreport_title"),
                                               gui.mainWindow,
-                                              DIALOG_MODAL)
+                                              Gtk.DialogFlags.MODAL)
 
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
-        self._sendButton = self.add_button(xstr("button_send"), RESPONSETYPE_ACCEPT)
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
+        self._sendButton = self.add_button(xstr("button_send"), Gtk.ResponseType.ACCEPT)
         self._sendButton.set_can_default(True)
         self._gui = gui
@@ -64,5 +64,5 @@
         self._description = description = Gtk.TextView()
         description.set_tooltip_text(xstr("bugreport_description_tooltip"))
-        description.set_wrap_mode(WRAP_WORD)
+        description.set_wrap_mode(Gtk.WrapMode.WORD)
         label.set_mnemonic_widget(description)
 
@@ -70,6 +70,7 @@
         scrolledWindow.add(description)
         scrolledWindow.set_size_request(-1, 200)
-        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scrolledWindow.set_shadow_type(SHADOW_IN)
+        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 = 1.0, yscale = 1.0)
@@ -105,6 +106,6 @@
         response = super(BugReportDialog, self).run()
 
-        print("response", response, RESPONSETYPE_ACCEPT)
-        if response==RESPONSETYPE_ACCEPT:
+        print("response", response, Gtk.ResponseType.ACCEPT)
+        if response==Gtk.ResponseType.ACCEPT:
             self._send()
         else:
Index: src/mlx/gui/callouts.py
===================================================================
--- src/mlx/gui/callouts.py	(revision 996)
+++ src/mlx/gui/callouts.py	(revision 999)
@@ -54,8 +54,8 @@
                                                      xstr("callouts_title"),
                                                      gui.mainWindow,
-                                                     DIALOG_MODAL)
-
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
-        self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
+                                                     Gtk.DialogFlags.MODAL)
+
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
+        self.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
 
         self._gui = gui
@@ -133,5 +133,5 @@
 
         self._fileListModel = Gtk.ListStore(int, str, str)
-        self._fileListModel.set_sort_column_id(0, SORT_DESCENDING)
+        self._fileListModel.set_sort_column_id(0, Gtk.SortType.DESCENDING)
 
         self._addingFile = False
@@ -156,5 +156,5 @@
         column.set_sort_indicator(True)
         column.set_sort_column_id(0)
-        column.set_sort_order(SORT_DESCENDING)
+        column.set_sort_order(Gtk.SortType.DESCENDING)
         column.set_expand(False)
 
@@ -173,5 +173,5 @@
                                self._fileListButtonPressed)
         selection = self._fileList.get_selection()
-        selection.set_mode(SELECTION_MULTIPLE)
+        selection.set_mode(Gtk.SelectionMode.MULTIPLE)
         selection.connect("changed", self._fileListSelectionChanged)
 
@@ -181,6 +181,7 @@
         scrolledWindow.add(self._fileList)
         scrolledWindow.set_size_request(300, -1)
-        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scrolledWindow.set_shadow_type(SHADOW_IN)
+        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, 
@@ -204,5 +205,5 @@
         self.hide()
 
-        if response==RESPONSETYPE_ACCEPT:
+        if response==Gtk.ResponseType.ACCEPT:
             self._saveApproachCallouts()
             config = self._gui.config
@@ -225,5 +226,5 @@
         dialog.hide()
 
-        if result==RESPONSETYPE_OK:
+        if result==Gtk.ResponseType.OK:
             filePath = dialog.get_filename()
             baseName = os.path.basename(filePath)
@@ -293,10 +294,10 @@
         if otherPath is not None:
             dialog = Gtk.MessageDialog(parent = self,
-                                       type = MESSAGETYPE_QUESTION,
+                                       type = Gtk.MessageType.QUESTION,
                                        message_format =
                                        xstr("callouts_altitude_clash"))
             dialog.format_secondary_markup(xstr("callouts_altitude_clash_sec"))
-            dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
-            dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
+            dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
+            dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
             dialog.set_title(WINDOW_TITLE_BASE)
 
@@ -304,5 +305,5 @@
             dialog.hide()
 
-            if result!=RESPONSETYPE_YES:
+            if result!=Gtk.ResponseType.YES:
                 newAltitude = None
                 
@@ -348,8 +349,8 @@
             dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                            xstr("callouts_open_title"),
-                                           action = FILE_CHOOSER_ACTION_OPEN,
+                                           action = Gtk.FileChooserAction.OPEN,
                                            buttons = (Gtk.STOCK_CANCEL,
-                                                      RESPONSETYPE_CANCEL,
-                                                      Gtk.STOCK_OK, RESPONSETYPE_OK),
+                                                      Gtk.ResponseType.CANCEL,
+                                                      Gtk.STOCK_OK, Gtk.ResponseType.OK),
                                            parent = self)
             dialog.set_modal(True)            
@@ -389,5 +390,5 @@
         if altitude is not None: return altitude
 
-        descending = self._fileList.get_column(0).get_sort_order()==SORT_DESCENDING
+        descending = self._fileList.get_column(0).get_sort_order()==Gtk.SortType.DESCENDING
         model = self._fileListModel
         numEntries = model.iter_n_children(None)
@@ -473,5 +474,5 @@
     def _fileListButtonPressed(self, widget, event):
         """Called when a mouse button is pressed on the file list."""
-        if event.type!=EVENT_BUTTON_PRESS or event.button!=3:
+        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3:
             return
 
Index: src/mlx/gui/checklist.py
===================================================================
--- src/mlx/gui/checklist.py	(revision 996)
+++ src/mlx/gui/checklist.py	(revision 999)
@@ -28,8 +28,8 @@
                                               xstr("chklst_title"),
                                               gui.mainWindow,
-                                              DIALOG_MODAL)
-
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
-        self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
+                                              Gtk.DialogFlags.MODAL)
+
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
+        self.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
 
         self._gui = gui
@@ -162,5 +162,5 @@
         self._fileListPopupMenu = None
         selection = self._fileList.get_selection()
-        selection.set_mode(SELECTION_MULTIPLE)
+        selection.set_mode(Gtk.SelectionMode.MULTIPLE)
         selection.connect("changed", self._fileListSelectionChanged)
 
@@ -170,6 +170,7 @@
         scrolledWindow.add(self._fileList)
         scrolledWindow.set_size_request(200, -1)
-        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scrolledWindow.set_shadow_type(SHADOW_IN)
+        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
+                                  Gtk.PolicyType.AUTOMATIC)
+        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
 
         fileBox.pack_start(scrolledWindow, False, False, 4)
@@ -187,5 +188,5 @@
         self.hide()
 
-        if response==RESPONSETYPE_ACCEPT:
+        if response==Gtk.ResponseType.ACCEPT:
             self._saveChecklist()
             config = self._gui.config
@@ -321,5 +322,5 @@
     def _fileListButtonPressed(self, widget, event):
         """Called when a mouse button is pressed on the file list."""
-        if event.type!=EVENT_BUTTON_PRESS or event.button!=3:
+        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3:
             return
 
Index: src/mlx/gui/common.py
===================================================================
--- src/mlx/gui/common.py	(revision 998)
+++ src/mlx/gui/common.py	(revision 999)
@@ -35,66 +35,4 @@
 from gi.repository import Pango
 
-
-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")
@@ -314,7 +252,7 @@
                                                 titleLabel,
                                                 gui.mainWindow,
-                                                DIALOG_MODAL)
-        self.add_button(cancelButtonLabel, RESPONSETYPE_CANCEL)
-        self.add_button(okButtonLabel, RESPONSETYPE_OK)
+                                                Gtk.DialogFlags.MODAL)
+        self.add_button(cancelButtonLabel, Gtk.ResponseType.CANCEL)
+        self.add_button(okButtonLabel, Gtk.ResponseType.OK)
 
         contentArea = self.get_content_area()
@@ -488,5 +426,5 @@
 def addFaultTag(buffer):
     """Add a tag named 'fault' to the given buffer."""
-    buffer.create_tag("fault", foreground="red", weight=WEIGHT_BOLD)
+    buffer.create_tag("fault", foreground="red", weight=Pango.Weight.BOLD)
 
 #------------------------------------------------------------------------------
@@ -523,9 +461,9 @@
     Return a boolean indicating the answer."""
     dialog = Gtk.MessageDialog(parent = parent,
-                               type = MESSAGETYPE_QUESTION,
+                               type = Gtk.MessageType.QUESTION,
                                message_format = question)
 
-    dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
-    dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
+    dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
+    dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
 
     dialog.set_title(title)
@@ -533,5 +471,5 @@
     dialog.hide()
 
-    return result==RESPONSETYPE_YES
+    return result==Gtk.ResponseType.YES
 
 #------------------------------------------------------------------------------
@@ -541,7 +479,7 @@
     """Display an error dialog box with the given message."""
     dialog = Gtk.MessageDialog(parent = parent,
-                               type = MESSAGETYPE_ERROR,
+                               type = Gtk.MessageType.ERROR,
                                message_format = message)
-    dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+    dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
     dialog.set_title(title)
     if secondary is not None:
Index: src/mlx/gui/delaycodes.py
===================================================================
--- src/mlx/gui/delaycodes.py	(revision 996)
+++ src/mlx/gui/delaycodes.py	(revision 999)
@@ -198,5 +198,5 @@
         self._viewport = self._createViewport()
         self._viewport.add(self._eventBox)
-        self._viewport.set_shadow_type(SHADOW_NONE)
+        self._viewport.set_shadow_type(Gtk.ShadowType.NONE)
 
         self.pack_start(self._viewport, True, True, 0)
@@ -255,10 +255,10 @@
 
         column = Gtk.TreeViewColumn("", Gtk.CellRendererText())
-        column.set_sizing(TREE_VIEW_COLUMN_FIXED)
+        column.set_sizing(Gtk.TreeViewColumnSizing.FIXED)
         self._treeView.append_column(column)
 
         for header in headers:
             column = Gtk.TreeViewColumn(header, Gtk.CellRendererText())
-            column.set_sizing(TREE_VIEW_COLUMN_FIXED)
+            column.set_sizing(Gtk.TreeViewColumnSizing.FIXED)
             self._treeView.append_column(column)
 
@@ -283,5 +283,5 @@
                 alignment.add(label)
                 self._table.attach(alignment, 1, numColumns, i, i+1,
-                                   yoptions = FILL)
+                                   yoptions = Gtk.AttachOptions.FILL)
                 self._table.set_row_spacing(i, 8)
             elif type==DELAYCODE:
@@ -292,5 +292,6 @@
                 alignment.add(checkButton)
                 self._table.attach(alignment, 0, 1, i, i+1,
-                                   xoptions = FILL, yoptions = FILL)
+                                   xoptions = Gtk.AttachOptions.FILL,
+                                   yoptions = Gtk.AttachOptions.FILL)
                 if firstDelayCodeRow:
                     self._alignments.append(alignment)
@@ -302,8 +303,9 @@
                                           xscale = 1.0)
                     alignment.add(label)
-                    xoptions = FILL
-                    if j==(numColumns-2): xoptions |= EXPAND
+                    xoptions = Gtk.AttachOptions.FILL
+                    if j==(numColumns-2): xoptions |= Gtk.AttachOptions.EXPAND
                     self._table.attach(alignment, j+1, j+2, i, i+1,
-                                       xoptions = xoptions, yoptions = FILL)
+                                       xoptions = xoptions,
+                                       yoptions = Gtk.AttachOptions.FILL)
                     if firstDelayCodeRow:
                         self._alignments.append(alignment)
Index: src/mlx/gui/faultexplain.py
===================================================================
--- src/mlx/gui/faultexplain.py	(revision 997)
+++ src/mlx/gui/faultexplain.py	(revision 999)
@@ -34,5 +34,5 @@
         self._fault = fault = Gtk.Label()
         fault.set_xalign(0.0)
-        fault.set_justify(JUSTIFY_LEFT)
+        fault.set_justify(Gtk.Justification.LEFT)
         fault.set_line_wrap(True)
 
@@ -47,5 +47,5 @@
 
         self._explanation = explanation = Gtk.TextView()
-        explanation.set_wrap_mode(WRAP_WORD)
+        explanation.set_wrap_mode(Gtk.WrapMode.WORD)
         explanation.set_accepts_tab(False)
         explanation.set_size_request(-1, 100)
@@ -153,6 +153,6 @@
 
         scroller = Gtk.ScrolledWindow()
-        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scroller.set_shadow_type(SHADOW_NONE)
+        scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
+        scroller.set_shadow_type(Gtk.ShadowType.NONE)
 
         self._faults = Gtk.VBox()
Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 998)
+++ src/mlx/gui/flight.py	(revision 999)
@@ -641,5 +641,5 @@
         dialog.hide()
 
-        if response==RESPONSETYPE_OK:
+        if response==Gtk.ResponseType.OK:
             fileName = dialog.get_filename()
             print("Saving", fileName)
@@ -650,8 +650,8 @@
                 print("Failed to save flight:", util.utf2unicode(str(e)))
                 dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                           type = MESSAGETYPE_ERROR,
+                                           type = Gtk.MessageType.ERROR,
                                            message_format =
                                            xstr("flightsel_save_failed"))
-                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 secondary = xstr("flightsel_save_failed_sec")
@@ -716,5 +716,5 @@
         font = Pango.FontDescription("sans")
         font.set_size(int(32 * scale * Pango.SCALE))
-        font.set_weight(Pango.WEIGHT_NORMAL)
+        font.set_weight(Pango.Weight.NORMAL)
         layout.set_font_description(font)
 
@@ -932,5 +932,5 @@
         dialog.hide()
 
-        if response==RESPONSETYPE_OK:
+        if response==Gtk.ResponseType.OK:
             fileName = dialog.get_filename()
             print("Loading", fileName)
@@ -943,8 +943,8 @@
                 print("Failed to load flight:", util.utf2unicode(str(e)))
                 dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                           type = MESSAGETYPE_ERROR,
+                                           type = Gtk.MessageType.ERROR,
                                            message_format =
                                            xstr("flightsel_load_failed"))
-                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 secondary = xstr("flightsel_load_failed_sec")
@@ -1026,8 +1026,8 @@
         dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                        xstr("flightsel_save_title"),
-                                       action = FILE_CHOOSER_ACTION_SAVE,
+                                       action = Gtk.FileChooserAction.SAVE,
                                        buttons = (Gtk.STOCK_CANCEL,
-                                                  RESPONSETYPE_CANCEL,
-                                                  Gtk.STOCK_OK, RESPONSETYPE_OK),
+                                                  Gtk.ResponseType.CANCEL,
+                                                  Gtk.STOCK_OK, Gtk.ResponseType.OK),
                                        parent = gui.mainWindow)
         dialog.set_modal(True)
@@ -1056,8 +1056,8 @@
         dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                        xstr("flightsel_load_title"),
-                                       action = FILE_CHOOSER_ACTION_OPEN,
+                                       action = Gtk.FileChooserAction.OPEN,
                                        buttons = (Gtk.STOCK_CANCEL,
-                                                  RESPONSETYPE_CANCEL,
-                                                  Gtk.STOCK_OK, RESPONSETYPE_OK),
+                                                  Gtk.ResponseType.CANCEL,
+                                                  Gtk.STOCK_OK, Gtk.ResponseType.OK),
                                        parent = gui.mainWindow)
         dialog.set_modal(True)
@@ -1228,7 +1228,7 @@
         else:
             dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = xstr("gatesel_conflict"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.format_secondary_markup(xstr("gatesel_conflict_sec"))
@@ -1660,5 +1660,5 @@
             else:
                 secondaryMessage = xstr("register_nologin") % (result.pilotID,)
-            messageType = MESSAGETYPE_INFO
+            messageType = Gtk.MessageType.INFO
 
             config = gui.config
@@ -1673,11 +1673,11 @@
         elif returned and result.emailAlreadyRegistered:
             secondaryMessage = xstr("register_email_already")
-            messageType = MESSAGETYPE_ERROR
+            messageType = Gtk.MessageType.ERROR
         elif returned and result.invalidData:
             secondaryMessage = xstr("register_invalid_data")
-            messageType = MESSAGETYPE_ERROR
+            messageType = Gtk.MessageType.ERROR
         else:
             secondaryMessage = xstr("register_error")
-            messageType = MESSAGETYPE_ERROR
+            messageType = Gtk.MessageType.ERROR
 
         dialog = Gtk.MessageDialog(parent = gui.mainWindow,
@@ -1733,5 +1733,6 @@
         labelAlignment.add(label)
         labelAlignment.resize_children()
-        table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = FILL)
+        table.attach(labelAlignment, 0, 1, row, row + 1,
+                     xoptions = Gtk.AttachOptions.FILL)
 
         alignment = Gtk.Alignment(xalign=0.0, yalign = 0.5,
@@ -1753,5 +1754,6 @@
 
         buttonAlignment.add(button)
-        table.attach(buttonAlignment, 0, 4, row, row + 1, xoptions = FILL,
+        table.attach(buttonAlignment, 0, 4, row, row + 1,
+                     xoptions = Gtk.AttachOptions.FILL,
                      ypadding = 4)
 
@@ -1762,5 +1764,6 @@
         label = Gtk.Label(xstr("student_check_flight_status"))
         labelAlignment.add(label)
-        table.attach(labelAlignment, 0, 1, row, row + 1, xoptions = FILL)
+        table.attach(labelAlignment, 0, 1, row, row + 1,
+                     xoptions = Gtk.AttachOptions.FILL)
 
         alignment = Gtk.Alignment(xalign=0.0, yalign = 0.5,
@@ -1807,5 +1810,6 @@
 
         alignment.add(hbox)
-        table.attach(alignment, 0, 4, row, row + 1, xoptions = FILL)
+        table.attach(alignment, 0, 4, row, row + 1,
+                     xoptions = Gtk.AttachOptions.FILL)
 
     @property
@@ -1895,8 +1899,8 @@
 
         dialog = Gtk.MessageDialog(parent = gui.mainWindow,
-                                   type = MESSAGETYPE_INFO,
+                                   type = Gtk.MessageType.INFO,
                                    message_format = xstr("student_fo"))
 
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         secondary = xstr("student_fo_secondary")
@@ -2501,5 +2505,5 @@
         self._route = Gtk.TextView()
         self._route.set_tooltip_text(xstr("route_route_tooltip"))
-        self._route.set_wrap_mode(WRAP_WORD)
+        self._route.set_wrap_mode(Gtk.WrapMode.WORD)
         self._route.get_buffer().connect("changed", self._routeChanged)
         self._route.get_buffer().connect_after("insert-text", self._routeInserted)
@@ -2626,7 +2630,7 @@
                                                         xstr("simbrief_credentials_title"),
                                                         gui.mainWindow,
-                                                        DIALOG_MODAL)
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
-        self.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+                                                        Gtk.DialogFlags.MODAL)
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.CANCEL)
+        self.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
 
         contentArea = self.get_content_area()
@@ -3016,5 +3020,5 @@
             response = dialog.run()
 
-            if response==RESPONSETYPE_OK:
+            if response==Gtk.ResponseType.OK:
                 userName = dialog.userName
                 self._userName.set_text(userName)
@@ -3054,10 +3058,10 @@
                                                                "simbrief_result_unknown")
                 dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
-                                           type = MESSAGETYPE_ERROR,
+                                           type = Gtk.MessageType.ERROR,
                                            message_format =
                                            xstr(message) + "\n"+
                                            xstr("simbrief_cancelled"))
 
-                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 secondary = xstr("flightsel_save_failed_sec")
@@ -3239,5 +3243,5 @@
         label.set_use_markup(True)
         label.set_use_underline(True)
-        label.set_justify(JUSTIFY_CENTER)
+        label.set_justify(Gtk.Justification.CENTER)
         label.set_alignment(0.5, 1.0)
 
@@ -3379,5 +3383,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==BUTTON1_MASK:
+        if self._enabled and event.state==Gdk.ModifierType.BUTTON1_MASK:
             self._setExpectedFromY(event.y)
 
@@ -3385,11 +3389,11 @@
         """Called when a scroll event is received."""
         if self._enabled:
-            increment = 1 if event.state==CONTROL_MASK \
-                        else 100 if event.state==SHIFT_MASK \
+            increment = 1 if event.state==Gdk.ModifierType.CONTROL_MASK \
+                        else 100 if event.state==Gdk.ModifierType.SHIFT_MASK \
                         else 10 if event.state==0 else 0
             if increment!=0:
-                if event.direction==SCROLL_DOWN:
+                if event.direction==Gdk.ScrollDirection.DOWN:
                     increment *= -1
-                self._expectedButton.spin(SPIN_USER_DEFINED, increment)
+                self._expectedButton.spin(Gtk.SpinType.USER_DEFINED, increment)
 
     def _expectedChanged(self, spinButton):
@@ -4749,5 +4753,5 @@
         dialog.hide()
 
-        if result==RESPONSETYPE_OK:
+        if result==Gtk.ResponseType.OK:
             self._lastSavePath = dialog.get_filename()
             self._savePIREP(page)
@@ -4768,9 +4772,9 @@
 
         if error:
-            type = MESSAGETYPE_ERROR
+            type = Gtk.MessageType.ERROR
             message = xstr("finish_save_failed")
             secondary = xstr("finish_save_failed_sec") % (error,)
         else:
-            type = MESSAGETYPE_INFO
+            type = Gtk.MessageType.INFO
             message = xstr("finish_save_done")
             if automatic:
@@ -4782,5 +4786,5 @@
         dialog = Gtk.MessageDialog(parent = gui.mainWindow,
                                    type = type, message_format = message)
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         if secondary is not None:
@@ -4798,8 +4802,8 @@
             dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                            xstr("finish_save_title"),
-                                           action = FILE_CHOOSER_ACTION_SAVE,
+                                           action = Gtk.FileChooserAction.SAVE,
                                            buttons = (Gtk.STOCK_CANCEL,
-                                                      RESPONSETYPE_CANCEL,
-                                                      Gtk.STOCK_OK, RESPONSETYPE_OK),
+                                                      Gtk.ResponseType.CANCEL,
+                                                      Gtk.STOCK_OK, Gtk.ResponseType.OK),
                                            parent = gui.mainWindow)
             dialog.set_modal(True)
@@ -5144,14 +5148,14 @@
         if not self._pirepSent and not self._pirepSaved:
             dialog = Gtk.MessageDialog(parent = gui.mainWindow,
-                                       type = MESSAGETYPE_QUESTION,
+                                       type = Gtk.MessageType.QUESTION,
                                        message_format = xstr("finish_newFlight_question"))
 
-            dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
-            dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
+            dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
+            dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
 
             dialog.set_title(WINDOW_TITLE_BASE)
             result = dialog.run()
             dialog.hide()
-            if result!=RESPONSETYPE_YES:
+            if result!=Gtk.ResponseType.YES:
                 return
 
@@ -5350,5 +5354,5 @@
         else:
             dialog = Gtk.MessageDialog(parent = gui.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format =
                                        xstr("chkfinish_passedset_failed"))
@@ -5882,7 +5886,7 @@
                                    xstr("login_invalid"))
                 dialog = Gtk.MessageDialog(parent = self.gui.mainWindow,
-                                           type = MESSAGETYPE_ERROR,
+                                           type = Gtk.MessageType.ERROR,
                                            message_format = message)
-                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 if isReload:
@@ -5899,7 +5903,7 @@
                       else xstr("login_failconn")
             dialog = Gtk.MessageDialog(parent = self.gui.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = message)
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             secondary = xstr("reload_failconn_sec") if isReload \
Index: src/mlx/gui/flightlist.py
===================================================================
--- src/mlx/gui/flightlist.py	(revision 997)
+++ src/mlx/gui/flightlist.py	(revision 999)
@@ -116,7 +116,7 @@
         self._model = Gtk.ListStore(*types)
         if defaultSortableIndex is not None:
-            sortOrder = SORT_DESCENDING \
+            sortOrder = Gtk.SortType.DESCENDING \
               if self._columnDescriptors[defaultSortableIndex-1]._defaultDescending \
-              else SORT_ASCENDING
+              else Gtk.SortType.ASCENDING
             self._model.set_sort_column_id(defaultSortableIndex, sortOrder)
         self._view = Gtk.TreeView(self._model)
@@ -138,5 +138,5 @@
         selection.connect("changed", self._selectionChanged)
         if multiSelection:
-            selection.set_mode(SELECTION_MULTIPLE)
+            selection.set_mode(Gtk.SelectionMode.MULTIPLE)
 
         scrolledWindow = Gtk.ScrolledWindow()
@@ -206,5 +206,5 @@
     def _buttonPressEvent(self, widget, event):
         """Called when a mouse button is pressed or released."""
-        if event.type!=EVENT_BUTTON_PRESS or event.button!=3 or \
+        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3 or \
            self._popupMenuProducer is None:
             return
Index: src/mlx/gui/gui.py
===================================================================
--- src/mlx/gui/gui.py	(revision 997)
+++ src/mlx/gui/gui.py	(revision 999)
@@ -502,5 +502,5 @@
 
         dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                   type = MESSAGETYPE_ERROR,
+                                   type = Gtk.MessageType.ERROR,
                                    message_format = xstr("conn_failed"))
 
@@ -533,5 +533,5 @@
         self._statusbar.updateConnection(self._connecting, self._connected)
 
-        dialog = Gtk.MessageDialog(type = MESSAGETYPE_ERROR,
+        dialog = Gtk.MessageDialog(type = Gtk.MessageType.ERROR,
                                    message_format = xstr("conn_broken"),
                                    parent = self._mainWindow)
@@ -592,9 +592,9 @@
         """Cancel the current file, if the user confirms it."""
         dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                   type = MESSAGETYPE_QUESTION,
+                                   type = Gtk.MessageType.QUESTION,
                                    message_format = xstr("cancelFlight_question"))
 
-        dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
-        dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
+        dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
+        dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
 
         dialog.set_title(WINDOW_TITLE_BASE)
@@ -602,5 +602,5 @@
         dialog.hide()
 
-        if result==RESPONSETYPE_YES:
+        if result==Gtk.ResponseType.YES:
             self.reset()
 
@@ -741,12 +741,12 @@
         iconified = Gdk.WindowState.ICONIFIED
 
-        if (event.changed_mask&WINDOW_STATE_WITHDRAWN)!=0:
-            if (event.new_window_state&WINDOW_STATE_WITHDRAWN)!=0:
+        if (event.changed_mask&Gdk.WindowState.WITHDRAWN)!=0:
+            if (event.new_window_state&Gdk.WindowState.WITHDRAWN)!=0:
                 self._statusIcon.mainWindowHidden()
             else:
                 self._statusIcon.mainWindowShown()
 
-        if (event.changed_mask&WINDOW_STATE_ICONIFIED)!=0 and \
-           (event.new_window_state&WINDOW_STATE_ICONIFIED)==0:
+        if (event.changed_mask&Gdk.WindowState.ICONIFIED)!=0 and \
+           (event.new_window_state&Gdk.WindowState.ICONIFIED)==0:
             self._mainWindow.present()
 
@@ -931,7 +931,7 @@
 
             dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = xstr("fleet_failed"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -976,7 +976,7 @@
         else:
             dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = xstr("fleet_update_failed"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -1077,5 +1077,6 @@
         loadPIREPMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_file_loadPIREP_key")),
-                                          CONTROL_MASK, ACCEL_VISIBLE)
+                                          Gdk.ModifierType.CONTROL_MASK,
+                                          Gtk.AccelFlags.VISIBLE)
         loadPIREPMenuItem.connect("activate", self._loadPIREP)
         fileMenu.append(loadPIREPMenuItem)
@@ -1088,5 +1089,6 @@
         quitMenuItem.add_accelerator("activate", accelGroup,
                                      ord(xstr("menu_file_quit_key")),
-                                     CONTROL_MASK, ACCEL_VISIBLE)
+                                     Gdk.ModifierType.CONTROL_MASK,
+                                     Gtk.AccelFlags.VISIBLE)
         quitMenuItem.connect("activate", self._quit)
         fileMenu.append(quitMenuItem)
@@ -1103,5 +1105,6 @@
         timetableMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_tools_timetable_key")),
-                                          CONTROL_MASK, ACCEL_VISIBLE)
+                                          Gdk.ModifierType.CONTROL_MASK,
+                                          Gtk.AccelFlags.VISIBLE)
         timetableMenuItem.connect("activate", self.showTimetable)
         self._timetableMenuItem.set_sensitive(False)
@@ -1114,5 +1117,6 @@
         flightsMenuItem.add_accelerator("activate", accelGroup,
                                         ord(xstr("menu_tools_flights_key")),
-                                        CONTROL_MASK, ACCEL_VISIBLE)
+                                        Gdk.ModifierType.CONTROL_MASK,
+                                        Gtk.AccelFlags.VISIBLE)
         flightsMenuItem.connect("activate", self.showFlights)
         self._flightsMenuItem.set_sensitive(False)
@@ -1124,5 +1128,6 @@
         checklistMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_tools_chklst_key")),
-                                          CONTROL_MASK, ACCEL_VISIBLE)
+                                          Gdk.ModifierType.CONTROL_MASK,
+                                          Gtk.AccelFlags.VISIBLE)
         checklistMenuItem.connect("activate", self._editChecklist)
         toolsMenu.append(checklistMenuItem)
@@ -1133,5 +1138,6 @@
         approachCalloutsMenuItem.add_accelerator("activate", accelGroup,
                                                  ord(xstr("menu_tools_callouts_key")),
-                                                 CONTROL_MASK, ACCEL_VISIBLE)
+                                                 Gdk.ModifierType.CONTROL_MASK,
+                                                 Gtk.AccelFlags.VISIBLE)
         approachCalloutsMenuItem.connect("activate", self._editApproachCallouts)
         toolsMenu.append(approachCalloutsMenuItem)
@@ -1142,5 +1148,6 @@
         prefsMenuItem.add_accelerator("activate", accelGroup,
                                       ord(xstr("menu_tools_prefs_key")),
-                                      CONTROL_MASK, ACCEL_VISIBLE)
+                                      Gdk.ModifierType.CONTROL_MASK,
+                                      Gtk.AccelFlags.VISIBLE)
         prefsMenuItem.connect("activate", self._editPreferences)
         toolsMenu.append(prefsMenuItem)
@@ -1153,5 +1160,6 @@
         bugReportMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_tools_bugreport_key")),
-                                          CONTROL_MASK, ACCEL_VISIBLE)
+                                          Gdk.ModifierType.CONTROL_MASK,
+                                          Gtk.AccelFlags.VISIBLE)
         bugReportMenuItem.connect("activate", self._reportBug)
         toolsMenu.append(bugReportMenuItem)
@@ -1168,5 +1176,6 @@
         self._showMonitorMenuItem.add_accelerator("activate", accelGroup,
                                                   ord(xstr("menu_view_monitor_key")),
-                                                  CONTROL_MASK, ACCEL_VISIBLE)
+                                                  Gdk.ModifierType.CONTROL_MASK,
+                                                  Gtk.AccelFlags.VISIBLE)
         self._showMonitorMenuItem.connect("toggled", self._toggleMonitorWindow)
         viewMenu.append(self._showMonitorMenuItem)
@@ -1178,5 +1187,6 @@
         showDebugMenuItem.add_accelerator("activate", accelGroup,
                                           ord(xstr("menu_view_debug_key")),
-                                          CONTROL_MASK, ACCEL_VISIBLE)
+                                          Gdk.ModifierType.CONTROL_MASK,
+                                          Gtk.AccelFlags.VISIBLE)
         showDebugMenuItem.connect("toggled", self._toggleDebugLog)
         viewMenu.append(showDebugMenuItem)
@@ -1192,5 +1202,6 @@
         manualMenuItem.add_accelerator("activate", accelGroup,
                                        ord(xstr("menu_help_manual_key")),
-                                       CONTROL_MASK, ACCEL_VISIBLE)
+                                       Gdk.ModifierType.CONTROL_MASK,
+                                       Gtk.AccelFlags.VISIBLE)
         manualMenuItem.connect("activate", self._showManual)
         helpMenu.append(manualMenuItem)
@@ -1203,5 +1214,6 @@
         aboutMenuItem.add_accelerator("activate", accelGroup,
                                       ord(xstr("menu_help_about_key")),
-                                      CONTROL_MASK, ACCEL_VISIBLE)
+                                      Gdk.ModifierType.CONTROL_MASK,
+                                      Gtk.AccelFlags.VISIBLE)
         aboutMenuItem.connect("activate", self._showAbout)
         helpMenu.append(aboutMenuItem)
@@ -1254,12 +1266,12 @@
         """Quit from the application."""
         if force:
-            result=RESPONSETYPE_YES
+            result=Gtk.ResponseType.YES
         else:
             dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                       type = MESSAGETYPE_QUESTION,
+                                       type = Gtk.MessageType.QUESTION,
                                        message_format = xstr("quit_question"))
 
-            dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
-            dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
+            dialog.add_button(xstr("button_no"), Gtk.ResponseType.NO)
+            dialog.add_button(xstr("button_yes"), Gtk.ResponseType.YES)
 
             dialog.set_title(WINDOW_TITLE_BASE)
@@ -1267,5 +1279,5 @@
             dialog.hide()
 
-        if result==RESPONSETYPE_YES:
+        if result==Gtk.ResponseType.YES:
             self._statusIcon.destroy()
             return Gtk.main_quit()
@@ -1324,7 +1336,7 @@
         else:
             dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = xstr("timetable_failed"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -1354,7 +1366,7 @@
         else:
             dialog = Gtk.MessageDialog(parent = self.mainWindow,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = xstr("acceptedflt_failed"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             dialog.run()
@@ -1419,5 +1431,5 @@
         self._pirepEditor.setPIREP(pirep)
         self._pirepEditor.show_all()
-        if self._pirepEditor.run()==RESPONSETYPE_OK:
+        if self._pirepEditor.run()==Gtk.ResponseType.OK:
             self.beginBusy(xstr("pirepEdit_save_busy"))
             self.webHandler.sendPIREP(self._pirepUpdatedCallback, pirep,
@@ -1434,5 +1446,5 @@
         self.endBusy()
         secondaryMarkup = None
-        type = MESSAGETYPE_ERROR
+        type = Gtk.MessageType.ERROR
         if returned:
             if result.success:
@@ -1454,5 +1466,5 @@
             dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
                                        type = type, message_format = messageFormat)
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(WINDOW_TITLE_BASE)
             if secondaryMarkup is not None:
@@ -1478,5 +1490,5 @@
         dialog.hide()
 
-        if result==RESPONSETYPE_OK:
+        if result==Gtk.ResponseType.OK:
             self._lastLoadedPIREP = dialog.get_filename()
 
@@ -1484,7 +1496,7 @@
             if pirep is None:
                 dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                           type = MESSAGETYPE_ERROR,
+                                           type = Gtk.MessageType.ERROR,
                                            message_format = xstr("loadPIREP_failed"))
-                dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+                dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
                 dialog.set_title(WINDOW_TITLE_BASE)
                 dialog.format_secondary_markup(xstr("loadPIREP_failed_sec"))
@@ -1497,5 +1509,5 @@
                     result = dialog.run()
 
-                    if result==RESPONSETYPE_OK:
+                    if result==Gtk.ResponseType.OK:
                         self.sendPIREP(pirep)
                     elif result==1:
@@ -1513,8 +1525,8 @@
             dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                            xstr("loadPIREP_browser_title"),
-                                           action = FILE_CHOOSER_ACTION_OPEN,
+                                           action = Gtk.FileChooserAction.OPEN,
                                            buttons = (Gtk.STOCK_CANCEL,
-                                                      RESPONSETYPE_CANCEL,
-                                                      Gtk.STOCK_OK, RESPONSETYPE_OK),
+                                                      Gtk.ResponseType.CANCEL,
+                                                      Gtk.STOCK_OK, Gtk.ResponseType.OK),
                                            parent = self._mainWindow)
             dialog.set_modal(True)
@@ -1541,5 +1553,5 @@
                             xstr("loadPIREP_send_title"),
                             parent = self._mainWindow,
-                            flags = DIALOG_MODAL)
+                            flags = Gtk.DialogFlags.MODAL)
 
         contentArea = dialog.get_content_area()
@@ -1636,7 +1648,7 @@
         table.attach(labelAlignment, 1, 2, 4, 5)
 
-        dialog.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
+        dialog.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
         dialog.add_button(xstr("viewPIREP"), 1)
-        dialog.add_button(xstr("sendPIREP"), RESPONSETYPE_OK)
+        dialog.add_button(xstr("sendPIREP"), Gtk.ResponseType.OK)
 
         return dialog
@@ -1656,8 +1668,8 @@
         self.endBusy()
         secondaryMarkup = None
-        type = MESSAGETYPE_ERROR
+        type = Gtk.MessageType.ERROR
         if returned:
             if result.success:
-                type = MESSAGETYPE_INFO
+                type = Gtk.MessageType.INFO
                 messageFormat = xstr("sendPIREP_success")
                 secondaryMarkup = xstr("sendPIREP_success_sec")
@@ -1677,5 +1689,5 @@
         dialog = Gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
                                    type = type, message_format = messageFormat)
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         if secondaryMarkup is not None:
@@ -1723,8 +1735,8 @@
         self.endBusy()
         secondaryMarkup = None
-        type = MESSAGETYPE_ERROR
+        type = Gtk.MessageType.ERROR
         if returned:
             if result.success:
-                type = MESSAGETYPE_INFO
+                type = Gtk.MessageType.INFO
                 messageFormat = xstr("sendBugReport_success") % (result.ticketID,)
                 secondaryMarkup = xstr("sendBugReport_success_sec")
@@ -1738,5 +1750,5 @@
         dialog = Gtk.MessageDialog(parent = self._wizard.gui._bugReportDialog,
                                    type = type, message_format = messageFormat)
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
         dialog.set_title(WINDOW_TITLE_BASE)
         if secondaryMarkup is not None:
@@ -1815,5 +1827,5 @@
 
             logoPath = os.path.join(self._programDirectory, "logo.png")
-            logo = pixbuf_new_from_file(logoPath)
+            logo = GdkPixbuf.Pixbuf.new_from_file(logoPath)
             dialog.set_logo(logo)
 
@@ -1887,5 +1899,5 @@
             response = dialog.run()
 
-            if response==RESPONSETYPE_OK:
+            if response==Gtk.ResponseType.OK:
                 self._credentialsUserName = dialog.userName
                 self._credentialsPassword = dialog.password
@@ -1915,5 +1927,5 @@
         if not self.config.pilotID and not self.config.password:
             dialog = Gtk.MessageDialog(parent = self._mainWindow,
-                                       type = MESSAGETYPE_QUESTION,
+                                       type = Gtk.MessageType.QUESTION,
                                        message_format = xstr("register_ask"))
 
Index: src/mlx/gui/info.py
===================================================================
--- src/mlx/gui/info.py	(revision 996)
+++ src/mlx/gui/info.py	(revision 999)
@@ -41,9 +41,9 @@
 
         scroller = Gtk.ScrolledWindow()
-        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scroller.set_shadow_type(SHADOW_IN)
+        scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
+        scroller.set_shadow_type(Gtk.ShadowType.IN)
 
         comments = Gtk.TextView()
-        comments.set_wrap_mode(WRAP_WORD)
+        comments.set_wrap_mode(Gtk.WrapMode.WORD)
         scroller.add(comments)
         alignment.add(scroller)
@@ -90,6 +90,7 @@
         scrolledWindow.add(table)
         scrolledWindow.set_size_request(-1, 185)
-        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scrolledWindow.set_shadow_type(SHADOW_IN)
+        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
+                                  Gtk.PolicyType.AUTOMATIC)
+        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
 
         alignment.add(scrolledWindow)
Index: src/mlx/gui/pirep.py
===================================================================
--- src/mlx/gui/pirep.py	(revision 996)
+++ src/mlx/gui/pirep.py	(revision 999)
@@ -40,9 +40,9 @@
         heading.set_editable(False)
         heading.set_can_focus(False)
-        heading.set_wrap_mode(WRAP_WORD)
+        heading.set_wrap_mode(Gtk.WrapMode.WORD)
         heading.set_size_request(-1, 16)
 
         buffer = heading.get_buffer()
-        self._headingTag  = buffer.create_tag("heading", weight=WEIGHT_BOLD)
+        self._headingTag  = buffer.create_tag("heading", weight=Pango.Weight.BOLD)
         buffer.set_text("%s - %s" % (senderPID, senderName))
         buffer.apply_tag(self._headingTag,
@@ -57,5 +57,5 @@
 
         self._messageView = messageView = Gtk.TextView()
-        messageView.set_wrap_mode(WRAP_WORD)
+        messageView.set_wrap_mode(Gtk.WrapMode.WORD)
         messageView.set_editable(False)
         messageView.set_can_focus(False)
@@ -112,6 +112,6 @@
 
         scroller = Gtk.ScrolledWindow()
-        scroller.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
-        scroller.set_shadow_type(SHADOW_NONE)
+        scroller.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
+        scroller.set_shadow_type(Gtk.ShadowType.NONE)
 
         self._messages = Gtk.VBox()
@@ -204,9 +204,10 @@
         - the text view."""
         scrolledWindow = Gtk.ScrolledWindow()
-        scrolledWindow.set_shadow_type(SHADOW_IN)
-        scrolledWindow.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
+        scrolledWindow.set_shadow_type(Gtk.ShadowType.IN)
+        scrolledWindow.set_policy(Gtk.PolicyType.AUTOMATIC,
+                                  Gtk.PolicyType.AUTOMATIC)
 
         textView = Gtk.TextView()
-        textView.set_wrap_mode(WRAP_WORD)
+        textView.set_wrap_mode(Gtk.WrapMode.WORD)
         textView.set_editable(editable)
         textView.set_cursor_visible(editable)
@@ -313,5 +314,5 @@
             self._notebook.append_page(messagesTab, label)
 
-        self._okButton = self.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        self._okButton = self.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
         self._okButton.set_can_default(True)
 
@@ -868,7 +869,7 @@
         self._notebook.append_page(logTab, label)
 
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
-
-        self._okButton = self.add_button(xstr("button_save"), RESPONSETYPE_NONE)
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.CANCEL)
+
+        self._okButton = self.add_button(xstr("button_save"), Gtk.ResponseType.NONE)
         self._okButton.connect("clicked", self._okClicked)
         self._okButton.set_can_default(True)
@@ -1512,5 +1513,5 @@
         The PIREP is updated from the data in the window."""
         if not askYesNo(xstr("pirepEdit_save_question"), parent = self):
-            self.response(RESPONSETYPE_CANCEL)
+            self.response(Gtk.ResponseType.CANCEL)
 
         pirep = self._pirep
@@ -1559,5 +1560,5 @@
         pirep.flightDefects = self._flightInfo.faultsAndExplanations
 
-        self.response(RESPONSETYPE_OK)
+        self.response(Gtk.ResponseType.OK)
 
 
Index: src/mlx/gui/prefs.py
===================================================================
--- src/mlx/gui/prefs.py	(revision 996)
+++ src/mlx/gui/prefs.py	(revision 999)
@@ -173,8 +173,8 @@
                                           xstr("prefs_title"),
                                           gui.mainWindow,
-                                          DIALOG_MODAL)
-
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_REJECT)
-        self.add_button(xstr("button_ok"), RESPONSETYPE_ACCEPT)
+                                          Gtk.DialogFlags.MODAL)
+
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.REJECT)
+        self.add_button(xstr("button_ok"), Gtk.ResponseType.ACCEPT)
         self.set_resizable(False)
 
@@ -222,5 +222,5 @@
         self.hide()
 
-        if response==RESPONSETYPE_ACCEPT:
+        if response==Gtk.ResponseType.ACCEPT:
             self._toConfig(config)
             config.save()
@@ -512,7 +512,7 @@
         if not self._changingLanguage and not self._warnedRestartNeeded:
             dialog = Gtk.MessageDialog(parent = self,
-                                       type = MESSAGETYPE_INFO,
+                                       type = Gtk.MessageType.INFO,
                                        message_format = xstr("prefs_restart"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(self.get_title())
             dialog.format_secondary_markup(xstr("prefs_language_restart_sec"))
@@ -550,7 +550,7 @@
         dialog = Gtk.FileChooserDialog(title = WINDOW_TITLE_BASE + " - " +
                                        xstr("prefs_pirepDirectory_browser_title"),
-                                       action = FILE_CHOOSER_ACTION_SELECT_FOLDER,
-                                       buttons = (Gtk.STOCK_CANCEL, RESPONSETYPE_CANCEL,
-                                                  Gtk.STOCK_OK, RESPONSETYPE_OK),
+                                       action = Gtk.FileChooserAction.SELECT_FOLDER,
+                                       buttons = (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
+                                                  Gtk.STOCK_OK, Gtk.ResponseType.OK),
                                        parent = self)
         dialog.set_modal(True)
@@ -564,5 +564,5 @@
         dialog.hide()
 
-        if result==RESPONSETYPE_OK:
+        if result==Gtk.ResponseType.OK:
             self._pirepDirectory.set_text(dialog.get_filename())
 
@@ -592,10 +592,10 @@
 
         label = Gtk.Label(xstr("prefs_msgs_fs"))
-        label.set_justify(JUSTIFY_CENTER)
+        label.set_justify(Gtk.Justification.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(JUSTIFY_CENTER)
+        label.set_justify(Gtk.Justification.CENTER)
         label.set_alignment(0.5, 1.0)
         table.attach(label, 2, 3, 0, 1)
@@ -607,5 +607,5 @@
             messageTypeStr = const.messageType2string(messageType)
             label = Gtk.Label(xstr("prefs_msgs_type_" + messageTypeStr))
-            label.set_justify(JUSTIFY_CENTER)
+            label.set_justify(Gtk.Justification.CENTER)
             label.set_use_underline(True)
             label.set_alignment(0.5, 0.5)
@@ -834,5 +834,5 @@
             pass
 
-        okButton = self.get_widget_for_response(RESPONSETYPE_ACCEPT)
+        okButton = self.get_widget_for_response(Gtk.ResponseType.ACCEPT)
         okButton.set_sensitive(sensitive)
 
@@ -842,7 +842,7 @@
            not self._autoUpdate.get_active():
             dialog = Gtk.MessageDialog(parent = self,
-                                       type = MESSAGETYPE_INFO,
+                                       type = Gtk.MessageType.INFO,
                                        message_format = xstr("prefs_update_auto_warning"))
-            dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+            dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
             dialog.set_title(self.get_title())
             dialog.run()
Index: src/mlx/gui/statusbar.py
===================================================================
--- src/mlx/gui/statusbar.py	(revision 997)
+++ src/mlx/gui/statusbar.py	(revision 999)
@@ -42,11 +42,11 @@
 
         iconPath = os.path.join(iconDirectory, "conn_grey.png")
-        self._connGreyIcon = pixbuf_new_from_file(iconPath)
+        self._connGreyIcon = GdkPixbuf.Pixbuf.new_from_file(iconPath)
 
         iconPath = os.path.join(iconDirectory, "conn_red.png")
-        self._connRedIcon = pixbuf_new_from_file(iconPath)
+        self._connRedIcon = GdkPixbuf.Pixbuf.new_from_file(iconPath)
 
         iconPath = os.path.join(iconDirectory, "conn_green.png")
-        self._connGreenIcon = pixbuf_new_from_file(iconPath)
+        self._connGreenIcon = GdkPixbuf.Pixbuf.new_from_file(iconPath)
 
         self._connStateArea = Gtk.DrawingArea()
Index: src/mlx/gui/timetable.py
===================================================================
--- src/mlx/gui/timetable.py	(revision 997)
+++ src/mlx/gui/timetable.py	(revision 999)
@@ -76,7 +76,7 @@
         self._model = Gtk.ListStore(*types)
         if defaultSortableIndex is not None:
-            sortOrder = SORT_DESCENDING \
+            sortOrder = Gtk.SortType.DESCENDING \
               if self._columnDescriptors[defaultSortableIndex-1]._defaultDescending \
-              else SORT_ASCENDING
+              else Gtk.SortType.ASCENDING
             self._model.set_sort_column_id(defaultSortableIndex, sortOrder)
         self._view = Gtk.TreeView(self._model)
@@ -175,5 +175,5 @@
     def _buttonPressEvent(self, widget, event):
         """Called when a mouse button is pressed or released."""
-        if event.type!=EVENT_BUTTON_PRESS or event.button!=3 or \
+        if event.type!=Gdk.EventType.BUTTON_PRESS or event.button!=3 or \
            self._popupMenuProducer is None:
             return
@@ -441,7 +441,7 @@
         contentArea.pack_start(frame, True, True, 4)
 
-        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
-
-        self._okButton = self.add_button(xstr("button_book"), RESPONSETYPE_OK)
+        self.add_button(xstr("button_cancel"), Gtk.ResponseType.CANCEL)
+
+        self._okButton = self.add_button(xstr("button_book"), Gtk.ResponseType.OK)
         self._okButton.set_use_underline(True)
         self._okButton.set_can_default(True)
@@ -755,5 +755,5 @@
         result = dialog.run()
         dialog.hide()
-        if result==RESPONSETYPE_OK:
+        if result==Gtk.ResponseType.OK:
             flightIDs = [flightPair.flight0.id]
             if flightPair.flight1 is not None:
@@ -772,14 +772,14 @@
         if returned:
             dialog = Gtk.MessageDialog(parent = self,
-                                       type = MESSAGETYPE_INFO,
+                                       type = Gtk.MessageType.INFO,
                                        message_format = xstr("bookflights_successful"))
             dialog.format_secondary_markup(xstr("bookflights_successful_secondary"))
         else:
             dialog = Gtk.MessageDialog(parent = self,
-                                       type = MESSAGETYPE_ERROR,
+                                       type = Gtk.MessageType.ERROR,
                                        message_format = xstr("bookflights_failed"))
             dialog.format_secondary_markup(xstr("bookflights_failed_secondary"))
 
-        dialog.add_button(xstr("button_ok"), RESPONSETYPE_OK)
+        dialog.add_button(xstr("button_ok"), Gtk.ResponseType.OK)
         dialog.set_title(WINDOW_TITLE_BASE)
 
