Ignore:
Timestamp:
2009-03-18T15:55:16+01:00 (16 years ago)
Author:
stoecker
Message:

fix the menu changes in JOSM

Location:
applications/editors/josm/plugins/imagewaypoint
Files:
2 edited

Legend:

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

    r14015 r14120  
    2626                <attribute name="Plugin-Description" value="Another plugin to match images to the waypoints in a GPX file. A match is made when the 'name', 'cmt' or 'desc' attribute of a waypoint tag matches the filename of an image."/>
    2727                <attribute name="Plugin-Early" value="false"/>
    28                 <attribute name="Plugin-Mainversion" value="1465"/>
     28                <attribute name="Plugin-Mainversion" value="1498"/>
    2929                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3030            </manifest>
  • applications/editors/josm/plugins/imagewaypoint/src/org/insignificant/josm/plugins/imagewaypoint/ImageWayPointPlugin.java

    r13497 r14120  
    1111
    1212import javax.swing.JFileChooser;
    13 import javax.swing.JMenu;
    14 import javax.swing.JMenuBar;
    15 import javax.swing.JMenuItem;
    1613import javax.swing.filechooser.FileFilter;
    1714
    1815import org.openstreetmap.josm.Main;
    1916import org.openstreetmap.josm.actions.JosmAction;
     17import org.openstreetmap.josm.gui.MainMenu;
    2018import org.openstreetmap.josm.gui.MapFrame;
    2119import org.openstreetmap.josm.gui.layer.Layer;
     
    9896     */
    9997    public ImageWayPointPlugin() {
    100     // find the File menu
    101     final JMenuBar menuBar = Main.main.menu;
    102     JMenu fileMenu = null;
    103 
    104     if (null != menuBar) {
    105         for (int index = 0; index < menuBar.getMenuCount()
    106             && null == fileMenu; index++) {
    107         if (I18n.tr("File").equals(menuBar.getMenu(index).getText())) {
    108             fileMenu = menuBar.getMenu(index);
    109         }
    110         }
    111     }
    112 
    113     if (null != fileMenu) {
    114         // now create our 'load' menu item and add to the file menu
    115         final JMenuItem menuItem = new JMenuItem(new LoadImagesAction(this));
    116         fileMenu.add(menuItem, 2);
    117     }
     98        MainMenu menu = Main.main.menu;
     99        menu.add(menu.fileMenu, new LoadImagesAction(this));
    118100    }
    119101
Note: See TracChangeset for help on using the changeset viewer.