Changeset 275:155f94c971e0
- Timestamp:
- 07/07/12 06:33:14 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/flight.py
r274 r275 98 98 99 99 self._wizard = wizard 100 101 self._cancelFlightButton = None 100 102 101 103 self._completed = False … … 126 128 def addCancelFlightButton(self): 127 129 """Add the 'Cancel flight' button to the page.""" 128 return self.addButton(xstr("button_cancelFlight"), 129 sensitive = True, 130 tooltip = xstr("button_cancelFlight_tooltip"), 131 clicked = self._cancelFlight, 132 padding = 16) 130 self._cancelFlightButton = \ 131 self.addButton(xstr("button_cancelFlight"), 132 sensitive = True, 133 tooltip = xstr("button_cancelFlight_tooltip"), 134 clicked = self._cancelFlight, 135 padding = 16) 136 return self._cancelFlightButton 133 137 134 138 def addPreviousButton(self, sensitive = True, clicked = None): … … 193 197 self._completed = False 194 198 self._fromPage = None 199 if self._cancelFlightButton is not None: 200 self._cancelFlightButton.set_sensitive(True) 195 201 196 202 def goBack(self): … … 199 205 200 206 self._wizard.setCurrentPage(self._fromPage, finalize = False) 207 208 def flightEnded(self): 209 """Called when the flight has ended. 210 211 This default implementation disables the cancel flight button.""" 212 if self._cancelFlightButton is not None: 213 self._cancelFlightButton.set_sensitive(False) 201 214 202 215 def _cancelFlight(self, button): … … 2190 2203 def flightEnded(self): 2191 2204 """Called when the flight has ended.""" 2205 super(LandingPage, self).flightEnded() 2192 2206 self._flightEnded = True 2193 2207 self._updateForwardButton() … … 2854 2868 2855 2869 elif stage==const.STAGE_END: 2856 self._landingPage.flightEnded() 2870 for page in self._pages: 2871 page.flightEnded() 2857 2872 2858 2873 def _initialize(self, keepLoginResult = False, loginResult = None):
Note:
See TracChangeset
for help on using the changeset viewer.