Ignore:
Timestamp:
12/23/14 09:29:51 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added help about the minimum and recommended (if known) amounts of landing fuel to the fuel page (re #236)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r590 r592  
    16031603        """Construct the page."""
    16041604        super(FuelPage, self).__init__(wizard, xstr("fuel_title"),
    1605                                        xstr("fuel_help"),
     1605                                       xstr("fuel_help_pre") +
     1606                                       xstr("fuel_help_post"),
    16061607                                       completedHelp = xstr("fuel_chelp"))
    16071608
     
    16251626        """Activate the page."""
    16261627        self._setupTanks(self._wizard._fuelData)
     1628
     1629        aircraft = self._wizard.gui.flight.aircraft
     1630        minLandingFuel = aircraft.minLandingFuel
     1631        recommendedLandingFuel = aircraft.recommendedLandingFuel
     1632
     1633        middleHelp = "" if minLandingFuel is None else \
     1634            (xstr("fuel_help_min") % (minLandingFuel,)) \
     1635            if recommendedLandingFuel is None else \
     1636            (xstr("fuel_help_min_rec") % (minLandingFuel,
     1637                                          recommendedLandingFuel))
     1638        self.setHelp(xstr("fuel_help_pre") + middleHelp + xstr("fuel_help_post"))
    16271639
    16281640    def finalize(self):
Note: See TracChangeset for help on using the changeset viewer.