Changeset 738:d51ccfc6e8a9 for src
- Timestamp:
- 01/02/16 12:09:24 (9 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r733 r738 258 258 if secondaryInstallation: 259 259 self._updateURL += "/exp" 260 self._useRPC = True 260 261 261 262 self._messageTypeLevels = {} … … 666 667 if updateURL!=self._updateURL: 667 668 self._updateURL = updateURL 669 self._modified = True 670 671 @property 672 def useRPC(self): 673 """Determine if RPC calls should be used.""" 674 return self._useRPC 675 676 @useRPC.setter 677 def useRPC(self, useRPC): 678 """Set whether RPC calls should be used.""" 679 if useRPC!=self._useRPC: 680 self._useRPC = useRPC 668 681 self._modified = True 669 682 … … 775 788 Config.DEFAULT_UPDATE_URL + 776 789 ("/exp" if secondaryInstallation else "")) 790 self._useRPC = self._getBoolean(config, "general", "useRPC", True) 777 791 778 792 for aircraftType in const.aircraftTypes: … … 867 881 config.set("update", "url", self._updateURL) 868 882 883 config.set("general", "useRPC", 884 "yes" if self._useRPC else "no") 885 869 886 config.add_section(Checklist.SECTION) 870 887 config.add_section(ApproachCallouts.SECTION) … … 1001 1018 print " autoUpdate:", self._autoUpdate 1002 1019 print " updateURL:", self._updateURL 1020 print " useRPC:", self._useRPC 1003 1021 1004 1022 print " messageTypeLevels:" -
src/mlx/gui/prefs.py
r684 r738 276 276 277 277 self._updateURL.set_text(config.updateURL) 278 279 self._useRPC.set_active(config.useRPC) 278 280 279 281 self._settingFromConfig = False … … 320 322 config.autoUpdate = self._autoUpdate.get_active() 321 323 config.updateURL = self._updateURL.get_text() 324 config.useRPC = self._useRPC.get_active() 322 325 323 326 def _buildGeneral(self): … … 814 817 updateURLBox.pack_start(self._updateURL, True, True, 4) 815 818 819 self._useRPC = gtk.CheckButton(xstr("prefs_use_rpc")) 820 mainBox.pack_start(self._useRPC, False, False, 16) 821 822 self._useRPC.set_use_underline(True) 823 self._useRPC.set_tooltip_text(xstr("prefs_use_rpc_tooltip")) 824 816 825 return mainAlignment 817 826
Note:
See TracChangeset
for help on using the changeset viewer.