Changeset 126:1ab5a6f817e1 for src


Ignore:
Timestamp:
04/29/12 07:59:20 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Fixed fleet retrieval

File:
1 edited

Legend:

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

    r124 r126  
    414414        flight = self._wizard._bookedFlight
    415415        if flight.departureICAO=="LHBP":
    416             self._wizard.gui.getFleet(self._fleetRetrieved)
     416            self._wizard.getFleet(self._fleetRetrieved)
    417417        else:
    418418            self._nextDistance = 2
     
    530530            dialog.hide()
    531531
    532             self._wizard.gui.getFleet(self._fleetRetrieved)
     532            self._wizard.getFleet(self._fleetRetrieved)
    533533
    534534    def _fleetRetrieved(self, fleet):
     
    21182118       
    21192119        self.setCurrentPage(0)
     2120
     2121    def getFleet(self, callback):
     2122        """Get the fleet via the GUI and call the given callback."""
     2123        self._fleetCallback = callback
     2124        self.gui.getFleet(self._fleetRetrieved)
     2125
     2126    def _fleetRetrieved(self, fleet):
     2127        """Callback for the fleet retrieval."""
     2128        self._fleet = fleet
     2129        if self._fleetCallback is not None:
     2130            self._fleetCallback(fleet)
     2131        self._fleetCallback = None
    21202132       
    21212133    def _updatePlane(self, callback, tailNumber, status, gateNumber = None):
Note: See TracChangeset for help on using the changeset viewer.