Changeset 827:55dd663ff151 for src


Ignore:
Timestamp:
09/25/16 07:58:57 (8 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Made use of the new Yes/No question function (re #307).

File:
1 edited

Legend:

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

    r825 r827  
    309309    def _reflyClicked(self, button):
    310310        """Called when the Refly button is clicked."""
    311         dialog = gtk.MessageDialog(parent = self._window,
    312                                    type = MESSAGETYPE_QUESTION,
    313                                    message_format = xstr("pendflt_refly_question"))
    314 
    315         dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
    316         dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
    317 
    318         dialog.set_title(WINDOW_TITLE_BASE)
    319         result = dialog.run()
    320         dialog.hide()
    321 
    322         if result==RESPONSETYPE_YES:
     311        if askYesNo(xstr("pendflt_refly_question"), parent = self._window):
    323312            gui = self._wizard.gui
    324313            gui.beginBusy(xstr("pendflt_refly_busy"))
     
    356345    def _deleteClicked(self, button):
    357346        """Called when the Delete button is clicked."""
    358         dialog = gtk.MessageDialog(parent = self._window,
    359                                    type = MESSAGETYPE_QUESTION,
    360                                    message_format = xstr("flight_delete_question"))
    361 
    362         dialog.add_button(xstr("button_no"), RESPONSETYPE_NO)
    363         dialog.add_button(xstr("button_yes"), RESPONSETYPE_YES)
    364 
    365         dialog.set_title(WINDOW_TITLE_BASE)
    366         result = dialog.run()
    367         dialog.hide()
    368 
    369         if result==RESPONSETYPE_YES:
     347        if askYesNo(xstr("flight_delete_question"), parent = self._window):
    370348            gui = self._wizard.gui
    371349            gui.beginBusy(xstr("pendflt_refly_busy"))
Note: See TracChangeset for help on using the changeset viewer.