Changeset 825:7d3e38a81acc


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

Added a confirmation question before marking flights for reflying (re #307)

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • locale/en/mlx.po

    r824 r825  
    24712471msgstr "Marking flights(s) for reflying"
    24722472
     2473msgid "pendflt_refly_question"
     2474msgstr "Are you sure to refly the selected flight(s)?"
     2475
    24732476msgid "flight_delete_question"
    24742477msgstr "Are you sure to delete the selected flight(s)?"
  • locale/hu/mlx.po

    r824 r825  
    24882488msgstr "A járatok megjelölése újrarepülésre"
    24892489
     2490msgid "pendflt_refly_question"
     2491msgstr "Biztosan újra szeretnéd repülni a kiválasztott járato(ka)t?"
     2492
    24902493msgid "flight_delete_question"
    24912494msgstr "Biztosan törölni szerednéd a kiválasztott járato(ka)t?"
  • src/mlx/gui/flightlist.py

    r824 r825  
    309309    def _reflyClicked(self, button):
    310310        """Called when the Refly button is clicked."""
    311         gui = self._wizard.gui
    312         gui.beginBusy(xstr("pendflt_refly_busy"))
    313         self.set_sensitive(False)
    314 
    315         flightIDs = [self._flights[i].id
    316                      for i in self._flightList.selectedIndexes]
    317         gui.webHandler.reflyFlights(self._reflyResultCallback, flightIDs)
     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:
     323            gui = self._wizard.gui
     324            gui.beginBusy(xstr("pendflt_refly_busy"))
     325            self.set_sensitive(False)
     326
     327            flightIDs = [self._flights[i].id
     328                        for i in self._flightList.selectedIndexes]
     329            gui.webHandler.reflyFlights(self._reflyResultCallback, flightIDs)
    318330
    319331    def _reflyResultCallback(self, returned, result):
Note: See TracChangeset for help on using the changeset viewer.