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()
