Index: locale/en/mlx.po
===================================================================
--- locale/en/mlx.po	(revision 508)
+++ locale/en/mlx.po	(revision 512)
@@ -786,12 +786,30 @@
 msgstr "Der_ated thrust:"
 
+msgid "takeoff_derate_boeing_tooltip"
+msgstr "Enter the percentage of the takeoff power."
+
+msgid "takeoff_derate_epr_tooltip"
+msgstr "Enter the EPR value used for takeoff."
+
 msgid "takeoff_derate_tupolev"
-msgstr "N_ominal/takeoff:"
+msgstr "Thrust setting:"
+
+msgid "takeoff_derate_tupolev_nominal"
+msgstr "_nominal"
+
+msgid "takeoff_derate_tupolev_nominal_tooltip"
+msgstr "Select this if the takeoff thrust setting is nominal."
+
+msgid "takeoff_derate_tupolev_takeoff"
+msgstr "_takeoff"
+
+msgid "takeoff_derate_tupolev_takeoff_tooltip"
+msgstr "Select this if the takeoff thrust setting is takeoff."
 
 msgid "takeoff_derate_b462"
-msgstr "Der_ate (yes/no):"
-
-msgid "takeoff_derate_tooltip"
-msgstr "Enter the takeoff derate parameter."
+msgstr "Der_ate enabled"
+
+msgid "takeoff_derate_b462_tooltip"
+msgstr "Check this if derate is enabled for takeoff."
 
 msgid "takeoff_antiice"
Index: locale/hu/mlx.po
===================================================================
--- locale/hu/mlx.po	(revision 508)
+++ locale/hu/mlx.po	(revision 512)
@@ -782,17 +782,35 @@
 
 msgid "takeoff_derate"
-msgstr "Teljesítménycsökkentés:"
+msgstr "Teljesítmény:"
 
 msgid "takeoff_derate_boeing"
-msgstr "Csökkentett teljesítmény:"
+msgstr "_Teljesítmény:"
+
+msgid "takeoff_derate_boeing_tooltip"
+msgstr "Írd be, hogy hány százalék a felszállási teljesítmény."
+
+msgid "takeoff_derate_epr_tooltip"
+msgstr "Írd be a felszálláskor használt EPR értéket."
 
 msgid "takeoff_derate_tupolev"
-msgstr "Névleges/felszállási:"
+msgstr "Üzemmód:"
+
+msgid "takeoff_derate_tupolev_nominal"
+msgstr "n_ominális"
+
+msgid "takeoff_derate_tupolev_nominal_tooltip"
+msgstr "Ha a felszálláshoz használt üzemmód beállítása nominális, válaszd ezt."
+
+msgid "takeoff_derate_tupolev_takeoff"
+msgstr "f_elszállási"
+
+msgid "takeoff_derate_tupolev_takeoff_tooltip"
+msgstr "Ha a felszálláshoz használt üzemmód beállítása felszállási, válaszd ezt."
 
 msgid "takeoff_derate_b462"
-msgstr "Teljesítménycsökkentés (yes/no):"
-
-msgid "takeoff_derate_tooltip"
-msgstr "Írd be a felszállási teljesítménycsökkentés értékét."
+msgstr "_Csökkentett teljesítmény"
+
+msgid "takeoff_derate_b462_tooltip"
+msgstr "Jelöld ezt be, ha a felszállás csökkentett teljesítménnyel történik."
 
 msgid "takeoff_antiice"
Index: src/mlx/acft.py
===================================================================
--- src/mlx/acft.py	(revision 447)
+++ src/mlx/acft.py	(revision 512)
@@ -32,4 +32,33 @@
 #---------------------------------------------------------------------------------------
 
+# Derate type: no derate possible
+DERATE_NONE = 0
+
+# Derate type: Boeing, i.e. a percentage value.
+# For logging, the percentage value is expected as a string (i.e. whatever the
+# pilot enters into the text field).
+DERATE_BOEING = 1
+
+# Derate type: EPR, i.e. an EPR value.
+# For logging, the EPR value is expected as a string (i.e. whatever the pilot
+# enters into the text field).
+DERATE_EPR = 2
+
+# Derate type: Tupolev, i.e. nominal or takeoff
+# For logging, one of the DERATE_TUPOLEV_xxx values are expected.
+DERATE_TUPOLEV = 3
+
+# Tupolev derate value: nominal
+DERATE_TUPOLEV_NOMINAL = 1
+
+# Tupolev derate value: takeoff
+DERATE_TUPOLEV_TAKEOFF = 2
+
+# Derate type: BAe-146, i.e. enabled or not
+# For logging, a boolean is expected.
+DERATE_B462 = 4
+
+#---------------------------------------------------------------------------------------
+
 class SmoothedValue(object):
     """A smoothed value."""
