Changeset 30810 in osm for applications
- Timestamp:
- 2014-11-18T23:23:20+01:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/CommandLine
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/CommandLine/build.xml
r30523 r30810 4 4 <property name="commit.message" value="JOSM/CommandLine: fix exception after JOSM update"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="7 299"/>6 <property name="plugin.main.version" value="7687"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/CommandLine/src/CommandLine/CommandAction.java
r29505 r30810 5 5 * 6 6 */ 7 8 7 package CommandLine; 9 8 … … 24 23 if (!parentCommand.icon.equals("")) { 25 24 try { 26 putValue(Action.SMALL_ICON, ImageProvider.get(CommandLine.pluginDir, parentCommand.icon)); 27 putValue(Action.LARGE_ICON_KEY, ImageProvider.get(CommandLine.pluginDir, parentCommand.icon)); 28 } 29 catch (NullPointerException e) { 30 putValue(Action.SMALL_ICON, ImageProvider.get("blankmenu")); 31 putValue(Action.LARGE_ICON_KEY, ImageProvider.get("blankmenu")); 32 } 33 catch (RuntimeException e) { 34 putValue(Action.SMALL_ICON, ImageProvider.get("blankmenu")); 35 putValue(Action.LARGE_ICON_KEY, ImageProvider.get("blankmenu")); 25 putIcons(CommandLine.pluginDir, parentCommand.icon); 26 } catch (RuntimeException e) { 27 putIcons(null, "blankmenu"); 36 28 } 37 29 } … … 39 31 this.parentCommand = parentCommand; 40 32 this.parentPlugin = parentPlugin; 33 } 34 35 private void putIcons(String subdir, String name) { 36 putValue(Action.SMALL_ICON, new ImageProvider(subdir, name).setSize(ImageProvider.ImageSizes.SMALLICON).get()); 37 putValue(Action.LARGE_ICON_KEY, new ImageProvider(subdir, name).setSize(ImageProvider.ImageSizes.LARGEICON).get()); 41 38 } 42 39
Note:
See TracChangeset
for help on using the changeset viewer.