Changeset 136:6d206b573dee for src/mlx/gui
- Timestamp:
- 04/30/12 15:21:44 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r130 r136 413 413 """Update the departure gate for the booked flight.""" 414 414 flight = self._wizard._bookedFlight 415 if flight.departureICAO=="LHBP": 416 self._wizard.getFleet(self._fleetRetrieved) 415 if self._wizard.gui.config.onlineGateSystem: 416 if flight.departureICAO=="LHBP": 417 self._wizard.getFleet(self._fleetRetrieved) 418 else: 419 self._wizard.updatePlane(self._planeUpdated, 420 flight.tailNumber, 421 const.PLANE_AWAY) 417 422 else: 418 self._ wizard.updatePlane(self._planeUpdated,419 flight.tailNumber,420 const.PLANE_AWAY)423 self._nextDistance = 2 424 self._wizard.jumpPage(2) 425 421 426 def _fleetRetrieved(self, fleet): 422 427 """Called when the fleet has been retrieved.""" … … 1669 1674 def _forwardClicked(self, button): 1670 1675 """Called when the forward button is clicked.""" 1671 if not self._completed and \ 1676 if self._wizard.gui.config.onlineGateSystem and \ 1677 not self._completed and \ 1672 1678 self._wizard.bookedFlight.arrivalICAO=="LHBP": 1673 1679 self._wizard.getFleet(callback = self._fleetRetrieved, … … 1868 1874 1869 1875 self._gatesModel.clear() 1870 if self._wizard.bookedFlight.arrivalICAO=="LHBP": 1876 if self._wizard.gui.config.onlineGateSystem and \ 1877 self._wizard.bookedFlight.arrivalICAO=="LHBP": 1871 1878 occupiedGates = self._wizard._fleet.getOccupiedGateNumbers() 1872 1879 for gateNumber in const.lhbpGateNumbers: … … 1945 1952 dialog.hide() 1946 1953 1947 if returned and result.success:1954 if self._wizard.gui.config.onlineGateSystem and returned and result.success: 1948 1955 bookedFlight = self._wizard.bookedFlight 1949 1956 if bookedFlight.arrivalICAO=="LHBP": -
src/mlx/gui/prefs.py
r132 r136 67 67 """Setup the dialog from the given configuration.""" 68 68 self._setLanguage(config.language) 69 self._onlineGateSystem.set_active(config.onlineGateSystem) 69 70 self._flareTimeFromFS.set_active(config.flareTimeFromFS) 70 71 … … 89 90 """Setup the given config from the settings in the dialog.""" 90 91 config.language = self._getLanguage() 92 config.onlineGateSystem = self._onlineGateSystem.get_active() 91 93 config.flareTimeFromFS = self._flareTimeFromFS.get_active() 92 94 … … 142 144 self._warnedRestartNeeded = False 143 145 146 self._onlineGateSystem = gtk.CheckButton(xstr("prefs_onlineGateSystem")) 147 self._onlineGateSystem.set_use_underline(True) 148 self._onlineGateSystem.set_tooltip_text(xstr("prefs_onlineGateSystem_tooltip")) 149 mainBox.pack_start(self._onlineGateSystem, False, False, 4) 150 144 151 self._flareTimeFromFS = gtk.CheckButton(xstr("prefs_flaretimeFromFS")) 145 152 self._flareTimeFromFS.set_use_underline(True) 146 153 self._flareTimeFromFS.set_tooltip_text(xstr("prefs_flaretimeFromFS_tooltip")) 147 148 154 mainBox.pack_start(self._flareTimeFromFS, False, False, 4) 149 155
Note:
See TracChangeset
for help on using the changeset viewer.