Changeset 864:b154a5d879cb
- Timestamp:
- 06/18/17 17:59:30 (8 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
locale/en/mlx.po
r863 r864 482 482 msgstr "Printing failed" 483 483 484 msgid "flightsel_delete" 485 msgstr "_Delete flight..." 486 487 msgid "flightsel_delete_tooltip" 488 msgstr "Click here to delete the currently selected flight." 489 490 msgid "flightsel_delete_confirm" 491 msgstr "Are you sure to delete the selected flight?" 492 493 msgid "flightsel_delete_busy" 494 msgstr "Deleting flight..." 495 484 496 msgid "flightsel_save_title" 485 497 msgstr "Save a flight into a file" … … 520 532 msgid "flightsel_popup_save" 521 533 msgstr "S_ave..." 534 535 msgid "flightsel_popup_delete" 536 msgstr "_Delete..." 522 537 523 538 msgid "fleet_busy" -
locale/hu/mlx.po
r863 r864 482 482 msgstr "A nyomtatás nem sikerült" 483 483 484 msgid "flightsel_delete" 485 msgstr "Járat _törlése..." 486 487 msgid "flightsel_delete_tooltip" 488 msgstr "" 489 "Ezzel a gombbal letörölheted a kiválasztott járatot." 490 491 msgid "flightsel_delete_confirm" 492 msgstr "Biztosan törölni szeretnéd a kiválasztott járatot?" 493 494 msgid "flightsel_delete_busy" 495 msgstr "Járat törlése..." 496 484 497 msgid "flightsel_save_title" 485 498 msgstr "Járat mentése fájlba" … … 522 535 msgid "flightsel_popup_save" 523 536 msgstr "_Mentés..." 537 538 msgid "flightsel_popup_delete" 539 msgstr "_Törlés..." 524 540 525 541 msgid "fleet_busy" -
src/mlx/gui/flight.py
r863 r864 492 492 flightButtonWidthBox.pack_start(self._printButton, True, True, 4) 493 493 494 self._deleteButton = gtk.Button(xstr("flightsel_delete")) 495 self._deleteButton.set_use_underline(True) 496 self._deleteButton.set_sensitive(False) 497 self._deleteButton.set_tooltip_text(xstr("flightsel_delete_tooltip")) 498 self._deleteButton.connect("clicked", self._deleteClicked) 499 500 flightButtonWidthBox.pack_start(self._deleteButton, True, True, 4) 494 501 495 502 flightButtonWidthAlignment.add(flightButtonWidthBox) … … 648 655 def _printClicked(self, button): 649 656 """Called when the Print briefing button is clicked.""" 657 self._printSelected() 658 659 def _printSelected(self): 660 """Print the briefing for the selected flight.""" 650 661 wizard = self._wizard 651 662 flight = self._getSelectedFlight() … … 843 854 cr.stroke() 844 855 856 def _deleteClicked(self, button): 857 """Called when the Delete flight button is clicked.""" 858 self._deleteSelected() 859 860 def _deleteSelected(self): 861 """Delete the selected flight.""" 862 if askYesNo(xstr("flightsel_delete_confirm"), 863 parent = self._wizard.gui.mainWindow): 864 flight = self._getSelectedFlight() 865 gui = self._wizard.gui 866 gui.beginBusy(xstr("flightsel_delete_busy")) 867 868 gui.webHandler.deleteFlights(self._deleteResultCallback, 869 [flight.id]) 870 871 def _deleteResultCallback(self, returned, result): 872 """Called when the deletion result is available.""" 873 gobject.idle_add(self._handleDeleteResult, returned, result) 874 875 def _handleDeleteResult(self, returned, result): 876 """Handle the delete result.""" 877 gui = self._wizard.gui 878 gui.endBusy() 879 880 if returned: 881 indexes = self._flightList.selectedIndexes 882 883 flights = [self._flights[index] for index in indexes] 884 885 self._flightList.removeFlights(indexes) 886 for index in indexes[::-1]: 887 del self._flights[index] 888 else: 889 communicationErrorDialog() 890 891 845 892 def _refreshClicked(self, button): 846 893 """Called when the refresh button is clicked.""" … … 858 905 self._saveButton.set_sensitive(len(indexes)==1) 859 906 self._printButton.set_sensitive(len(indexes)==1) 907 self._deleteButton.set_sensitive(len(indexes)==1) 860 908 self._updateNextButton() 861 909 … … 1042 1090 menu.append(menuItem) 1043 1091 1092 menuItem = gtk.MenuItem() 1093 menuItem.set_label(xstr("flightsel_popup_delete")) 1094 menuItem.set_use_underline(True) 1095 menuItem.connect("activate", self._popupDelete) 1096 menuItem.show() 1097 1098 menu.append(menuItem) 1099 1044 1100 return menu 1045 1101 … … 1053 1109 if not self._completed: 1054 1110 self._saveSelected() 1111 1112 def _popupDelete(self, menuItem): 1113 """Called when the Delete menu item is activated in the popup menu.""" 1114 if not self._completed: 1115 self._deleteSelected() 1055 1116 1056 1117 #-----------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.