Changeset 2032 in josm for trunk/src/org/openstreetmap/josm
- Timestamp:
- 2009-09-03T09:29:22+02:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AbstractMergeAction.java
r2017 r2032 66 66 layerList.setModel(new DefaultComboBoxModel(targetLayers.toArray())); 67 67 layerList.setSelectedIndex(0); 68 68 69 69 JPanel pnl = new JPanel(); 70 70 pnl.setLayout(new GridBagLayout()); 71 71 pnl.add(new JLabel(tr("Please select the target layer.")), GBC.eol()); 72 72 pnl.add(layerList, GBC.eol()); 73 74 int decision = new ExtendedDialog(Main.parent, tr("Select target layer"), pnl, new String[] { tr("Merge"), 75 tr("Cancel") }, new String[] { "dialogs/mergedown", "cancel" }).getValue(); 76 if (decision != 1) 73 74 ExtendedDialog ed = new ExtendedDialog(Main.parent, 75 tr("Select target layer"), 76 new String[] { tr("Merge"), tr("Cancel") }); 77 ed.setButtonIcons(new String[] { "dialogs/mergedown", "cancel" }); 78 ed.setContent(pnl); 79 ed.showDialog(); 80 if (ed.getValue() != 1) 77 81 return null; 82 78 83 Layer targetLayer = (Layer) layerList.getSelectedItem(); 79 84 return targetLayer; -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r2025 r2032 118 118 for (HashSet<Way> waylinks : backlinks.values()) { 119 119 if (!waylinks.containsAll(selectedWays)) { 120 int option = new ExtendedDialog(Main.parent, 120 121 ExtendedDialog ed = new ExtendedDialog(Main.parent, 121 122 tr("Combine ways with different memberships?"), 122 tr("The selected ways have differing relation memberships. " 123 + "Do you still want to combine them?"), 124 new String[] {tr("Combine Anyway"), tr("Cancel")}, 125 new String[] {"combineway.png", "cancel.png"}).getValue(); 126 if (option == 1) { 123 new String[] {tr("Combine Anyway"), tr("Cancel")}); 124 ed.setButtonIcons(new String[] {"combineway.png", "cancel.png"}); 125 ed.setContent(tr("The selected ways have differing relation memberships. " 126 + "Do you still want to combine them?")); 127 ed.showDialog(); 128 129 if (ed.getValue() == 1) { 127 130 break; 128 131 } … … 150 153 Object secondTry = actuallyCombineWays(selectedWays, true); 151 154 if (secondTry instanceof List<?>) { 152 int option= new ExtendedDialog(Main.parent,155 ExtendedDialog ed = new ExtendedDialog(Main.parent, 153 156 tr("Change directions?"), 154 tr("The ways can not be combined in their current directions. " 155 + "Do you want to reverse some of them?"), 156 new String[] {tr("Reverse and Combine"), tr("Cancel")}, 157 new String[] {"wayflip.png", "cancel.png"}).getValue(); 158 if (option != 1) return; 157 new String[] {tr("Reverse and Combine"), tr("Cancel")}); 158 ed.setButtonIcons(new String[] {"wayflip.png", "cancel.png"}); 159 ed.setContent(tr("The ways can not be combined in their current directions. " 160 + "Do you want to reverse some of them?")); 161 ed.showDialog(); 162 if (ed.getValue() != 1) return; 163 159 164 nodeList = (List<Node>) secondTry; 160 165 } else { … … 205 210 206 211 if (!components.isEmpty()) { 207 int answer = new ExtendedDialog(Main.parent, 212 213 ExtendedDialog ed = new ExtendedDialog(Main.parent, 208 214 tr("Enter values for all conflicts."), 209 p, 210 new String[] {tr("Solve Conflicts"), tr("Cancel")}, 211 new String[] {"dialogs/conflict.png", "cancel.png"}).getValue(); 212 if (answer != 1) return; 215 new String[] {tr("Solve Conflicts"), tr("Cancel")}); 216 ed.setButtonIcons(new String[] {"dialogs/conflict.png", "cancel.png"}); 217 ed.setContent(p); 218 ed.showDialog(); 219 220 if (ed.getValue() != 1) return; 213 221 214 222 for (Entry<String, JComboBox> e : components.entrySet()) { -
trunk/src/org/openstreetmap/josm/gui/ConditionalOptionPaneUtil.java
r2017 r2032 27 27 * 28 28 */ 29 public class ConditionalOptionPaneUtil {29 @Deprecated public class ConditionalOptionPaneUtil { 30 30 static public final int DIALOG_DISABLED_OPTION = Integer.MIN_VALUE; 31 31 -
trunk/src/org/openstreetmap/josm/gui/dialogs/PropertiesDialog.java
r2027 r2032 636 636 } 637 637 638 LinkedList<TaggingPreset> p = new LinkedList<TaggingPreset>();639 638 presets.removeAll(); 640 639 int total = nodes+ways+relations+closedways; … … 831 830 protected void deleteFromRelation(int row) { 832 831 Relation cur = (Relation)membershipData.getValueAt(row, 0); 833 int result = new ExtendedDialog(Main.parent, 832 833 ExtendedDialog ed = new ExtendedDialog(Main.parent, 834 834 tr("Change relation"), 835 tr("Really delete selection from relation {0}?", cur.getDisplayName(DefaultNameFormatter.getInstance())), 836 new String[] {tr("Delete from relation"), tr("Cancel")}, 837 new String[] {"dialogs/delete.png", "cancel.png"}).getValue(); 838 839 if(result != 1) 835 new String[] {tr("Delete from relation"), tr("Cancel")}); 836 ed.setButtonIcons(new String[] {"dialogs/delete.png", "cancel.png"}); 837 ed.setContent(tr("Really delete selection from relation {0}?", cur.getDisplayName(DefaultNameFormatter.getInstance()))); 838 ed.showDialog(); 839 840 if(ed.getValue() != 1) 840 841 return; 841 842 -
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r2017 r2032 112 112 p.add(keywords, GBC.eop().fill(GBC.HORIZONTAL)); 113 113 114 int answer = new ExtendedDialog(Main.parent, tr("Export options"), p, new String[] { tr("Export and Save"), 115 tr("Cancel") }, new String[] { "exportgpx.png", "cancel.png" }).getValue(); 116 if (answer != 1) 114 ExtendedDialog ed = new ExtendedDialog(Main.parent, 115 tr("Export options"), 116 new String[] { tr("Export and Save"), tr("Cancel") }); 117 ed.setButtonIcons(new String[] { "exportgpx.png", "cancel.png" }); 118 ed.setContent(p); 119 ed.showDialog(); 120 121 if (ed.getValue() != 1) 117 122 return; 118 123 -
trunk/src/org/openstreetmap/josm/plugins/PluginSelection.java
r2017 r2032 97 97 done = true; 98 98 } else { 99 int answer= new ExtendedDialog(Main.parent,99 ExtendedDialog ed = new ExtendedDialog(Main.parent, 100 100 tr("Update"), 101 tr("Update the following plugins:\n\n{0}", toUpdateStr.toString()), 102 new String[] {tr("Update Plugins"), tr("Cancel")}, 103 new String[] {"dialogs/refresh.png", "cancel.png"}).getValue(); 104 if (answer == 1) { 101 new String[] {tr("Update Plugins"), tr("Cancel")}); 102 ed.setButtonIcons(new String[] {"dialogs/refresh.png", "cancel.png"}); 103 ed.setContent(tr("Update the following plugins:\n\n{0}", toUpdateStr.toString())); 104 ed.showDialog(); 105 106 if (ed.getValue() == 1) { 105 107 PluginDownloader.update(toUpdate); 106 108 done = true; … … 133 135 } 134 136 if (!toDownload.isEmpty()) { 135 int answer= new ExtendedDialog(Main.parent,137 ExtendedDialog ed = new ExtendedDialog(Main.parent, 136 138 tr("Download missing plugins"), 137 tr("Download the following plugins?\n\n{0}", msg), 138 new String[] {tr("Download Plugins"), tr("Cancel")}, 139 new String[] {"download.png", "cancel.png"}).getValue(); 139 new String[] {tr("Download Plugins"), tr("Cancel")}); 140 ed.setButtonIcons(new String[] {"download.png", "cancel.png"}); 141 ed.setContent(tr("Download the following plugins?\n\n{0}", msg)); 142 ed.showDialog(); 143 140 144 Collection<PluginInformation> error = 141 ( answer!= 1 ? toDownload : new PluginDownloader().download(toDownload));145 (ed.getValue() != 1 ? toDownload : new PluginDownloader().download(toDownload)); 142 146 for (PluginInformation pd : error) { 143 147 pluginMap.put(pd.name, false); … … 330 334 name = x[0]; 331 335 url = x[1]; 332 manifest = null; 336 // Is null anyway 337 //manifest = null; 333 338 } 334 339 }
Note:
See TracChangeset
for help on using the changeset viewer.