Changeset 392:ddb312cb8a3d for src/mlx/config.py
- Timestamp:
- 12/22/12 09:05:16 (11 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r373 r392 234 234 235 235 self._pirepDirectory = None 236 self._pirepAutoSave = False 236 237 237 238 self._enableSounds = not secondaryInstallation … … 453 454 self._pirepDirectory = None if pirepDirectory=="" \ 454 455 else pirepDirectory 456 if self._pirepDirectory is None: 457 self._pirepAutoSave = False 458 self._modified = True 459 460 @property 461 def pirepAutoSave(self): 462 """Get whether the PIREP should be saved automatically when it becomes 463 saveable.""" 464 return self._pirepAutoSave 465 466 @pirepAutoSave.setter 467 def pirepAutoSave(self, pirepAutoSave): 468 """Set whether the PIREP should be saved automatically when it becomes 469 saveable.""" 470 pirepAutoSave = pirepAutoSave and self._pirepDirectory is not None 471 if pirepAutoSave!=self._pirepAutoSave: 472 self._pirepAutoSave = pirepAutoSave 455 473 self._modified = True 456 474 … … 649 667 "pirepDirectory", None) 650 668 669 self._pirepAutoSave = self._get(config, "general", 670 "pirepAutoSave", False) 671 self._pirepAutoSave = self._pirepAutoSave and \ 672 self._pirepAutoSave is not None 673 651 674 self._messageTypeLevels = {} 652 675 for messageType in const.messageTypes: … … 720 743 if self._pirepDirectory is not None: 721 744 config.set("general", "pirepDirectory", self._pirepDirectory) 745 config.set("general", "pirepAutoSave", 746 "yes" if self._pirepAutoSave else "no") 722 747 723 748 config.add_section(Config._messageTypesSection)
Note:
See TracChangeset
for help on using the changeset viewer.