Changeset 15450 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2019-10-10T21:35:19+02:00 (5 years ago)
Author:
Don-vip
Message:

fix #18216 - Adapt 'Merge' button text to 'Merge layer' and 'Merge selection' actions

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java

    r14341 r15450  
    124124     * @param targetLayers list of candidate target layers.
    125125     * @return the chosen layer
    126      */
     126     * @deprecated
     127     */
     128    @Deprecated
    127129    protected static Layer askTargetLayer(List<Layer> targetLayers) {
    128         return askTargetLayer(targetLayers, false, null, false).selectedTargetLayer;
     130        return askTargetLayer(targetLayers, false, null, false, tr("Merge")).selectedTargetLayer;
    129131    }
    130132
     
    135137     * @param checkboxDefault whether the checkbox is ticked by default
    136138     * @return The {@link TargetLayerDialogResult} containing the chosen target layer and the state of the checkbox
    137      */
     139     * @deprecated
     140     */
     141    @Deprecated
    138142    protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, String checkbox, boolean checkboxDefault) {
    139         return askTargetLayer(targetLayers, true, checkbox, checkboxDefault);
     143        return askTargetLayer(targetLayers, true, checkbox, checkboxDefault, tr("Merge"));
    140144    }
    141145
     
    146150     * @param checkbox The text of the checkbox shown to the user.
    147151     * @param checkboxDefault whether the checkbox is ticked by default
     152     * @param buttonText text of button used to select target layer
    148153     * @return The {@link TargetLayerDialogResult} containing the chosen target layer and the state of the checkbox
     154     * @since 15450
    149155     */
    150156    protected static TargetLayerDialogResult<Layer> askTargetLayer(List<Layer> targetLayers, boolean showCheckbox,
    151             String checkbox, boolean checkboxDefault) {
     157            String checkbox, boolean checkboxDefault, String buttonText) {
    152158        return askTargetLayer(targetLayers.toArray(new Layer[0]),
    153159                tr("Please select the target layer."), checkbox,
    154160                tr("Select target layer"),
    155                 tr("Merge"), "dialogs/mergedown", showCheckbox, checkboxDefault);
     161                buttonText, "dialogs/mergedown", showCheckbox, checkboxDefault);
    156162    }
    157163
  • trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java

    r14397 r15450  
    5555        final TargetLayerDialogResult<Layer> res = askTargetLayer(targetLayers, onlygpx,
    5656                tr("Cut timewise overlapping parts of tracks"),
    57                 onlygpx && Config.getPref().getBoolean("mergelayer.gpx.cut", false));
     57                onlygpx && Config.getPref().getBoolean("mergelayer.gpx.cut", false), tr("Merge layer"));
    5858        final Layer targetLayer = res.selectedTargetLayer;
    5959        if (targetLayer == null)
  • trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java

    r14397 r15450  
    4848            return;
    4949        }
    50         Layer targetLayer = askTargetLayer(targetLayers);
     50        Layer targetLayer = askTargetLayer(targetLayers, false, null, false, tr("Merge selection")).selectedTargetLayer;
    5151        if (targetLayer == null)
    5252            return;
Note: See TracChangeset for help on using the changeset viewer.