Changeset 810:2414e2751578 for src/mlx/gui
- Timestamp:
- 09/08/16 07:33:24 (8 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r805 r810 511 511 def activate(self): 512 512 """Fill the flight list.""" 513 self._setupHelp() 513 514 self._flightList.set_sensitive(True) 514 515 self._loadButton.set_sensitive(True) … … 521 522 self._loadButton.set_sensitive(False) 522 523 self._refreshButton.set_sensitive(False) 524 525 def _setupHelp(self): 526 """Setup the help string""" 527 help = "" 528 529 if self._wizard.loggedIn: 530 numReported = len(self._wizard.loginResult.reportedFlights) 531 numRejected = len(self._wizard.loginResult.rejectedFlights) 532 if numReported==0 and numRejected==0: 533 help = xstr("flightsel_prehelp_nopending") 534 elif numReported>0 and numRejected==0: 535 help = xstr("flightsel_prehelp_rep_0rej") % (numReported,) 536 elif numReported==0 and numRejected>0: 537 help = xstr("flightsel_prehelp_0rep_rej") % (numRejected,) 538 else: 539 help = xstr("flightsel_prehelp_rep_rej") % \ 540 (numReported, numRejected) 541 542 help += xstr("flightsel_help") 543 544 self.setHelp(help) 523 545 524 546 def _buildFlights(self): … … 581 603 def _refreshCallback(self, returned, result): 582 604 """Callback for the refresh.""" 583 if returned and result.loggedIn: 584 self._buildFlights() 605 if returned: 606 self._setupHelp() 607 if result.loggedIn: 608 self._buildFlights() 585 609 586 610 def _selectionChanged(self, selection):
Note:
See TracChangeset
for help on using the changeset viewer.