Changeset 3444 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2010-08-17T08:08:58+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/Main.java
r3433 r3444 36 36 import javax.swing.UIManager; 37 37 38 import org.openstreetmap.josm.actions.JosmAction; 38 39 import org.openstreetmap.josm.actions.OpenFileAction; 39 40 import org.openstreetmap.josm.actions.downloadtasks.DownloadGpsTask; … … 313 314 } 314 315 316 public static void unregisterActionShortcut(JosmAction action) { 317 unregisterActionShortcut(action, action.getShortcut()); 318 } 319 320 public static void unregisterActionShortcut(Action action, Shortcut shortcut) { 321 contentPanePrivate.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).remove(shortcut.getKeyStroke()); 322 contentPanePrivate.getActionMap().remove(action); 323 } 324 325 315 326 /////////////////////////////////////////////////////////////////////////// 316 327 // Implementation part -
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r3443 r3444 108 108 public void destroy() { 109 109 if (sc != null) { 110 Main.unregisterActionShortcut( sc);110 Main.unregisterActionShortcut(this); 111 111 } 112 112 MapView.removeLayerChangeListener(layerChangeAdapter); -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r3262 r3444 63 63 //static private final Logger logger = Logger.getLogger(SelectAction.class.getName()); 64 64 65 /**66 * Replies true if we are currently running on OSX67 *68 * @return true if we are currently running on OSX69 */70 public static boolean isPlatformOsx() {71 return Main.platform != null72 && Main.platform instanceof PlatformHookOsx;73 }74 75 65 enum Mode { move, rotate, select } 76 66 private Mode mode = null; … … 274 264 // Mac OSX simulates with ctrl + mouse 1 the second mouse button hence no dragging events get fired. 275 265 // 276 if ( isPlatformOsx() && mode == Mode.rotate) {266 if ((Main.platform instanceof PlatformHookOsx) && mode == Mode.rotate) { 277 267 mouseDragged(e); 278 268 } … … 490 480 if (!nodesToMerge.isEmpty()) { 491 481 Command cmd = MergeNodesAction.mergeNodes(Main.main.getEditLayer(),nodesToMerge, targetNode); 492 if(cmd != null) 482 if(cmd != null) { 493 483 Main.main.undoRedo.add(cmd); 484 } 494 485 } 495 486 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/HistoryDialog.java
r3416 r3444 71 71 Shortcut.GROUP_LAYER, Shortcut.SHIFT_DEFAULT), 150); 72 72 build(); 73 DataSet.addSelectionListener(model);74 75 73 HelpUtil.setHelpContext(this, HelpUtil.ht("/Dialog/HistoryDialog")); 76 74 } … … 142 140 public void showNotify() { 143 141 HistoryDataSet.getInstance().addHistoryDataSetListener(this); 142 DataSet.addSelectionListener(model); 144 143 } 145 144 … … 147 146 public void hideNotify() { 148 147 HistoryDataSet.getInstance().removeHistoryDataSetListener(this); 148 DataSet.removeSelectionListener(model); 149 149 } 150 150 … … 278 278 */ 279 279 class ReloadAction extends AbstractAction implements ListSelectionListener { 280 280 281 public ReloadAction() { 281 282 putValue(Action.SMALL_ICON, ImageProvider.get("dialogs","refresh")); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r3431 r3444 151 151 // button in the upper right corner of this dialog 152 152 public static JPanel pluginHook = new JPanel(); 153 153 154 154 private final Map<String, Map<String, Integer>> valueCount = new TreeMap<String, Map<String, Integer>>(); 155 155 … … 179 179 SelectionEventManager.getInstance().removeSelectionListener(this); 180 180 MapView.removeEditLayerChangeListener(this); 181 Main.unregisterActionShortcut(addAction Shortcut);181 Main.unregisterActionShortcut(addAction, addActionShortcut); 182 182 } 183 183
Note:
See TracChangeset
for help on using the changeset viewer.