Cyberduck Mountain Duck CLI

Changeset 42096


Ignore:
Timestamp:
Jul 31, 2017 3:51:28 PM (11 months ago)
Author:
dkocher
Message:

Fix #10024.

Location:
shelves/07.2017
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shelves/07.2017/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/CopyURLMenuDelegate.java

    r41506 r42096  
    6565
    6666    @Override
    67     public void handle(final List<String> selected) {
     67    public void handle(final List<DescriptiveUrl> selected) {
    6868        final StringBuilder url = new StringBuilder();
    69         for(Iterator<String> iter = selected.iterator(); iter.hasNext(); ) {
    70             url.append(iter.next());
     69        for(Iterator<DescriptiveUrl> iter = selected.iterator(); iter.hasNext(); ) {
     70            url.append(iter.next().getUrl());
    7171            if(iter.hasNext()) {
    7272                url.append("\n");
  • shelves/07.2017/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/OpenURLMenuDelegate.java

    r41506 r42096  
    2424import ch.cyberduck.core.UrlProvider;
    2525import ch.cyberduck.core.cdn.DistributionConfiguration;
     26import ch.cyberduck.core.local.BrowserLauncher;
    2627import ch.cyberduck.core.local.BrowserLauncherFactory;
    2728import ch.cyberduck.core.pool.SessionPool;
     
    6061
    6162    @Override
    62     public void handle(final List<String> selected) {
    63         for(String url : selected) {
    64             BrowserLauncherFactory.get().open(url);
     63    public void handle(final List<DescriptiveUrl> selected) {
     64        final BrowserLauncher browser = BrowserLauncherFactory.get();
     65        for(DescriptiveUrl url : selected) {
     66            browser.open(url.getUrl());
    6567        }
    6668    }
  • shelves/07.2017/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/URLMenuDelegate.java

    r41506 r42096  
    4343
    4444import java.util.ArrayList;
    45 import java.util.Collections;
    4645import java.util.Iterator;
    4746import java.util.List;
     
    9897                Iterator<Path> iter = selected.iterator();
    9998                final DescriptiveUrl url = this.getURLs(iter.next()).get(index.intValue() / 2);
    100                 item.setRepresentedObject(url.getUrl());
    10199                item.setTitle(url.getHelp());
    102100                if(url.getType().equals(DescriptiveUrl.Type.provider)) {
     
    129127    @Action
    130128    public void menuItemClicked(final NSMenuItem item) {
    131         this.handle(Collections.singletonList(item.representedObject()));
     129        this.handle(this.getURLs(item.menu().indexOfItem(item), this.getSelected()));
    132130    }
    133131
     
    135133     * @param selected URLs of selected files.
    136134     */
    137     public abstract void handle(final List<String> selected);
     135    public abstract void handle(final List<DescriptiveUrl> selected);
    138136
    139137    @Override
Note: See TracChangeset for help on using the changeset viewer.
swiss made software