- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r689 r503 211 211 class Config(object): 212 212 """Our configuration.""" 213 DEFAULT_UPDATE_URL = "http://mlx.varadiistvan.hu/update /cef"213 DEFAULT_UPDATE_URL = "http://mlx.varadiistvan.hu/update" 214 214 215 215 _messageTypesSection = "messageTypes" … … 233 233 self._vsSmoothingLength = -2 234 234 235 self._useSimBrief = False236 self._simBriefUserName = ""237 self._simBriefPassword = ""238 self._rememberSimBriefPassword = False239 240 235 self._pirepDirectory = None 241 236 self._pirepAutoSave = False … … 447 442 if vsSmoothingLength!=self._vsSmoothingLength: 448 443 self._vsSmoothingLength = vsSmoothingLength 449 self._modified = True450 451 @property452 def useSimBrief(self):453 """Check if SimBrief should be used."""454 return self._useSimBrief455 456 @useSimBrief.setter457 def useSimBrief(self, useSimBrief):458 """Check if SimBrief should be used."""459 if self._useSimBrief != useSimBrief:460 self._useSimBrief = useSimBrief461 self._modified = True462 463 @property464 def simBriefUserName(self):465 """Get the SimBrief user name last used"""466 return self._simBriefUserName467 468 @simBriefUserName.setter469 def simBriefUserName(self, simBriefUserName):470 """Set the SimBrief user name to be used next."""471 if self._simBriefUserName != simBriefUserName:472 self._simBriefUserName = simBriefUserName473 self._modified = True474 475 @property476 def simBriefPassword(self):477 """Get the SimBrief password last used"""478 return self._simBriefPassword479 480 @simBriefPassword.setter481 def simBriefPassword(self, simBriefPassword):482 """Set the SimBrief password to be used next."""483 if self._simBriefPassword != simBriefPassword:484 self._simBriefPassword = simBriefPassword485 self._modified = True486 487 @property488 def rememberSimBriefPassword(self):489 """Get if we should remember the SimBrief password."""490 return self._rememberSimBriefPassword491 492 @rememberSimBriefPassword.setter493 def rememberSimBriefPassword(self, rememberSimBriefPassword):494 """Set if we should remember the SimBrief password."""495 if rememberSimBriefPassword!=self._rememberSimBriefPassword:496 self._rememberSimBriefPassword = rememberSimBriefPassword497 444 self._modified = True 498 445 … … 731 678 "vsSmoothingLength", 732 679 -2)) 733 734 self._useSimBrief = self._getBoolean(config, "simbrief",735 "use", False)736 self._simBriefUserName = self._get(config, "simbrief",737 "username", "")738 self._simBriefPassword = self._get(config, "simbrief",739 "password", "")740 self._rememberSimBriefPassword = self._getBoolean(config, "simbrief",741 "rememberPassword",742 False)743 744 680 self._pirepDirectory = self._get(config, "general", 745 681 "pirepDirectory", None) … … 822 758 str(self._vsSmoothingLength)) 823 759 824 config.add_section("simbrief")825 config.set("simbrief", "use",826 "yes" if self._useSimBrief else "no")827 config.set("simbrief", "username", self._simBriefUserName)828 config.set("simbrief", "password", self._simBriefPassword)829 config.set("simbrief", "rememberPassword",830 "yes" if self._rememberSimBriefPassword else "no")831 832 760 if self._pirepDirectory is not None: 833 761 config.set("general", "pirepDirectory", self._pirepDirectory) … … 979 907 print " vsSmoothingLength:", self._vsSmoothingLength 980 908 981 print " useSimBrief:", self._useSimBrief982 print " simBriefUserName:", self._simBriefUserName983 print " rememberSimBriefPassword:", self._rememberSimBriefPassword984 985 909 print " pirepDirectory:", self._pirepDirectory 986 910 print " pirepAutoSave:", self._pirepAutoSave
Note:
See TracChangeset
for help on using the changeset viewer.