Ignore:
Timestamp:
04/30/12 15:21:44 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added option to enable/disable the online gate system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r130 r136  
    413413        """Update the departure gate for the booked flight."""
    414414        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)
    417422        else:
    418             self._wizard.updatePlane(self._planeUpdated,
    419                                      flight.tailNumber,
    420                                      const.PLANE_AWAY)
     423            self._nextDistance = 2
     424            self._wizard.jumpPage(2)
     425           
    421426    def _fleetRetrieved(self, fleet):
    422427        """Called when the fleet has been retrieved."""
     
    16691674    def _forwardClicked(self, button):
    16701675        """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 \
    16721678           self._wizard.bookedFlight.arrivalICAO=="LHBP":
    16731679            self._wizard.getFleet(callback = self._fleetRetrieved,
     
    18681874
    18691875        self._gatesModel.clear()
    1870         if self._wizard.bookedFlight.arrivalICAO=="LHBP":
     1876        if self._wizard.gui.config.onlineGateSystem and \
     1877           self._wizard.bookedFlight.arrivalICAO=="LHBP":
    18711878            occupiedGates = self._wizard._fleet.getOccupiedGateNumbers()
    18721879            for gateNumber in const.lhbpGateNumbers:
     
    19451952        dialog.hide()
    19461953
    1947         if returned and result.success:
     1954        if self._wizard.gui.config.onlineGateSystem and returned and result.success:
    19481955            bookedFlight = self._wizard.bookedFlight
    19491956            if bookedFlight.arrivalICAO=="LHBP":
Note: See TracChangeset for help on using the changeset viewer.