Changeset 148:453ebaea9090 for src/mlx/gui
- Timestamp:
- 05/03/12 18:27:13 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r147 r148 699 699 self._simulator = fs.createSimulator(const.SIM_MSFS9, self) 700 700 fs.setupMessageSending(self.config, self._simulator) 701 701 self._setupTimeSync() 702 702 703 self._flight.simulator = self._simulator 703 704 … … 853 854 """Callback for editing the preferences.""" 854 855 self._preferences.run(self.config) 856 self._setupTimeSync() 857 858 def _setupTimeSync(self): 859 """Enable or disable the simulator time synchronization based on the 860 configuration.""" 861 simulator = self._simulator 862 if simulator is not None: 863 if self.config.syncFSTime: 864 simulator.enableTimeSync() 865 else: 866 simulator.disableTimeSync() -
src/mlx/gui/prefs.py
r147 r148 71 71 self._onlineACARS.set_active(config.onlineACARS) 72 72 self._flareTimeFromFS.set_active(config.flareTimeFromFS) 73 self._syncFSTime.set_active(config.syncFSTime) 73 74 74 75 for messageType in const.messageTypes: … … 96 97 config.onlineACARS = self._onlineACARS.get_active() 97 98 config.flareTimeFromFS = self._flareTimeFromFS.get_active() 99 config.syncFSTime = self._syncFSTime.get_active() 98 100 99 101 for messageType in const.messageTypes: … … 167 169 self._flareTimeFromFS.set_tooltip_text(xstr("prefs_flaretimeFromFS_tooltip")) 168 170 mainBox.pack_start(self._flareTimeFromFS, False, False, 4) 171 172 self._syncFSTime = gtk.CheckButton(xstr("prefs_syncFSTime")) 173 self._syncFSTime.set_use_underline(True) 174 self._syncFSTime.set_tooltip_text(xstr("prefs_syncFSTime_tooltip")) 175 mainBox.pack_start(self._syncFSTime, False, False, 4) 169 176 170 177 return mainAlignment
Note:
See TracChangeset
for help on using the changeset viewer.