Changeset 20463 in osm for applications/editors/josm/plugins/openstreetbugs
- Timestamp:
- 2010-03-14T00:20:50+01:00 (15 years ago)
- Location:
- applications/editors/josm/plugins/openstreetbugs
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbPlugin.java
r19463 r20463 70 70 initConfig(); 71 71 dataSet = new DataSet(); 72 uploadHook = new OsbUploadHook(); 73 dialog = new OsbDialog(this); 74 MapView.addLayerChangeListener(dialog); 75 MapView.addLayerChangeListener(this); 72 } 73 74 @Override 75 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) { 76 if (newFrame != null) { 77 dialog = new OsbDialog(this); 78 newFrame.addToggleDialog(dialog); 79 80 MapView.addLayerChangeListener(dialog); 81 MapView.addLayerChangeListener(this); 82 83 uploadHook = new OsbUploadHook(); 84 UploadAction.registerUploadHook(uploadHook); 85 } else { 86 MapView.removeLayerChangeListener(this); 87 UploadAction.unregisterUploadHook(uploadHook); 88 uploadHook = null; 89 } 76 90 } 77 91 … … 196 210 } 197 211 198 @Override199 public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {200 if (oldFrame==null && newFrame!=null) { // map frame added201 // add the dialog202 newFrame.addToggleDialog(dialog);203 204 // add the upload hook205 UploadAction.registerUploadHook(uploadHook);206 } else if (oldFrame!=null && newFrame==null ) { // map frame removed207 208 }209 }210 211 212 public static ImageIcon loadIcon(String name) { 212 213 return ImageProvider.get(name); -
applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/gui/OsbDialog.java
r19366 r20463 101 101 102 102 public OsbDialog(final OsbPlugin plugin) { 103 super(tr("Open OpenStreetBugs"), "icon_error2 2",103 super(tr("Open OpenStreetBugs"), "icon_error24", 104 104 tr("Opens the OpenStreetBugs window and activates the automatic download"), Shortcut.registerShortcut( 105 105 "view:openstreetbugs", tr("Toggle: {0}", tr("Open OpenStreetBugs")), KeyEvent.VK_O,
Note:
See TracChangeset
for help on using the changeset viewer.