Ignore:
Timestamp:
2016-07-14T15:18:07+02:00 (9 years ago)
Author:
floscher
Message:

Rename download modes

The labels facing the user (combobox in the settings) are now internationalized, the preference setting is not.
This change is backwards-compatible, because on each start of JOSM the plugin converts the old names of the download modes with the corresponding new one. This feature will sooner or later be removed again, but as long as every user starts JOSM at least once until then, the setting won't be affected by this change.

In some places the old names are still mentioned (e.g. comments and names of variables or methods), but the relevant occurences are now updated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSettingTest.java

    r32591 r32652  
    77import java.awt.GraphicsEnvironment;
    88import java.lang.reflect.Field;
    9 import java.util.HashMap;
    10 import java.util.Map;
    119
    1210import javax.swing.JButton;
     
    2018import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
    2119import org.openstreetmap.josm.plugins.mapillary.AbstractTest;
     20import org.openstreetmap.josm.plugins.mapillary.io.download.MapillaryDownloader.DOWNLOAD_MODE;
    2221import org.openstreetmap.josm.tools.I18n;
    2322
     
    118117      ((JComboBox<String>) getPrivateField(settings, "downloadModeComboBox")).setSelectedIndex(i);
    119118      settings.ok();
    120       assertEquals(Main.pref.get("mapillary.download-mode"),
    121           ((JComboBox<String>) getPrivateField(settings, "downloadModeComboBox")).getSelectedItem());
     119      assertEquals(
     120        Main.pref.get("mapillary.download-mode"),
     121        DOWNLOAD_MODE.fromLabel(
     122          ((JComboBox<String>) getPrivateField(settings, "downloadModeComboBox")).getSelectedItem().toString()
     123        ).getPrefId()
     124      );
    122125    }
    123126  }
Note: See TracChangeset for help on using the changeset viewer.