Changeset 33624 in osm for applications/editors/josm
- Timestamp:
- 2017-09-18T04:44:35+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/wikipedia/src/org/wikipedia
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/gui/WikosmDownloadSource.java
r33621 r33624 19 19 import javax.swing.plaf.basic.BasicArrowButton; 20 20 21 import org.openstreetmap.josm.Main; 21 22 import org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask; 22 23 import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler; … … 33 34 import org.openstreetmap.josm.gui.util.GuiHelper; 34 35 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 35 import org.openstreetmap.josm.spi.preferences.Config;36 36 import org.openstreetmap.josm.tools.GBC; 37 37 import org.openstreetmap.josm.tools.ImageProvider; … … 153 153 referrers.setToolTipText(tr("Select if the referrers of the object should be downloaded as well, i.e.," 154 154 + "parent relations and for nodes, additionally, parent ways")); 155 referrers.setSelected(Config.getPref().getBoolean("wikosm.downloadprimitive.referrers", true)); 156 referrers.addActionListener(e -> Config.getPref().putBoolean("wikosm.downloadprimitive.referrers", referrers.isSelected())); 155 156 // TODO: Once new core is widely avialable, replace: 157 // Main.pref.getBoolean --> Config.getPref().getBoolean 158 // Main.pref.put --> Config.getPref().putBoolean 159 160 referrers.setSelected(Main.pref.getBoolean("wikosm.downloadprimitive.referrers", true)); 161 referrers.addActionListener(e -> Main.pref.put("wikosm.downloadprimitive.referrers", referrers.isSelected())); 157 162 158 163 fullRel = new JCheckBox(tr("Download relation members")); 159 164 fullRel.setToolTipText(tr("Select if the members of a relation should be downloaded as well")); 160 fullRel.setSelected( Config.getPref().getBoolean("wikosm.downloadprimitive.full", true));161 fullRel.addActionListener(e -> Config.getPref().putBoolean("wikosm.downloadprimitive.full", fullRel.isSelected()));165 fullRel.setSelected(Main.pref.getBoolean("wikosm.downloadprimitive.full", true)); 166 fullRel.addActionListener(e -> Main.pref.put("wikosm.downloadprimitive.full", fullRel.isSelected())); 162 167 163 168 JPanel centerPanel = new JPanel(new GridBagLayout()); -
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/gui/WikosmQueryList.java
r33621 r33624 49 49 import org.openstreetmap.josm.gui.widgets.JosmTextArea; 50 50 import org.openstreetmap.josm.gui.widgets.SearchTextResultListPanel; 51 import org.openstreetmap.josm.spi.preferences.Config;52 51 import org.openstreetmap.josm.tools.GBC; 53 52 import org.openstreetmap.josm.tools.Logging; … … 254 253 } 255 254 256 Config.getPref().putListOfMaps(PREFERENCE_ITEMS, toSave); 255 // TODO: Core dependency: Config.getPref().putListOfMaps(PREFERENCE_ITEMS, toSave); 256 Main.pref.putListOfStructs(PREFERENCE_ITEMS, toSave); 257 257 } 258 258 … … 262 262 */ 263 263 private static Map<String, SelectorItem> restorePreferences() { 264 // TODO: Core dependency: Config.getPref().getListOfMaps(PREFERENCE_ITEMS, Collections.emptyList()); 264 265 Collection<Map<String, String>> toRetrieve = 265 Config.getPref().getListOfMaps(PREFERENCE_ITEMS, Collections.emptyList());266 Main.pref.getListOfStructs(PREFERENCE_ITEMS, Collections.emptyList()); 266 267 Map<String, SelectorItem> result = new HashMap<>(); 267 268 -
applications/editors/josm/plugins/wikipedia/src/org/wikipedia/io/WikosmDownloadReader.java
r33621 r33624 7 7 import org.openstreetmap.josm.data.coor.LatLon; 8 8 import org.openstreetmap.josm.data.osm.*; 9 import org.openstreetmap.josm.data.preferences. ListProperty;9 import org.openstreetmap.josm.data.preferences.CollectionProperty; 10 10 import org.openstreetmap.josm.data.preferences.StringProperty; 11 11 import org.openstreetmap.josm.gui.progress.ProgressMonitor; … … 48 48 * Property for list of known Wikosm servers. 49 49 */ 50 public static final ListProperty WIKOSM_SERVER_HISTORY = new ListProperty("download.wikosm.servers", 50 // TODO: Core dependency: 51 // public static final ListProperty WIKOSM_SERVER_HISTORY = new ListProperty("download.wikosm.servers", 52 // Arrays.asList("http://88.99.164.208/bigdata/namespace/wdq/sparql")); 53 public static final CollectionProperty WIKOSM_SERVER_HISTORY = new CollectionProperty("download.wikosm.servers", 51 54 Arrays.asList("http://88.99.164.208/bigdata/namespace/wdq/sparql")); 52 55
Note:
See TracChangeset
for help on using the changeset viewer.