Changeset 12846 in josm for trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java
- Timestamp:
- 2017-09-13T23:24:50+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/importexport/GpxExporter.java
r12841 r12846 36 36 import org.openstreetmap.josm.io.Compression; 37 37 import org.openstreetmap.josm.io.GpxWriter; 38 import org.openstreetmap.josm.spi.preferences.Config; 38 39 import org.openstreetmap.josm.tools.CheckParameterUtil; 39 40 import org.openstreetmap.josm.tools.GBC; … … 110 111 p.add(new JScrollPane(desc), GBC.eop().fill(GBC.BOTH)); 111 112 112 JCheckBox author = new JCheckBox(tr("Add author information"), Main.pref.getBoolean("lastAddAuthor", true));113 JCheckBox author = new JCheckBox(tr("Add author information"), Config.getPref().getBoolean("lastAddAuthor", true)); 113 114 p.add(author, GBC.eol()); 114 115 … … 162 163 setCanceled(false); 163 164 164 Main.pref.putBoolean("lastAddAuthor", author.isSelected());165 Config.getPref().putBoolean("lastAddAuthor", author.isSelected()); 165 166 if (!authorName.getText().isEmpty()) { 166 Main.pref.put("lastAuthorName", authorName.getText());167 Config.getPref().put("lastAuthorName", authorName.getText()); 167 168 } 168 169 if (!copyright.getText().isEmpty()) { 169 Main.pref.put("lastCopyright", copyright.getText());170 Config.getPref().put("lastCopyright", copyright.getText()); 170 171 } 171 172 … … 231 232 } 232 233 if (copyright.getText().isEmpty()) { 233 copyright.setText(Optional.ofNullable(data.getString(META_COPYRIGHT_LICENSE)).orElseGet( 234 () -> Main.pref.get("lastCopyright", "https://creativecommons.org/licenses/by-sa/2.5"))); 234 copyright.setText(Optional.ofNullable(data.getString(META_COPYRIGHT_LICENSE)).orElseGet(() -> Config.getPref().get("lastCopyright", "https://creativecommons.org/licenses/by-sa/2.5"))); 235 235 copyright.setCaretPosition(0); 236 236 } … … 280 280 emailLabel.setEnabled(b); 281 281 if (b) { 282 authorName.setText(Optional.ofNullable(data.getString(META_AUTHOR_NAME)).orElseGet(() -> Main.pref.get("lastAuthorName")));283 email.setText(Optional.ofNullable(data.getString(META_AUTHOR_EMAIL)).orElseGet(() -> Main.pref.get("lastAuthorEmail")));282 authorName.setText(Optional.ofNullable(data.getString(META_AUTHOR_NAME)).orElseGet(() -> Config.getPref().get("lastAuthorName"))); 283 email.setText(Optional.ofNullable(data.getString(META_AUTHOR_EMAIL)).orElseGet(() -> Config.getPref().get("lastAuthorEmail"))); 284 284 } else { 285 285 authorName.setText("");
Note:
See TracChangeset
for help on using the changeset viewer.