Ignore:
Timestamp:
05/18/12 15:19:28 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for the charter configuration version of the Boeing 737-800

Location:
src/mlx/gui
Files:
2 edited

Legend:

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

    r175 r191  
    201201
    202202# A mapping of aircraft types to their screen names
    203 aircraftNames = { _const.AIRCRAFT_B736 : xstr("aircraft_b736"),
    204                   _const.AIRCRAFT_B737 : xstr("aircraft_b737"),
    205                   _const.AIRCRAFT_B738 : xstr("aircraft_b738"),
    206                   _const.AIRCRAFT_B733 : xstr("aircraft_b733"),
    207                   _const.AIRCRAFT_B734 : xstr("aircraft_b734"),
    208                   _const.AIRCRAFT_B735 : xstr("aircraft_b735"),
    209                   _const.AIRCRAFT_DH8D : xstr("aircraft_dh8d"),
    210                   _const.AIRCRAFT_B762 : xstr("aircraft_b762"),
    211                   _const.AIRCRAFT_B763 : xstr("aircraft_b763"),
    212                   _const.AIRCRAFT_CRJ2 : xstr("aircraft_crj2"),
    213                   _const.AIRCRAFT_F70  : xstr("aircraft_f70"),
    214                   _const.AIRCRAFT_DC3  : xstr("aircraft_dc3"),
    215                   _const.AIRCRAFT_T134 : xstr("aircraft_t134"),
    216                   _const.AIRCRAFT_T154 : xstr("aircraft_t154"),
    217                   _const.AIRCRAFT_YK40 : xstr("aircraft_yk40") }
    218 
    219 #------------------------------------------------------------------------------
     203aircraftNames = { _const.AIRCRAFT_B736  : xstr("aircraft_b736"),
     204                  _const.AIRCRAFT_B737  : xstr("aircraft_b737"),
     205                  _const.AIRCRAFT_B738  : xstr("aircraft_b738"),
     206                  _const.AIRCRAFT_B738C : xstr("aircraft_b738c"),
     207                  _const.AIRCRAFT_B733  : xstr("aircraft_b733"),
     208                  _const.AIRCRAFT_B734  : xstr("aircraft_b734"),
     209                  _const.AIRCRAFT_B735  : xstr("aircraft_b735"),
     210                  _const.AIRCRAFT_DH8D  : xstr("aircraft_dh8d"),
     211                  _const.AIRCRAFT_B762  : xstr("aircraft_b762"),
     212                  _const.AIRCRAFT_B763  : xstr("aircraft_b763"),
     213                  _const.AIRCRAFT_CRJ2  : xstr("aircraft_crj2"),
     214                  _const.AIRCRAFT_F70   : xstr("aircraft_f70"),
     215                  _const.AIRCRAFT_DC3   : xstr("aircraft_dc3"),
     216                  _const.AIRCRAFT_T134  : xstr("aircraft_t134"),
     217                  _const.AIRCRAFT_T154  : xstr("aircraft_t154"),
     218                  _const.AIRCRAFT_YK40  : xstr("aircraft_yk40") }
     219
     220#------------------------------------------------------------------------------
  • src/mlx/gui/flight.py

    r184 r191  
    1515import datetime
    1616import time
    17 
    18 #------------------------------------------------------------------------------
    19 
    20 acftTypeNames = { const.AIRCRAFT_B736: "Boeing 737-600",
    21                   const.AIRCRAFT_B737: "Boeing 737-700",
    22                   const.AIRCRAFT_B738: "Boeing 737-800",
    23                   const.AIRCRAFT_DH8D: "Bombardier Dash 8-Q400",
    24                   const.AIRCRAFT_B733: "Boeing 737-300",
    25                   const.AIRCRAFT_B734: "Boeing 737-400",
    26                   const.AIRCRAFT_B735: "Boeing 737-500",
    27                   const.AIRCRAFT_B762: "Boeing 767-200",
    28                   const.AIRCRAFT_B763: "Boeing 767-300",
    29                   const.AIRCRAFT_CRJ2: "Bombardier CRJ200",
    30                   const.AIRCRAFT_F70:  "Fokker 70",
    31                   const.AIRCRAFT_DC3:  "Lisunov Li-2",
    32                   const.AIRCRAFT_T134: "Tupolev Tu-134",
    33                   const.AIRCRAFT_T154: "Tupolev Tu-154",
    34                   const.AIRCRAFT_YK40: "Yakovlev Yak-40" }
    3517
    3618#-----------------------------------------------------------------------------
     
    688670        labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0)
    689671        self._flightNumber = gtk.Label()
    690         self._flightNumber.set_width_chars(7)
     672        self._flightNumber.set_width_chars(9)
    691673        self._flightNumber.set_alignment(0.0, 0.5)
    692674        labelAlignment.add(self._flightNumber)
     
    759741        self._flightNumber.set_markup("<b>" + bookedFlight.callsign + "</b>")
    760742
    761         aircraftType = acftTypeNames[bookedFlight.aircraftType]
     743        aircraftType = aircraftNames[bookedFlight.aircraftType]
    762744        self._aircraft.set_markup("<b>" + aircraftType + "</b>")
    763745       
Note: See TracChangeset for help on using the changeset viewer.