Changeset 28106 in osm for applications/editors/josm


Ignore:
Timestamp:
2012-03-16T22:50:32+01:00 (13 years ago)
Author:
simon04
Message:

[mirrored_download] More intuitive position of menu entries

Location:
applications/editors/josm/plugins/mirrored_download
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mirrored_download/build.xml

    r27852 r28106  
    8686                <attribute name="Plugin-Description" value="Simplifies download from different read-only APIs."/>
    8787                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/mirrored_download"/>
    88                 <attribute name="Plugin-Mainversion" value="4980"/>
     88                <attribute name="Plugin-Mainversion" value="5089"/>
    8989                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    9090            </manifest>
  • applications/editors/josm/plugins/mirrored_download/src/mirrored_download/MirroredDownloadPlugin.java

    r27877 r28106  
    11package mirrored_download;
    22
    3 import static org.openstreetmap.josm.tools.I18n.marktr;
    4 
    5 import java.awt.event.KeyEvent;
    6 
    73import javax.swing.JMenu;
    8 import javax.swing.JMenuItem;
    94
    105import org.openstreetmap.josm.Main;
    11 import org.openstreetmap.josm.actions.JosmAction;
    12 import org.openstreetmap.josm.data.ProjectionBounds;
    13 import org.openstreetmap.josm.gui.IconToggleButton;
    146import org.openstreetmap.josm.gui.MainMenu;
    15 import org.openstreetmap.josm.gui.MapFrame;
    16 import org.openstreetmap.josm.gui.MapView;
    17 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
    18 import org.openstreetmap.josm.io.CacheFiles;
    19 import org.openstreetmap.josm.io.MirroredInputStream;
    207import org.openstreetmap.josm.plugins.Plugin;
    218import org.openstreetmap.josm.plugins.PluginInformation;
     
    2310public class MirroredDownloadPlugin extends Plugin {
    2411
    25   static JMenu jMenu;
     12    static JMenu jMenu;
    2613
    27   public MirroredDownloadPlugin(PluginInformation info)
    28   {
    29     super(info);
    30     MainMenu.add(Main.main.menu.fileMenu, new DownloadAction2());
    31     MainMenu.add(Main.main.menu.fileMenu, new UrlSelectionAction());
    32   }
     14    public MirroredDownloadPlugin(PluginInformation info) {
     15        super(info);
     16        MainMenu.addAfter(Main.main.menu.fileMenu, new DownloadAction2(), false, Main.main.menu.download);
     17        MainMenu.add(Main.main.menu.editMenu, new UrlSelectionAction());
     18    }
     19    private static String downloadUrl = "http://overpass.osm.rambler.ru/cgi/xapi?";//"http://overpass-api.de/api/xapi?";
    3320
    34   private static String downloadUrl = "http://overpass.osm.rambler.ru/cgi/xapi?";//"http://overpass-api.de/api/xapi?";
     21    public static String getDownloadUrl() {
     22        return downloadUrl;
     23    }
    3524
    36   public static String getDownloadUrl() {
    37     return downloadUrl;
    38   }
    39 
    40   public static void setDownloadUrl(String downloadUrl_) {
    41     downloadUrl = downloadUrl_;
    42   }
     25    public static void setDownloadUrl(String downloadUrl_) {
     26        downloadUrl = downloadUrl_;
     27    }
    4328}
  • applications/editors/josm/plugins/mirrored_download/src/mirrored_download/UrlSelectionAction.java

    r27906 r28106  
    66
    77import java.awt.event.ActionEvent;
    8 import java.awt.event.KeyEvent;
    9 import java.util.concurrent.Future;
    108
    119import org.openstreetmap.josm.actions.JosmAction;
    1210
    13 import org.openstreetmap.josm.Main;
    14 import org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask;
    15 import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler;
    16 import org.openstreetmap.josm.data.Bounds;
    17 import org.openstreetmap.josm.gui.download.DownloadDialog;
    18 import org.openstreetmap.josm.tools.Shortcut;
    1911
    2012/**
     
    2416
    2517    public UrlSelectionAction() {
    26         super(tr("Select URL..."), null, tr("Select URL to download from."),
    27                 Shortcut.registerShortcut("file:selecturl", tr("File: {0}", tr("Select URL...")), KeyEvent.VK_D, Shortcut.CTRL_SHIFT),
    28                 true, "mirroreddownload/urlselection", true);
     18        super(tr("Select OSM mirror URL"), null, tr("Select OSM mirror URL to download from."),
     19                null, true, "mirroreddownload/urlselection", true);
    2920        putValue("help", ht("/Action/SelectUrl"));
    3021    }
Note: See TracChangeset for help on using the changeset viewer.