Changeset 12279 in josm for trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
- Timestamp:
- 2017-05-30T15:12:36+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/OsmDataLayer.java
r12176 r12279 659 659 @Override public Action[] getMenuEntries() { 660 660 List<Action> actions = new ArrayList<>(); 661 actions.addAll(Arrays.asList( new Action[]{661 actions.addAll(Arrays.asList( 662 662 LayerListDialog.getInstance().createActivateLayerAction(this), 663 663 LayerListDialog.getInstance().createShowHideLayerAction(), … … 667 667 LayerListDialog.getInstance().createDuplicateLayerAction(this), 668 668 new LayerSaveAction(this), 669 new LayerSaveAsAction(this), 670 })); 669 new LayerSaveAsAction(this))); 671 670 if (ExpertToggleAction.isExpert()) { 672 actions.addAll(Arrays.asList( new Action[]{671 actions.addAll(Arrays.asList( 673 672 new LayerGpxExportAction(this), 674 new ConvertToGpxLayerAction() }));675 } 676 actions.addAll(Arrays.asList( new Action[]{673 new ConvertToGpxLayerAction())); 674 } 675 actions.addAll(Arrays.asList( 677 676 SeparatorLayerAction.INSTANCE, 678 new RenameLayerAction(getAssociatedFile(), this) }));677 new RenameLayerAction(getAssociatedFile(), this))); 679 678 if (ExpertToggleAction.isExpert()) { 680 679 actions.add(new ToggleUploadDiscouragedLayerAction(this)); 681 680 } 682 actions.addAll(Arrays.asList( new Action[]{681 actions.addAll(Arrays.asList( 683 682 new ConsistencyTestAction(), 684 683 SeparatorLayerAction.INSTANCE, 685 new LayerListPopup.InfoAction(this) }));684 new LayerListPopup.InfoAction(this))); 686 685 return actions.toArray(new Action[actions.size()]); 687 686 } … … 1054 1053 return 2; 1055 1054 } 1056 ExtendedDialog dialog =new ExtendedDialog(1055 return new ExtendedDialog( 1057 1056 Main.parent, 1058 1057 tr("Empty document"), 1059 new String[] {tr("Save anyway"), tr("Cancel")} 1060 ); 1061 dialog.setContent(tr("The document contains no data.")); 1062 dialog.setButtonIcons(new String[] {"save", "cancel"}); 1063 return dialog.showDialog().getValue(); 1058 tr("Save anyway"), tr("Cancel")) 1059 .setContent(tr("The document contains no data.")) 1060 .setButtonIcons("save", "cancel") 1061 .showDialog().getValue(); 1064 1062 })) { 1065 1063 return false; … … 1068 1066 ConflictCollection conflictsCol = getConflicts(); 1069 1067 return conflictsCol == null || conflictsCol.isEmpty() || 1 == GuiHelper.runInEDTAndWaitAndReturn(() -> { 1070 ExtendedDialog dialog =new ExtendedDialog(1068 return new ExtendedDialog( 1071 1069 Main.parent, 1072 1070 /* I18N: Display title of the window showing conflicts */ 1073 1071 tr("Conflicts"), 1074 new String[] {tr("Reject Conflicts and Save"), tr("Cancel")} 1075 ); 1076 dialog.setContent( 1077 tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?")); 1078 dialog.setButtonIcons(new String[] {"save", "cancel"}); 1079 return dialog.showDialog().getValue(); 1072 tr("Reject Conflicts and Save"), tr("Cancel")) 1073 .setContent( 1074 tr("There are unresolved conflicts. Conflicts will not be saved and handled as if you rejected all. Continue?")) 1075 .setButtonIcons("save", "cancel") 1076 .showDialog().getValue(); 1080 1077 }); 1081 1078 }
Note:
See TracChangeset
for help on using the changeset viewer.