@@ -203,21 +232,33 @@
 
     @property
-    def derateLabels(self):
-        """Get the strings related to the derate entry.
-
-        It returns a tuple of two items:
-        - the label before the entry field,
-        - the label after the entry field, which can be None.
-
-        If both labels are None, the derate value will not be logged or
-        queried. This is the default."""
-        return (None, None)
-
-    @property
-    def derateTemplate(self):
-        """Get the template for logging the derate value.
-
-        If it returns None (which is the default), no derate value will be
-        logged."""
+    def derateType(self):
+        """Get the derate type for this aircraft.
+
+        This default implementation returns DERATE_NONE."""
+        return DERATE_NONE
+
+    def getDerateLine(self, value):
+        """Get the log line for the given derate value.
+
+        It uses the the derate type and produces the standard message for
+        each. This children need not override it, although they can."""
+        dt = self.derateType
+
+        if dt==DERATE_BOEING:
+            return "Derate calculated by the pilot: %s %%" % \
+              ("-" if value is None else value,)
+        elif dt==DERATE_EPR:
+            return "EPR calculated by the pilot: %s" % \
+              ("-" if value is None else value,)
+        elif dt==DERATE_TUPOLEV:
+            return "Thrust setting calculated by the pilot: %s" % \
+              ("-" if value is None else
+               "nominal" if value==DERATE_TUPOLEV_NOMINAL else "takeoff",)
+        elif dt==DERATE_B462:
+            return "Derate setting: %s" % \
+              ("-" if value is None else "enabled" if value else "disabled",)
+        elif dt!=DERATE_NONE:
+            print "mlx.acft.getDerateLine: invalid derate type: " + dt
+
         return None
 
@@ -472,17 +513,17 @@
         """Log the derate values either newly or by updating the corresponding
         line."""
-        derateTemplate = self.derateTemplate
-        if derateTemplate is None:
+        dt = self.derateType
+        if dt==DERATE_NONE:
             return
 
-        derate = self._flight.derate
-        message = derateTemplate % ("-" if derate is None else derate)
-        if self._derateLineID is None:
-            if state is None:
-                state = self._aircraftState
-            self._derateLineID = \
-                self.logger.message(state.timestamp, message)
-        else:
-            self.logger.updateLine(self._derateLineID, message)
+        message = self.getDerateLine(self._flight.derate)
+        if message is not None:
+            if self._derateLineID is None:
+                if state is None:
+                    state = self._aircraftState
+                self._derateLineID = \
+                  self.logger.message(state.timestamp, message)
+            else:
+                self.logger.updateLine(self._derateLineID, message)
 
     def _logTakeoffAntiIce(self, state = None):
@@ -607,12 +648,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return (xstr("takeoff_derate_boeing"), "%")
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "Derate calculated by the pilot: %s %%"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_BOEING
 
     # def _appendSpeedChecker(self):
@@ -741,12 +777,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return (xstr("takeoff_derate_boeing"), "%")
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "Derate calculated by the pilot: %s %%"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_BOEING
 
 #---------------------------------------------------------------------------------------
@@ -819,12 +850,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return ("EPR", None)
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "EPR calculated by the pilot: %s"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_EPR
 
 #---------------------------------------------------------------------------------------
@@ -881,12 +907,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return (xstr("takeoff_derate_tupolev"), None)
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "Nominal/takeoff power calculated by the pilot: %s"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_TUPOLEV
 
     @property
@@ -939,12 +960,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return (xstr("takeoff_derate_tupolev"), None)
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "Nominal/takeoff power calculated by the pilot: %s"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_TUPOLEV
 
     def _appendLightsLoggers(self):
@@ -990,12 +1006,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return (xstr("takeoff_derate_tupolev"), None)
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "Nominal/takeoff power calculated by the pilot: %s"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_TUPOLEV
 
     def _appendLightsLoggers(self):
