Changeset 503:7a2894109717 for src
- Timestamp:
- 04/07/13 07:19:12 (12 years ago)
- Branch:
- xplane
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r486 r503 236 236 self._pirepAutoSave = False 237 237 238 self._defaultMSFS = os.name=="nt" 239 238 240 self._enableSounds = not secondaryInstallation 239 241 … … 471 473 if pirepAutoSave!=self._pirepAutoSave: 472 474 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 473 487 self._modified = True 474 488 … … 704 718 ApproachCallouts.fromConfig(config, aircraftType) 705 719 720 self._defaultMSFS = self._getBoolean(config, "general", 721 "defaultMSFS", os.name=="nt") 722 706 723 self._modified = False 707 724 … … 746 763 "yes" if self._pirepAutoSave else "no") 747 764 765 config.set("general", "defaultMSFS", 766 "yes" if self._defaultMSFS else "no") 767 748 768 config.add_section(Config._messageTypesSection) 749 769 for messageType in const.messageTypes: … … 890 910 print " pirepAutoSave:", self._pirepAutoSave 891 911 912 print " defaultMSFS:", self._defaultMSFS 913 892 914 print " enableSounds:", self._enableSounds 893 915 -
src/mlx/gui/flight.py
r501 r503 1018 1018 1019 1019 if self._selectSimulator: 1020 self._selectMSFS.set_active(os.name=="nt") 1021 self._selectXPlane.set_active(os.name!="nt") 1020 config = self._wizard.gui.config 1021 self._selectMSFS.set_active(config.defaultMSFS) 1022 self._selectXPlane.set_active(not config.defaultMSFS) 1022 1023 1023 1024 def finalize(self): … … 1040 1041 else: 1041 1042 simulatorType = const.SIM_MSFS9 if os.name=="nt" \ 1042 else const.SIM_XPLANE10 1043 else const.SIM_XPLANE10 1044 1045 config = self._wizard.gui.config 1046 config.defaultMSFS = simulatorType == const.SIM_MSFS9 1047 config.save() 1048 1043 1049 self._wizard._connectSimulator(simulatorType) 1044 1050
Note:
See TracChangeset
for help on using the changeset viewer.