Changeset 183:97e7e9479e0a for src/mlx


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

Added the Using FS2Crew option

Location:
src/mlx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r170 r183  
    549549                                      const.AIRCRAFT_T154]
    550550        return (flight.stage!=const.STAGE_PARKING or \
    551                 not flight.options.fs2Crew) and \
     551                not flight.config.usingFS2Crew) and \
    552552                not state.antiCollisionLightsOn and \
    553553                ((isTupolev and max(state.n1[1:])>5) or \
     
    721721        limit = self.getLimit(flight, aircraft, state)
    722722        if limit is not None:
    723             if flight.options.compensation is not None:
    724                 limit += flight.options.compensation
     723            #if flight.options.compensation is not None:
     724            #    limit += flight.options.compensation
    725725            return self.getWeight(state)>limit
    726726
  • src/mlx/config.py

    r175 r183  
    125125        self._flareTimeFromFS = False
    126126        self._syncFSTime = False
     127        self._usingFS2Crew = False
    127128
    128129        self._pirepDirectory = None
     
    260261        if syncFSTime!=self._syncFSTime:
    261262            self._syncFSTime = syncFSTime
     263            self._modified = True
     264
     265    @property
     266    def usingFS2Crew(self):
     267        """Get whether the FS2Crew addon is being used."""
     268        return self._usingFS2Crew
     269
     270    @usingFS2Crew.setter
     271    def usingFS2Crew(self, usingFS2Crew):
     272        """Set whether the FS2Crew addon is being used."""
     273        if usingFS2Crew!=self._usingFS2Crew:
     274            self._usingFS2Crew = usingFS2Crew
    262275            self._modified = True
    263276
     
    439452                                            "syncFSTime",
    440453                                            False)
     454        self._usingFS2Crew = self._getBoolean(config, "general",
     455                                              "usingFS2Crew",
     456                                              False)
    441457        self._pirepDirectory = self._get(config, "general",
    442458                                         "pirepDirectory", None)
     
    499515        config.set("general", "syncFSTime",
    500516                   "yes" if self._syncFSTime else "no")
     517        config.set("general", "usingFS2Crew",
     518                   "yes" if self._usingFS2Crew else "no")
    501519
    502520        if self._pirepDirectory is not None:
  • src/mlx/flight.py

    r176 r183  
    99
    1010import threading
    11 
    12 #---------------------------------------------------------------------------------------
    13 
    14 class Options(object):
    15     """Various configuration options."""
    16     def __init__(self):
    17         """Construct the object with default values."""
    18         self.fs2Crew = False
    19         self.compensation = None       
    2011
    2112#---------------------------------------------------------------------------------------
     
    3930        self.flareTimeFromFS = False
    4031        self.entranceExam = False
    41 
    42         self.options = Options()
    4332
    4433        self.aircraftType = None
  • src/mlx/gui/prefs.py

    r174 r183  
    228228        self._flareTimeFromFS.set_active(config.flareTimeFromFS)
    229229        self._syncFSTime.set_active(config.syncFSTime)
     230        self._usingFS2Crew.set_active(config.usingFS2Crew)
    230231
    231232        pirepDirectory = config.pirepDirectory
     
    267268        config.flareTimeFromFS = self._flareTimeFromFS.get_active()
    268269        config.syncFSTime = self._syncFSTime.get_active()
     270        config.usingFS2Crew = self._usingFS2Crew.get_active()
    269271        config.pirepDirectory = text2unicode(self._pirepDirectory.get_text())
    270272
     
    353355        self._syncFSTime.set_tooltip_text(xstr("prefs_syncFSTime_tooltip"))
    354356        mainBox.pack_start(self._syncFSTime, False, False, 4)
     357
     358        self._usingFS2Crew = gtk.CheckButton(xstr("prefs_usingFS2Crew"))
     359        self._usingFS2Crew.set_use_underline(True)
     360        self._usingFS2Crew.set_tooltip_text(xstr("prefs_usingFS2Crew_tooltip"))
     361        mainBox.pack_start(self._usingFS2Crew, False, False, 4)
    355362
    356363        pirepBox = gtk.HBox()
  • src/mlx/i18n.py

    r181 r183  
    631631                 "S_ynchronize the time in FS with the computer's clock")
    632632        self.add("prefs_syncFSTime_tooltip",
    633                  "If this is checked the flight simulator's internal clock "
     633                 "If this is checked, the flight simulator's internal clock "
    634634                 "will always be synchronized to the computer's clock.")
     635        self.add("prefs_usingFS2Crew",
     636                 "Using FS_2Crew")
     637        self.add("prefs_usingFS2Crew_tooltip",
     638                 "If this is checked, the logger will take into account, "
     639                 "that you are using the FS2Crew addon.")
    635640        self.add("prefs_pirepDirectory",
    636641                 "_PIREP directory:")
     
    13351340                 "Ha ez bejelölöd, a szimulátor belső óráját a program "
    13361341                 "szinkronban tartja a számítógép órájával.")
     1342        self.add("prefs_usingFS2Crew",
     1343                 "Használom az FS_2Crew kiegészítőt")
     1344        self.add("prefs_usingFS2Crew_tooltip",
     1345                 "Ha ezt bejelölöd, a program figyelembe veszi, "
     1346                 "hogy az FS2Crew kiegészítőt használod.")
    13371347        self.add("prefs_pirepDirectory",
    13381348                 "_PIREP-ek könyvtára:")
Note: See TracChangeset for help on using the changeset viewer.