@@ -1038,12 +1049,7 @@
 
     @property
-    def derateLabels(self):
-        """Get the derate strings for this type."""
-        return (xstr("takeoff_derate_b462"), None)
-
-    @property
-    def derateTemplate(self):
-        """Get the derate template for this aicraft type."""
-        return "Derate enabled: %s"
+    def derateType(self):
+        """Get the derate type for this type."""
+        return DERATE_B462
 
 #---------------------------------------------------------------------------------------
Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 436)
+++ src/mlx/gui/flight.py	(revision 512)
@@ -2090,5 +2090,5 @@
         table.attach(self._v2Unit, 3, 4, 4, 5)
 
-        self._hasDerate = False
+        self._derateType = acft.DERATE_NONE
 
         self._derateLabel = gtk.Label()
@@ -2098,16 +2098,10 @@
         table.attach(self._derateLabel, 0, 1, 5, 6)
 
-        self._derate = gtk.Entry()
-        self._derate.set_width_chars(10)
-        self._derate.set_tooltip_text(xstr("takeoff_derate_tooltip"))
-        self._derate.set_alignment(1.0)
-        self._derate.connect("changed", self._derateChanged)
-        table.attach(self._derate, 1, 3, 5, 6)
-        self._derateLabel.set_mnemonic_widget(self._derate)
-
-        self._derateUnit = gtk.Label("")
-        self._derateUnit.set_use_markup(True)
-        self._derateUnit.set_alignment(0.0, 0.5)
-        table.attach(self._derateUnit, 3, 4, 5, 6)
+        self._derate = gtk.Alignment()
+        table.attach(self._derate, 2, 4, 5, 6)
+        self._derateWidget = None
+        self._derateEntry = None
+        self._derateUnit = None
+        self._derateButtons = None
 
         self._antiIceOn = gtk.CheckButton(xstr("takeoff_antiice"))
@@ -2156,7 +2150,18 @@
     def derate(self):
         """Get the derate value, if any."""
-        if self._hasDerate:
-            derate = self._derate.get_text()
+        if self._derateWidget is None:
+            return None
+        if self._derateType==acft.DERATE_BOEING:
+            derate = self._derateEntry.get_text()
             return derate if derate else None
+        elif self._derateType==acft.DERATE_EPR:
+            derate = self._derateWidget.get_text()
+            return derate if derate else None
+        elif self._derateType==acft.DERATE_TUPOLEV:
+            return acft.DERATE_TUPOLEV_NOMINAL \
+                   if self._derateButtons[0].get_active() \
+                   else acft.DERATE_TUPOLEV_TAKEOFF
+        elif self._derateType==acft.DERATE_B462:
+            return self._derateWidget.get_active()
         else:
             return None
@@ -2200,23 +2205,7 @@
         self._v2.set_tooltip_markup(xstr("takeoff_v2_tooltip" + i18nSpeedUnit))
 
-        (derateLabel, derateUnit) = \
-             self._wizard.gui.flight.aircraft.derateLabels
-
-        self._hasDerate = derateLabel is not None
-
-        if self._hasDerate:
-            self._derateLabel.set_markup(derateLabel)
-            self._derateLabel.set_use_underline(True)
-            self._derateUnit.set_markup("" if derateUnit is None
-                                        else derateUnit)
-        else:
-            self._derateLabel.set_markup(xstr("takeoff_derate"))
-            self._derateUnit.set_text("")
-
-        self._derate.set_text("")
-
-        self._derateLabel.set_sensitive(self._hasDerate)
-        self._derate.set_sensitive(self._hasDerate)
-        self._derateUnit.set_sensitive(self._hasDerate)
+        self._derateType = self._wizard.gui.flight.aircraft.derateType
+
+        self._setupDerateWidget()
 
         self._rto.set_active(False)
@@ -2256,5 +2245,6 @@
                     self.v1 <= self.vr and \
                     self.vr <= self.v2 and \
-                    (not self._hasDerate or self._derate.get_text()!="")
+                    (self._derateType==acft.DERATE_NONE or
+                     self.derate is not None)
         self._button.set_sensitive(sensitive)
 
@@ -2285,8 +2275,97 @@
         aircraft = self._wizard.gui.flight.aircraft
         aircraft.updateV1R2()
