Changeset 34535 in osm for applications/editors
- Timestamp:
- 2018-08-18T18:57:34+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/OpeningHoursEditor
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/OpeningHoursEditor/build.xml
r33876 r34535 4 4 <property name="commit.message" value="fixed main version"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 2643"/>6 <property name="plugin.main.version" value="14153"/> 7 7 8 8 <property name="plugin.author" value="Falko Thomale"/> -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/ClockSystem.java
r33876 r34535 6 6 import java.util.Locale; 7 7 8 import org.openstreetmap.josm.Main;9 8 import org.openstreetmap.josm.tools.Logging; 10 9 -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/OhePlugin.java
r33876 r34535 35 35 import javax.swing.table.DefaultTableModel; 36 36 37 import org.openstreetmap.josm.Main;38 37 import org.openstreetmap.josm.actions.JosmAction; 39 38 import org.openstreetmap.josm.command.ChangePropertyCommand; 40 39 import org.openstreetmap.josm.command.Command; 41 40 import org.openstreetmap.josm.command.SequenceCommand; 41 import org.openstreetmap.josm.data.UndoRedoHandler; 42 42 import org.openstreetmap.josm.data.osm.OsmPrimitive; 43 43 import org.openstreetmap.josm.gui.MainApplication; … … 47 47 import org.openstreetmap.josm.plugins.PluginInformation; 48 48 import org.openstreetmap.josm.plugins.ohe.gui.OheDialogPanel; 49 import org.openstreetmap.josm.spi.preferences.Config; 49 50 import org.openstreetmap.josm.tools.GBC; 50 51 import org.openstreetmap.josm.tools.Shortcut; … … 57 58 /** 58 59 * 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[] -> 60 61 * {key, value, key-to-edit} key and value can contain regular expressions 61 62 */ … … 260 261 261 262 // 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", 263 264 ClockSystem.getClockSystem(Locale.getDefault()).toString())); 264 265 … … 275 276 JOptionPane optionPane = new JOptionPane(dlgPanel, JOptionPane.QUESTION_MESSAGE, 276 277 JOptionPane.OK_CANCEL_OPTION); 277 JDialog dlg = optionPane.createDialog(Main .parent, tr("Choose key"));278 JDialog dlg = optionPane.createDialog(MainApplication.getMainFrame(), tr("Choose key")); 278 279 dlg.pack(); 279 280 dlg.setResizable(true); … … 295 296 296 297 // save the value for the clocksystem (12h/24h) 297 Main.pref.put("ohe.clocksystem", (useTwelveHourClock.isSelected() ? ClockSystem.TWELVE_HOURS298 Config.getPref().put("ohe.clocksystem", (useTwelveHourClock.isSelected() ? ClockSystem.TWELVE_HOURS 298 299 : ClockSystem.TWENTYFOUR_HOURS).toString()); 299 300 … … 302 303 303 304 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")); 305 306 dlg.setResizable(true); 306 307 dlg.setVisible(true); … … 328 329 return; 329 330 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)); 331 332 } else { 332 333 Collection<Command> commands = new Vector<>(); … … 352 353 commands.add(new ChangePropertyCommand(selection, newkey, value)); 353 354 } 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", 355 356 "Change properties of up to {0} objects", selection.size(), selection.size()), commands)); 356 357 } -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheDialogPanel.java
r33876 r34535 18 18 import javax.swing.JTextField; 19 19 20 import org.openstreetmap.josm.Main;21 20 import org.openstreetmap.josm.plugins.ohe.ClockSystem; 22 21 import org.openstreetmap.josm.plugins.ohe.OhePlugin; -
applications/editors/josm/plugins/OpeningHoursEditor/src/org/openstreetmap/josm/plugins/ohe/gui/OheEditor.java
r33876 r34535 16 16 import javax.swing.JScrollPane; 17 17 18 import org.openstreetmap.josm.Main;19 18 import org.openstreetmap.josm.plugins.ohe.ClockSystem; 20 19 import org.openstreetmap.josm.plugins.ohe.OpeningTimeUtils;
Note:
See TracChangeset
for help on using the changeset viewer.