Changeset 605:f508c2cac441


Ignore:
Timestamp:
03/01/15 18:22:09 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The finish page also checks for the presence of all explanations (re #248)

Location:
src/mlx/gui
Files:
3 edited

Legend:

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

    r592 r605  
    32733273                     self._gate.get_active()>=0) and \
    32743274                    (not self._tooBigTimeDifference or
    3275                      gui.hasComments or gui.hasDelayCode)
     3275                     gui.hasComments or gui.hasDelayCode) and \
     3276                    gui.faultsFullyExplained
    32763277
    32773278        wasSensitive = self._saveButton.get_sensitive()
     
    40214022        self._finishPage.updateButtons()
    40224023
     4024    def faultExplanationsChanged(self):
     4025        """Called when the faults and their explanations have changed."""
     4026        self._finishPage.updateButtons()
     4027
    40234028    def rtoToggled(self, indicated):
    40244029        """Called when the RTO indication has changed."""
  • src/mlx/gui/gui.py

    r604 r605  
    408408        return self._flightInfo.hasDelayCode
    409409
     410    @property
     411    def faultsFullyExplained(self):
     412        """Determine if all the faults have been fully explained by the
     413        user."""
     414        return self._flightInfo.faultsFullyExplained
     415
    410416    def run(self):
    411417        """Run the GUI."""
     
    809815        """Called when the delay codes have changed."""
    810816        self._wizard.delayCodesChanged()
     817
     818    def faultExplanationsChanged(self):
     819        """Called when the status of the explanations of the faults have
     820        changed."""
     821        self._wizard.faultExplanationsChanged()
    811822
    812823    def updateRTO(self, inLoop = False):
  • src/mlx/gui/info.py

    r604 r605  
    6969
    7070        self._faultExplainWidget = FaultExplainWidget()
     71        self._faultExplainWidget.connect("explanations-changed",
     72                                         self._faultExplanationsChanged)
    7173        commentsBox.pack_start(self._faultExplainWidget, True, True, 8)
    7274
     
    128130        return self._delayCodeTable.hasDelayCode
    129131
     132    @property
     133    def faultsFullyExplained(self):
     134        """Determine if all the faults have been explained by the pilot."""
     135        return self._faultExplainWidget.fullyExplained
     136
    130137    def addFault(self, id, faultText):
    131138        """Add a fault to the list of faults."""
     
    168175        """Called when the comments have changed."""
    169176        self._gui.commentsChanged()
     177
     178    def _faultExplanationsChanged(self, faultExplainWidget, fullyExplained):
     179        """Called when the status of the fault explanations has changed."""
     180        self._gui.faultExplanationsChanged()
Note: See TracChangeset for help on using the changeset viewer.