Changeset 208:22ff615383e9 for src/mlx/gui/gui.py
- Timestamp:
- 05/31/12 14:59:58 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/gui.py
r204 r208 402 402 self._flightInfo.enable() 403 403 404 def cancelFlight(self): 405 """Cancel the current file, if the user confirms it.""" 406 dialog = gtk.MessageDialog(parent = self._mainWindow, 407 type = MESSAGETYPE_QUESTION, 408 message_format = xstr("cancelFlight_question")) 409 410 dialog.add_button(xstr("button_no"), RESPONSETYPE_NO) 411 dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES) 412 413 dialog.set_title(WINDOW_TITLE_BASE) 414 result = dialog.run() 415 dialog.hide() 416 417 if result==RESPONSETYPE_YES: 418 self.reset() 419 404 420 def reset(self): 405 421 """Reset the GUI.""" … … 412 428 self._weightHelp.reset() 413 429 self._weightHelp.disable() 414 self._wizard.reset()415 430 self._notebook.set_current_page(0) 416 431 417 432 self._logView.get_buffer().set_text("") 433 434 self._wizard.reloadFlights(self._handleReloadResult) 435 436 def _handleReloadResult(self, returned, result): 437 """Handle the result of the reloading of the flights.""" 438 self._wizard.reset(result if returned and result.loggedIn else None) 418 439 419 440 def _disconnect(self, closingMessage = None, duration = 3):
Note:
See TracChangeset
for help on using the changeset viewer.