Changeset 694 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2008-07-09T17:51:43+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/preferences/TaggingPresetPreference.java
r680 r694 135 135 String[] sp = name.split("/"); 136 136 if (sp.length <= 1) { 137 Main.main.menu.presetsMenu.add(new JMenuItem(p)); 137 if(p.isEmpty()) 138 { 139 JMenu submenu = submenus.get(sp[0]); 140 if (submenu == null) { 141 submenu = new JMenu(p); 142 submenus.put(sp[0], submenu); 143 Main.main.menu.presetsMenu.add(submenu); 144 } 145 } 146 else 147 { 148 Main.main.menu.presetsMenu.add(new JMenuItem(p)); 149 } 138 150 } else { 139 151 p.setDisplayName(sp[1]); -
trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
r627 r694 14 14 import java.awt.event.ActionListener; 15 15 import java.util.HashMap; 16 import java.util.TreeMap; 16 17 import java.util.Map; 17 18 … … 141 142 selected.removeAllElements(); 142 143 unselected.removeAllElements(); 144 Map<String, Action> us = new TreeMap<String, Action>(); 143 145 for (Action a : actions.values()) 144 unselected.addElement(a); 146 { 147 String name = a.getValue(a.NAME).toString(); 148 if(!name.equals(" ")) 149 us.put(a.getValue(a.NAME).toString(), a); 150 } 151 for (String a : us.keySet()) 152 unselected.addElement(us.get(a)); 145 153 unselected.addElement(null); 146 154 147 155 final JPanel left = new JPanel(new GridBagLayout()); 148 left.add(new JLabel( "Toolbar"), GBC.eol());156 left.add(new JLabel(tr("Toolbar")), GBC.eol()); 149 157 left.add(new JScrollPane(selectedList), GBC.std().fill(GBC.BOTH)); 150 158 151 159 final JPanel right = new JPanel(new GridBagLayout()); 152 right.add(new JLabel( "Available"), GBC.eol());160 right.add(new JLabel(tr("Available")), GBC.eol()); 153 161 right.add(new JScrollPane(unselectedList), GBC.eol().fill(GBC.BOTH)); 154 162 … … 191 199 p.add(right); 192 200 193 JPanel panel = gui.createPreferenceTab("toolbar", "Toolbar customization", "Customize the elements on the toolbar.");201 JPanel panel = gui.createPreferenceTab("toolbar", tr("Toolbar customization"), tr("Customize the elements on the toolbar.")); 194 202 panel.add(p, GBC.eol().fill(GBC.BOTH)); 195 203 -
trunk/src/org/openstreetmap/josm/gui/tagging/TaggingPreset.java
r692 r694 334 334 public TaggingPreset() {} 335 335 336 337 public boolean isEmpty() 338 { 339 return (data.size() == 0); 340 } 336 341 /** 337 342 * Called from the XML parser to set the name of the tagging preset
Note:
See TracChangeset
for help on using the changeset viewer.