Ignore:
Timestamp:
04/07/13 07:19:12 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
xplane
Phase:
public
Message:

The default simulator type is now remembered

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/config.py

    r486 r503  
    236236        self._pirepAutoSave = False
    237237
     238        self._defaultMSFS = os.name=="nt"
     239
    238240        self._enableSounds = not secondaryInstallation
    239241
     
    471473        if pirepAutoSave!=self._pirepAutoSave:
    472474            self._pirepAutoSave = pirepAutoSave
     475            self._modified = True
     476
     477    @property
     478    def defaultMSFS(self):
     479        """Get if the default simulator type is MS FS."""
     480        return self._defaultMSFS
     481
     482    @defaultMSFS.setter
     483    def defaultMSFS(self, defaultMSFS):
     484        """Set if the default simulator type is MS FS."""
     485        if defaultMSFS!=self._defaultMSFS:
     486            self._defaultMSFS = defaultMSFS
    473487            self._modified = True
    474488
     
    704718                ApproachCallouts.fromConfig(config, aircraftType)
    705719
     720        self._defaultMSFS = self._getBoolean(config, "general",
     721                                             "defaultMSFS", os.name=="nt")
     722
    706723        self._modified = False
    707724
     
    746763                   "yes" if self._pirepAutoSave else "no")
    747764
     765        config.set("general", "defaultMSFS",
     766                   "yes" if self._defaultMSFS else "no")
     767
    748768        config.add_section(Config._messageTypesSection)
    749769        for messageType in const.messageTypes:
     
    890910        print "  pirepAutoSave:", self._pirepAutoSave
    891911
     912        print "  defaultMSFS:", self._defaultMSFS
     913
    892914        print "  enableSounds:", self._enableSounds
    893915
Note: See TracChangeset for help on using the changeset viewer.