Changeset 34221 in osm for applications/editors/josm
- Timestamp:
- 2018-05-27T03:45:50+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/ChooseURLAction.java
r33676 r34221 38 38 } 39 39 40 public static voidshowConfigDialog(final boolean fast) {40 public static int showConfigDialog(final boolean fast) { 41 41 JPanel all = new JPanel(new GridBagLayout()); 42 42 … … 78 78 all.add(check1, GBC.eop().fill(GBC.HORIZONTAL).insets(5, 5, 0, 0)); 79 79 80 81 dialog.setContent(all, false);82 dialog.setButtonIcons(new String[] {"ok.png", "cancel.png"});83 dialog.setDefaultButton(1);84 dialog.showDialog();80 int ret = dialog.setContent(all, false) 81 .setButtonIcons(new String[] {"ok", "cancel"}) 82 .setDefaultButton(1) 83 .showDialog() 84 .getValue(); 85 85 86 86 int idx = list1.getSelectedIndex(); 87 if ( dialog.getValue()== 1 && idx >= 0) {87 if (ret == 1 && idx >= 0) { 88 88 URLList.select(vals[idx]); 89 89 Main.pref.putBoolean("utilsplugin2.askurl", check1.isSelected()); 90 90 } 91 return ret; 91 92 } 92 93 } -
applications/editors/josm/plugins/utilsplugin2/src/org/openstreetmap/josm/plugins/utilsplugin2/customurl/OpenPageAction.java
r33991 r34221 50 50 } 51 51 52 if (Main.pref.getBoolean("utilsplugin2.askurl", false) == true) 53 ChooseURLAction.showConfigDialog(true); 52 if (Main.pref.getBoolean("utilsplugin2.askurl", false) && 1 != ChooseURLAction.showConfigDialog(true)) { 53 return; 54 } 54 55 55 56 MapView mv = MainApplication.getMap().mapView;
Note:
See TracChangeset
for help on using the changeset viewer.