Changeset 34535 in osm


Ignore:
Timestamp:
2018-08-18T18:57:34+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/OpeningHoursEditor
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/OpeningHoursEditor/build.xml

    r33876 r34535  
    44    <property name="commit.message" value="fixed main version"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="12643"/>
     6    <property name="plugin.main.version" value="14153"/>
    77       
    88    <property name="plugin.author" value="Falko Thomale"/>
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/ClockSystem.java

    r33876 r34535  
    66import java.util.Locale;
    77
    8 import org.openstreetmap.josm.Main;
    98import org.openstreetmap.josm.tools.Logging;
    109
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java

    r33876 r34535  
    3535import javax.swing.table.DefaultTableModel;
    3636
    37 import org.openstreetmap.josm.Main;
    3837import org.openstreetmap.josm.actions.JosmAction;
    3938import org.openstreetmap.josm.command.ChangePropertyCommand;
    4039import org.openstreetmap.josm.command.Command;
    4140import org.openstreetmap.josm.command.SequenceCommand;
     41import org.openstreetmap.josm.data.UndoRedoHandler;
    4242import org.openstreetmap.josm.data.osm.OsmPrimitive;
    4343import org.openstreetmap.josm.gui.MainApplication;
     
    4747import org.openstreetmap.josm.plugins.PluginInformation;
    4848import org.openstreetmap.josm.plugins.ohe.gui.OheDialogPanel;
     49import org.openstreetmap.josm.spi.preferences.Config;
    4950import org.openstreetmap.josm.tools.GBC;
    5051import org.openstreetmap.josm.tools.Shortcut;
     
    5758    /**
    5859     * Strings for choosing which key of an object with given tags should be
    59      * edited, the order is referencing the preference of the keys, String[] ->
     60     * edited, the order is referencing the preference of the keys, String[] -&gt;
    6061     * {key, value, key-to-edit} key and value can contain regular expressions
    6162     */
     
    260261
    261262            // load the preference for the clocksystem (12h/24h)
    262             ClockSystem clockSystem = ClockSystem.valueOf(Main.pref.get("ohe.clocksystem",
     263            ClockSystem clockSystem = ClockSystem.valueOf(Config.getPref().get("ohe.clocksystem",
    263264                    ClockSystem.getClockSystem(Locale.getDefault()).toString()));
    264265
     
    275276            JOptionPane optionPane = new JOptionPane(dlgPanel, JOptionPane.QUESTION_MESSAGE,
    276277                    JOptionPane.OK_CANCEL_OPTION);
    277             JDialog dlg = optionPane.createDialog(Main.parent, tr("Choose key"));
     278            JDialog dlg = optionPane.createDialog(MainApplication.getMainFrame(), tr("Choose key"));
    278279            dlg.pack();
    279280            dlg.setResizable(true);
     
    295296
    296297            // save the value for the clocksystem (12h/24h)
    297             Main.pref.put("ohe.clocksystem", (useTwelveHourClock.isSelected() ? ClockSystem.TWELVE_HOURS
     298            Config.getPref().put("ohe.clocksystem", (useTwelveHourClock.isSelected() ? ClockSystem.TWELVE_HOURS
    298299                    : ClockSystem.TWENTYFOUR_HOURS).toString());
    299300
     
    302303
    303304            optionPane = new JOptionPane(panel, JOptionPane.PLAIN_MESSAGE, JOptionPane.OK_CANCEL_OPTION);
    304             dlg = optionPane.createDialog(Main.parent, tr("Edit"));
     305            dlg = optionPane.createDialog(MainApplication.getMainFrame(), tr("Edit"));
    305306            dlg.setResizable(true);
    306307            dlg.setVisible(true);
     
    328329                return;
    329330            if (key.equals(newkey) || value == null) {
    330                 Main.main.undoRedo.add(new ChangePropertyCommand(selection, newkey, value));
     331                UndoRedoHandler.getInstance().add(new ChangePropertyCommand(selection, newkey, value));
    331332            } else {
    332333                Collection<Command> commands = new Vector<>();
     
    352353                    commands.add(new ChangePropertyCommand(selection, newkey, value));
    353354                }
    354                 Main.main.undoRedo.add(new SequenceCommand(trn("Change properties of up to {0} object",
     355                UndoRedoHandler.getInstance().add(new SequenceCommand(trn("Change properties of up to {0} object",
    355356                        "Change properties of up to {0} objects", selection.size(), selection.size()), commands));
    356357            }
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java

    r33876 r34535  
    1818import javax.swing.JTextField;
    1919
    20 import org.openstreetmap.josm.Main;
    2120import org.openstreetmap.josm.plugins.ohe.ClockSystem;
    2221import org.openstreetmap.josm.plugins.ohe.OhePlugin;
  • applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java

    r33876 r34535  
    1616import javax.swing.JScrollPane;
    1717
    18 import org.openstreetmap.josm.Main;
    1918import org.openstreetmap.josm.plugins.ohe.ClockSystem;
    2019import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils;
Note: See TracChangeset for help on using the changeset viewer.