- Timestamp:
- 2009-01-24T23:45:58+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r1326 r1332 475 475 String s = get(key); 476 476 if(s != null && s.length() != 0) 477 { 478 /* handle old comma separated stuff - remove in future */ 479 if(s.indexOf(',') >= 0) 480 return Arrays.asList(s.split(",")); 481 /* handle space separated stuff - remove in future */ 482 else if(s.indexOf(' ') >= 0) 483 return Arrays.asList(s.split(" ")); 484 else 485 return Arrays.asList(s.split(";")); 486 } 477 return Arrays.asList(s.split(";")); 487 478 return def; 488 479 } -
trunk/src/org/openstreetmap/josm/gui/MapFrame.java
r1231 r1332 6 6 import java.awt.Component; 7 7 import java.awt.Container; 8 import java.util.ArrayList; 8 9 9 10 import javax.swing.AbstractButton; … … 70 71 */ 71 72 public JPanel toggleDialogs = new JPanel(); 73 public ArrayList<ToggleDialog> allDialogs = new ArrayList<ToggleDialog>(); 72 74 73 75 public final ButtonGroup toolGroup = new ButtonGroup(); … … 116 118 */ 117 119 public void destroy() { 120 for (ToggleDialog t : allDialogs) 121 t.close(); 118 122 for (int i = 0; i < toolBarActions.getComponentCount(); ++i) 119 123 if (toolBarActions.getComponent(i) instanceof Destroyable) … … 154 158 toolBarToggle.add(button); 155 159 toggleDialogs.add(dlg); 160 allDialogs.add(dlg); 156 161 return button; 157 162 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r1316 r1332 60 60 if(!selected && winadapter != null) 61 61 winadapter.windowClosing(null); 62 else if (!Main.pref.getBoolean(action.prefname+".docked", true)) { 63 EventQueue.invokeLater(new Runnable(){ 64 public void run() { 65 stickyActionListener.actionPerformed(null); 66 } 67 }); 68 } 62 69 } 63 70 } … … 71 78 public JPanel parent; 72 79 WindowAdapter winadapter; 80 private ActionListener stickyActionListener; 73 81 private final JPanel titleBar = new JPanel(new GridBagLayout()); 74 82 public JLabel label = new JLabel(); … … 151 159 sticky.setToolTipText(tr("Undock the panel")); 152 160 sticky.setBorder(BorderFactory.createEmptyBorder()); 153 final ActionListenerstickyActionListener = new ActionListener(){161 stickyActionListener = new ActionListener(){ 154 162 public void actionPerformed(ActionEvent e) { 155 163 final JFrame f = new JFrame(name); … … 169 177 setVisible(true); 170 178 titleBar.setVisible(true); 171 Main.pref.put(action.prefname+".docked", true); 179 if(e != null) 180 Main.pref.put(action.prefname+".docked", true); 172 181 } 173 182 })); … … 230 239 } 231 240 241 public void close() 242 { 243 if(winadapter != null) 244 winadapter.windowClosing(null); 245 } 246 232 247 public void setTitle(String title, boolean active) { 233 248 if(active) {
Note:
See TracChangeset
for help on using the changeset viewer.