Changeset 768 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2008-08-11T20:59:42+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r627 r768 15 15 16 16 import org.openstreetmap.josm.Main; 17 import org.openstreetmap.josm.actions.AlignInRectangleAction;18 import org.openstreetmap.josm.actions.JosmAction;19 17 import org.openstreetmap.josm.actions.AboutAction; 20 18 import org.openstreetmap.josm.actions.AlignInCircleAction; 21 19 import org.openstreetmap.josm.actions.AlignInLineAction; 20 import org.openstreetmap.josm.actions.AlignInRectangleAction; 22 21 import org.openstreetmap.josm.actions.AutoScaleAction; 23 22 import org.openstreetmap.josm.actions.CombineWayAction; 24 23 import org.openstreetmap.josm.actions.CopyAction; 24 import org.openstreetmap.josm.actions.DeleteAction; 25 25 import org.openstreetmap.josm.actions.DownloadAction; 26 26 import org.openstreetmap.josm.actions.DuplicateAction; … … 29 29 import org.openstreetmap.josm.actions.HelpAction; 30 30 import org.openstreetmap.josm.actions.JoinNodeWayAction; 31 import org.openstreetmap.josm.actions.JosmAction; 31 32 import org.openstreetmap.josm.actions.MergeNodesAction; 32 33 import org.openstreetmap.josm.actions.NewAction; … … 44 45 import org.openstreetmap.josm.actions.UnselectAllAction; 45 46 import org.openstreetmap.josm.actions.UploadAction; 47 import org.openstreetmap.josm.actions.ZoomInAction; 48 import org.openstreetmap.josm.actions.ZoomOutAction; 46 49 import org.openstreetmap.josm.actions.audio.AudioBackAction; 50 import org.openstreetmap.josm.actions.audio.AudioFasterAction; 47 51 import org.openstreetmap.josm.actions.audio.AudioFwdAction; 48 52 import org.openstreetmap.josm.actions.audio.AudioNextAction; 49 53 import org.openstreetmap.josm.actions.audio.AudioPlayPauseAction; 50 54 import org.openstreetmap.josm.actions.audio.AudioPrevAction; 51 import org.openstreetmap.josm.actions.audio.AudioFasterAction;52 55 import org.openstreetmap.josm.actions.audio.AudioSlowerAction; 53 56 import org.openstreetmap.josm.actions.search.SearchAction; … … 79 82 public final JosmAction copy = new CopyAction(); 80 83 public final JosmAction paste = new PasteAction(); 84 public final JosmAction delete = new DeleteAction(); 81 85 public final JosmAction pasteTags = new PasteTagsAction(copy); 82 86 public final JosmAction duplicate = new DuplicateAction(); … … 154 158 current = editMenu.add(copy); 155 159 current.setAccelerator(copy.shortCut); 160 current = editMenu.add(delete); 161 current.setAccelerator(delete.shortCut); 156 162 current = editMenu.add(paste); 157 163 current.setAccelerator(paste.shortCut); … … 180 186 } 181 187 viewMenu.addSeparator(); 182 183 // TODO move code to an "action" like the others? 188 JosmAction a = new ZoomOutAction(); 189 viewMenu.add(a).setAccelerator(a.shortCut); 190 a = new ZoomInAction(); 191 viewMenu.add(a).setAccelerator(a.shortCut); 192 193 viewMenu.addSeparator(); 194 195 // TODO move code to an "action" like the others? 184 196 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view")); 185 197 wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", true)); -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r655 r768 110 110 */ 111 111 public Point getPoint(EastNorth p) { 112 if(null == p) 113 return new Point(); 112 114 double x = (p.east()-center.east())/scale + getWidth()/2; 113 115 double y = (center.north()-p.north())/scale + getHeight()/2; -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r743 r768 187 187 } 188 188 }); 189 fc.showOpenDialog(Main.parent); 190 File sel = fc.getSelectedFile(); 191 if (!fc.getCurrentDirectory().getAbsolutePath().equals(dir)) 192 Main.pref.put("markers.lastaudiodirectory", fc.getCurrentDirectory().getAbsolutePath()); 193 if (sel == null) 194 return; 195 importAudio(sel); 196 Main.map.repaint(); 189 fc.setMultiSelectionEnabled(true); 190 if(fc.showOpenDialog(Main.parent) == JFileChooser.APPROVE_OPTION) { 191 if (!fc.getCurrentDirectory().getAbsolutePath().equals(dir)) 192 Main.pref.put("markers.lastaudiodirectory", fc 193 .getCurrentDirectory().getAbsolutePath()); 194 195 // FIXME: properly support multi-selection here. 196 // Calling importAudio several times just creates N maker layers, which 197 // is sub-optimal. 198 File sel[] = fc.getSelectedFiles(); 199 if(sel != null) 200 for (int i = 0; i < sel.length; i++) 201 importAudio(sel[i]); 202 203 Main.map.repaint(); 204 } 197 205 } 198 206 });
Note:
See TracChangeset
for help on using the changeset viewer.