Changeset 607:d0dccf044560 for src/mlx
- Timestamp:
- 03/01/15 18:40:59 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r605 r607 3269 3269 """Update the sensitivity state of the buttons.""" 3270 3270 gui = self._wizard.gui 3271 faultsExplained = gui.faultsFullyExplained 3272 timesCorrect = self.flightType is None or \ 3273 not self._tooBigTimeDifference or \ 3274 gui.hasComments or gui.hasDelayCode 3271 3275 sensitive = self._flightType.get_active()>=0 and \ 3272 3276 (self._gatesModel.get_iter_first() is None or 3273 3277 self._gate.get_active()>=0) and \ 3274 (not self._tooBigTimeDifference or3275 gui.hasComments or gui.hasDelayCode) and \ 3276 gui.faultsFullyExplained3278 faultsExplained and timesCorrect 3279 3280 self._updateHelp(faultsExplained, timesCorrect) 3277 3281 3278 3282 wasSensitive = self._saveButton.get_sensitive() … … 3511 3515 self._tooBigTimeDifference = departureError or arrivalError 3512 3516 3513 if self._tooBigTimeDifference and self.flightType is not None:3514 self.setHelp(xstr("finish_help") + xstr("finish_help_wrongtime"))3515 else:3516 self.setHelp(xstr("finish_help") + xstr("finish_help_goodtime"))3517 3518 3517 self._depTime.set_markup(self._formatTime(bookedFlight.departureTime, 3519 3518 flight.blockTimeStart, … … 3527 3526 3528 3527 self.updateButtons() 3528 3529 def _updateHelp(self, faultsExplained, timesCorrect): 3530 """Update the help text according to the actual situation.""" 3531 if not faultsExplained: 3532 self.setHelp(xstr("finish_help") + xstr("finish_help_faults")) 3533 elif not timesCorrect: 3534 self.setHelp(xstr("finish_help") + xstr("finish_help_wrongtime")) 3535 else: 3536 self.setHelp(xstr("finish_help") + xstr("finish_help_goodtime")) 3537 3529 3538 3530 3539 #-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.