Ignore:
Timestamp:
2017-09-14T01:59:34+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - extract "struct" handling from Preference to StructUtils

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookWindows.java

    r12846 r12851  
    6767
    6868import org.openstreetmap.josm.Main;
    69 import org.openstreetmap.josm.data.Preferences;
     69import org.openstreetmap.josm.data.StructUtils;
     70import org.openstreetmap.josm.data.StructUtils.StructEntry;
     71import org.openstreetmap.josm.data.StructUtils.WriteExplicitly;
    7072import org.openstreetmap.josm.io.CertificateAmendment.CertAmend;
    7173import org.openstreetmap.josm.spi.preferences.Config;
     
    8688         * The character subset. Basically a free identifier, but should be unique.
    8789         */
    88         @Preferences.pref
     90        @StructEntry
    8991        public String charset;
    9092
     
    9294         * Platform font name.
    9395         */
    94         @Preferences.pref
    95         @Preferences.writeExplicitly
     96        @StructEntry
     97        @WriteExplicitly
    9698        public String name = "";
    9799
     
    99101         * File name.
    100102         */
    101         @Preferences.pref
    102         @Preferences.writeExplicitly
     103        @StructEntry
     104        @WriteExplicitly
    103105        public String file = "";
    104106
     
    525527            os.write(content);
    526528            try (Writer w = new BufferedWriter(new OutputStreamWriter(os, StandardCharsets.UTF_8))) {
    527                 Collection<FontEntry> extrasPref = Main.pref.getListOfStructs(
     529                Collection<FontEntry> extrasPref = StructUtils.getListOfStructs(Config.getPref(),
    528530                        "font.extended-unicode.extra-items", getAdditionalFonts(), FontEntry.class);
    529531                Collection<FontEntry> extras = new ArrayList<>();
Note: See TracChangeset for help on using the changeset viewer.