Changeset 30738 in osm for applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java
- Timestamp:
- 2014-10-19T01:27:04+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery_offset_db/src/iodb/ImageryOffsetPlugin.java
r30737 r30738 1 1 package iodb; 2 2 3 import static org.openstreetmap.josm.tools.I18n.marktr; 4 3 5 import java.awt.event.KeyEvent; 4 import java.util.*; 6 import java.util.Collection; 7 import java.util.LinkedList; 8 5 9 import javax.swing.JMenu; 10 6 11 import org.openstreetmap.josm.Main; 7 12 import org.openstreetmap.josm.data.Version; 13 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences; 8 14 import org.openstreetmap.josm.plugins.Plugin; 9 15 import org.openstreetmap.josm.plugins.PluginInformation; 10 import static org.openstreetmap.josm.tools.I18n.marktr;11 16 12 17 /** 13 18 * A plugin to request and store imagery offsets in the centralized database. 14 * 19 * 15 20 * @author Zverik 16 21 * @license WTFPL … … 19 24 private GetImageryOffsetAction getAction; 20 25 private StoreImageryOffsetAction storeAction; 21 26 22 27 /** 23 28 * Add both actions to their own menu. This creates … … 28 33 public ImageryOffsetPlugin( PluginInformation info ) { 29 34 super(info); 30 35 31 36 getAction = new GetImageryOffsetAction(); 32 37 storeAction = new StoreImageryOffsetAction(); 33 38 34 39 // before 5803 imagery menu was constantly regenerated, erasing extra items 35 40 // before 5729 it was regenerated only when the imagery list was modified (also bad) … … 43 48 // an ugly hack to add this plugin to the toolbar 44 49 if( Main.pref.getBoolean("iodb.modify.toolbar", true) ) { 45 Collection<String> toolbar = new LinkedList<>( Main.toolbar.getToolString());50 Collection<String> toolbar = new LinkedList<>(ToolbarPreferences.getToolString()); 46 51 if( !toolbar.contains("getoffset") ) { 47 52 toolbar.add("getoffset");
Note:
See TracChangeset
for help on using the changeset viewer.
