Changeset 31829 in osm for applications/editors/josm
- Timestamp:
- 2015-12-15T16:32:35+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
r31828 r31829 75 75 76 76 /** Menu button for the {@link MapillaryDownloadAction} action. */ 77 private JMenuItem downloadMenu ;77 private JMenuItem downloadMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.imageryMenu, downloadAction, false); 78 78 /** Menu button for the {@link MapillaryExportAction} action. */ 79 private static JMenuItem exportMenu ;79 private static JMenuItem exportMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.fileMenu, exportAction, false, 14); 80 80 /** Menu button for the {@link MapillaryImportAction} action. */ 81 private JMenuItem importMenu ;81 private JMenuItem importMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.fileMenu, importAction, false, 14); 82 82 /** Menu button for the {@link MapillaryZoomAction} action. */ 83 private static JMenuItem zoomMenu ;83 private static JMenuItem zoomMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.viewMenu, zoomAction, false, 15); 84 84 /** Menu button for the {@link MapillaryDownloadViewAction} action. */ 85 private static JMenuItem downloadViewMenu ;85 private static JMenuItem downloadViewMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.fileMenu, downloadViewAction, false, 14); 86 86 /** Menu button for the {@link MapillaryImportIntoSequenceAction} action. */ 87 private JMenuItem importIntoSequenceMenu ;87 private JMenuItem importIntoSequenceMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.fileMenu, importIntoSequenceAction, false, 14); 88 88 /** Menu button for the {@link MapillaryJoinAction} action. */ 89 private static JMenuItem joinMenu ;89 private static JMenuItem joinMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.dataMenu, joinAction, false); 90 90 /** Menu button for the {@link MapillaryWalkAction} action. */ 91 private static JMenuItem walkMenu ;91 private static JMenuItem walkMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.moreToolsMenu, walkAction, false); 92 92 /** Menu button for the {@link MapillaryUploadAction} action. */ 93 private static JMenuItem uploadMenu ;93 private static JMenuItem uploadMenu = Main.main == null ? null : MainMenu.add(Main.main.menu.fileMenu, uploadAction, false, 14); 94 94 95 95 /** … … 103 103 104 104 if (Main.main != null) { // important for headless mode 105 downloadMenu = MainMenu.add(Main.main.menu.imageryMenu, downloadAction, false);106 exportMenu = MainMenu.add(Main.main.menu.fileMenu, exportAction, false, 14);107 importIntoSequenceMenu = MainMenu.add(Main.main.menu.fileMenu, importIntoSequenceAction, false, 14);108 importMenu = MainMenu.add(Main.main.menu.fileMenu, importAction, false, 14);109 uploadMenu = MainMenu.add(Main.main.menu.fileMenu, uploadAction, false, 14);110 zoomMenu = MainMenu.add(Main.main.menu.viewMenu, zoomAction, false, 15);111 downloadViewMenu = MainMenu.add(Main.main.menu.fileMenu, downloadViewAction, false, 14);112 joinMenu = MainMenu.add(Main.main.menu.dataMenu, joinAction, false);113 walkMenu = MainMenu.add(Main.main.menu.moreToolsMenu, walkAction, false);114 115 105 exportMenu.setEnabled(false); 116 106 downloadMenu.setEnabled(false); … … 231 221 */ 232 222 public static void setMenuEnabled(final JMenuItem menu, final boolean value) { 223 if (menu == null) { // In headless mode the menu items are initialized to null 224 return; 225 } 233 226 if (!SwingUtilities.isEventDispatchThread()) { 234 227 SwingUtilities.invokeLater(new Runnable() {
Note:
See TracChangeset
for help on using the changeset viewer.