Changeset 1067:9ce88d0b881d for src/mlx/config.py
- Timestamp:
- 12/21/22 10:17:25 (16 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r1045 r1067 260 260 self._updateURLUpdated = True 261 261 262 self._xplaneRemote = False 263 self._xplaneAddress = "" 264 262 265 self._messageTypeLevels = {} 263 266 … … 667 670 if updateURL!=self._updateURL: 668 671 self._updateURL = updateURL 672 self._modified = True 673 674 @property 675 def xplaneRemote(self): 676 """Indicate if X-Plane should be accessed remotely.""" 677 return self._xplaneRemote 678 679 @xplaneRemote.setter 680 def xplaneRemote(self, xplaneRemote): 681 """Set if X-Plane should be accessed remotely.""" 682 if xplaneRemote!=self._xplaneRemote: 683 self._xplaneRemote = xplaneRemote 684 self._modified = True 685 686 @property 687 def xplaneAddress(self): 688 """Get the address of the machine running X-Plane""" 689 return self._xplaneAddress 690 691 @xplaneAddress.setter 692 def xplaneAddress(self, xplaneAddress): 693 """Set the address of the machine running X-Plane.""" 694 if xplaneAddress!=self._xplaneAddress: 695 self._xplaneAddress = xplaneAddress 669 696 self._modified = True 670 697 … … 799 826 "defaultMSFS", os.name=="nt") 800 827 828 self._xplaneRemote = self._getBoolean(config, "general", 829 "xplaneRemote", False) 830 self._xplaneAddress = self._get(config, "general", 831 "xplaneAddress", "") 832 801 833 self._modified = False 802 834 … … 852 884 "yes" if self._defaultMSFS else "no") 853 885 886 config.set("general", "xplaneRemote", 887 "yes" if self._xplaneRemote else "no") 888 config.set("general", "xplaneAddress", self._xplaneAddress) 889 854 890 config.add_section(Config._messageTypesSection) 855 891 for messageType in const.messageTypes: … … 1002 1038 1003 1039 print(" defaultMSFS:", self._defaultMSFS) 1040 print(" xplaneRemote:", self._xplaneRemote) 1041 print(" xplaneAddress:", self._xplaneAddress) 1004 1042 1005 1043 print(" enableSounds:", self._enableSounds)
Note:
See TracChangeset
for help on using the changeset viewer.