Changeset 131:822f47eec5a8 for src/mlx
- Timestamp:
- 04/30/12 08:43:22 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r124 r131 34 34 self._autoUpdate = True 35 35 self._updateURL = Config.DEFAULT_UPDATE_URL 36 36 37 37 self._language = "" 38 self._flareTimeFromFS = False 38 39 39 40 self._modified = False … … 88 89 89 90 @property 91 def flareTimeFromFS(self): 92 """Get whether the flare time should be calculated from the time values 93 returned by the simulator.""" 94 return self._flareTimeFromFS 95 96 @flareTimeFromFS.setter 97 def flareTimeFromFS(self, flareTimeFromFS): 98 """Set whether the flare time should be calculated from the time values 99 returned by the simulator.""" 100 if flareTimeFromFS!=self._flareTimeFromFS: 101 self._flareTimeFromFS = flareTimeFromFS 102 self._modified = True 103 104 @property 90 105 def autoUpdate(self): 91 106 """Get if an automatic update is needed.""" … … 126 141 127 142 self._language = self._get(config, "general", "language", "") 143 self._flareTimeFromFS = self._getBoolean(config, "general", 144 "flareTimeFromFS", 145 False) 128 146 129 147 self._modified = False … … 150 168 if self._language: 151 169 config.set("general", "language", self._language) 170 config.set("general", "flareTimeFromFS", 171 "yes" if self._flareTimeFromFS else "no") 152 172 153 173 try: -
src/mlx/gui/gui.py
r130 r131 673 673 674 674 self._flight = flight.Flight(self._logger, self) 675 self._flight.flareTimeFromFS = self.config.flareTimeFromFS 675 676 self._flight.aircraftType = aircraftType 676 677 self._flight.aircraft = acft.Aircraft.create(self._flight) -
src/mlx/gui/prefs.py
r124 r131 61 61 """Setup the dialog from the given configuration.""" 62 62 self._setLanguage(config.language) 63 self._flareTimeFromFS.set_active(config.flareTimeFromFS) 63 64 64 65 self._togglingAutoUpdate = True … … 73 74 """Setup the given config from the settings in the dialog.""" 74 75 config.language = self._getLanguage() 76 config.flareTimeFromFS = self._flareTimeFromFS.get_active() 75 77 config.autoUpdate = self._autoUpdate.get_active() 76 78 config.updateURL = self._updateURL.get_text() … … 107 109 languageBox.pack_start(languageComboBox, False, False, 4) 108 110 111 label.set_mnemonic_widget(languageComboBox) 112 109 113 self._changingLanguage = False 110 114 self._warnedRestartNeeded = False 111 115 112 label.set_mnemonic_widget(languageComboBox) 116 self._flareTimeFromFS = gtk.CheckButton(xstr("prefs_flaretimeFromFS")) 117 self._flareTimeFromFS.set_use_underline(True) 118 self._flareTimeFromFS.set_tooltip_text(xstr("prefs_flaretimeFromFS_tooltip")) 119 120 mainBox.pack_start(self._flareTimeFromFS, False, False, 4) 113 121 114 122 return mainAlignment -
src/mlx/i18n.py
r130 r131 557 557 self.add("prefs_lang_en_GB", "English") 558 558 self.add("prefs_lang_hu_HU", "Hungarian") 559 self.add("prefs_flaretimeFromFS", 560 "Take flare _time from the simulator") 561 self.add("prefs_flaretimeFromFS_tooltip", 562 "If this is checked, the time of the flare will be calculated " 563 "from timestamps returned by the simulator.") 559 564 self.add("prefs_update_auto", "Update the program auto_matically") 560 565 self.add("prefs_update_auto_tooltip", … … 1023 1028 self.add("prefs_lang_en_GB", "angol") 1024 1029 self.add("prefs_lang_hu_HU", "magyar") 1030 self.add("prefs_flaretimeFromFS", 1031 "A ki_lebegtetés idejét vedd a szimulátorból") 1032 self.add("prefs_flaretimeFromFS_tooltip", 1033 "Ha ezt bejelölöd, a kilebegtetés idejét a szimulátor " 1034 "által visszaadott időbélyegek alapján számolja a program.") 1025 1035 self.add("prefs_update_auto", 1026 1036 "Frissítsd a programot _automatikusan")
Note:
See TracChangeset
for help on using the changeset viewer.