-        if self._hasDerate:
+        if self.derate is not None:
             aircraft.updateDerate()
         aircraft.updateTakeoffAntiIce()
         self._wizard.nextPage()
+
+    def _setupDerateWidget(self):
+        """Setup the derate widget."""
+        if self._derateWidget is not None:
+            self._derate.remove(self._derateWidget)
+
+        if self._derateType==acft.DERATE_BOEING:
+            self._derateLabel.set_text(xstr("takeoff_derate_boeing"))
+            self._derateLabel.set_use_underline(True)
+            self._derateLabel.set_sensitive(True)
+
+            self._derateEntry = gtk.Entry()
+            self._derateEntry.set_width_chars(7)
+            self._derateEntry.set_tooltip_text(xstr("takeoff_derate_boeing_tooltip"))
+            self._derateEntry.set_alignment(1.0)
+            self._derateEntry.connect("changed", self._derateChanged)
+            self._derateLabel.set_mnemonic_widget(self._derateEntry)
+
+            self._derateUnit = gtk.Label("%")
+            self._derateUnit.set_alignment(0.0, 0.5)
+
+            self._derateWidget = gtk.Table(3, 1)
+            self._derateWidget.set_row_spacings(4)
+            self._derateWidget.set_col_spacings(16)
+            self._derateWidget.set_homogeneous(False)
+
+            self._derateWidget.attach(self._derateEntry, 0, 2, 0, 1)
+            self._derateWidget.attach(self._derateUnit, 2, 3, 0, 1)
+
+            self._derate.add(self._derateWidget)
+        elif self._derateType==acft.DERATE_EPR:
+            self._derateLabel.set_text("_EPR:")
+            self._derateLabel.set_use_underline(True)
+            self._derateLabel.set_sensitive(True)
+
+            self._derateWidget = gtk.Entry()
+            self._derateWidget.set_width_chars(7)
+            self._derateWidget.set_tooltip_text(xstr("takeoff_derate_epr_tooltip"))
+            self._derateWidget.set_alignment(1.0)
+            self._derateWidget.connect("changed", self._derateChanged)
+            self._derateLabel.set_mnemonic_widget(self._derateWidget)
+
+            self._derate.add(self._derateWidget)
+        elif self._derateType==acft.DERATE_TUPOLEV:
+            self._derateLabel.set_text(xstr("takeoff_derate_tupolev"))
+            self._derateLabel.set_use_underline(True)
+            self._derateLabel.set_sensitive(True)
+
+            if pygobject:
+                nominal = gtk.RadioButton.\
+                  new_with_label_from_widget(None,
+                                             xstr("takeoff_derate_tupolev_nominal"))
+            else:
+                nominal = gtk.RadioButton(None,
+                                          xstr("takeoff_derate_tupolev_nominal"))
+            nominal.set_use_underline(True)
+            nominal.set_tooltip_text(xstr("takeoff_derate_tupolev_nominal_tooltip"))
+            nominal.connect("toggled", self._derateChanged)
+
+            if pygobject:
+                takeoff = gtk.RadioButton.\
+                  new_with_label_from_widget(nominal,
+                                             xstr("takeoff_derate_tupolev_takeoff"))
+            else:
+                takeoff = gtk.RadioButton(nominal,
+                                          xstr("takeoff_derate_tupolev_takeoff"))
+
+            takeoff.set_use_underline(True)
+            takeoff.set_tooltip_text(xstr("takeoff_derate_tupolev_takeoff_tooltip"))
+            takeoff.connect("toggled", self._derateChanged)
+
+            self._derateButtons = [nominal, takeoff]
+
+            self._derateWidget = gtk.HBox()
+            self._derateWidget.pack_start(nominal, False, False, 4)
+            self._derateWidget.pack_start(takeoff, False, False, 4)
+
+            self._derate.add(self._derateWidget)
+        elif self._derateType==acft.DERATE_B462:
+            self._derateLabel.set_text("")
+
+            self._derateWidget = gtk.CheckButton(xstr("takeoff_derate_b462"))
+            self._derateWidget.set_tooltip_text(xstr("takeoff_derate_b462_tooltip"))
+            self._derateWidget.set_use_underline(True)
+            self._derate.add(self._derateWidget)
+        else:
+            self._derateWidget = None
+            self._derateLabel.set_text("")
+            self._derateLabel.set_sensitive(False)
 
 #-----------------------------------------------------------------------------
