Changeset 14153 in josm for trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
- Timestamp:
- 2018-08-13T02:18:54+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r14010 r14153 60 60 import javax.swing.event.DocumentListener; 61 61 62 import org.openstreetmap.josm.Main;63 62 import org.openstreetmap.josm.actions.DiskAccessAction; 64 63 import org.openstreetmap.josm.actions.ExtensionFileFilter; … … 133 132 timezone = Timezone.parseTimezone(tfTimezone.getText().trim()); 134 133 } catch (ParseException e) { 135 JOptionPane.showMessageDialog(Main .parent, e.getMessage(),134 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), e.getMessage(), 136 135 tr("Invalid timezone"), JOptionPane.ERROR_MESSAGE); 137 136 return AGAIN; … … 141 140 delta = Offset.parseOffset(tfOffset.getText().trim()); 142 141 } catch (ParseException e) { 143 JOptionPane.showMessageDialog(Main .parent, e.getMessage(),142 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), e.getMessage(), 144 143 tr("Invalid offset"), JOptionPane.ERROR_MESSAGE); 145 144 return AGAIN; … … 147 146 148 147 if (lastNumMatched == 0 && new ExtendedDialog( 149 Main .parent,148 MainApplication.getMainFrame(), 150 149 tr("Correlate images with GPX track"), 151 150 tr("OK"), tr("Try Again")). … … 272 271 if (!sel.getName().equals(wrapper.name)) { 273 272 JOptionPane.showMessageDialog( 274 Main .parent,273 MainApplication.getMainFrame(), 275 274 tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name), 276 275 tr("Error"), … … 291 290 Logging.error(ex); 292 291 JOptionPane.showMessageDialog( 293 Main .parent,292 MainApplication.getMainFrame(), 294 293 tr("Error while parsing {0}", sel.getName())+": "+ex.getMessage(), 295 294 tr("Error"), … … 300 299 Logging.error(ex); 301 300 JOptionPane.showMessageDialog( 302 Main .parent,301 MainApplication.getMainFrame(), 303 302 tr("Could not read \"{0}\"", sel.getName())+'\n'+ex.getMessage(), 304 303 tr("Error"), … … 490 489 while (!isOk) { 491 490 int answer = JOptionPane.showConfirmDialog( 492 Main .parent, panel,491 MainApplication.getMainFrame(), panel, 493 492 tr("Synchronize time from a photo of the GPS receiver"), 494 493 JOptionPane.OK_CANCEL_OPTION, … … 504 503 - dateFormat.parse(tfGpsTime.getText()).getTime(); 505 504 } catch (ParseException e) { 506 JOptionPane.showMessageDialog(Main .parent, tr("Error while parsing the date.\n"505 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Error while parsing the date.\n" 507 506 + "Please use the requested format"), 508 507 tr("Invalid date"), JOptionPane.ERROR_MESSAGE); … … 723 722 if (!GraphicsEnvironment.isHeadless()) { 724 723 syncDialog = new ExtendedDialog( 725 Main .parent,724 MainApplication.getMainFrame(), 726 725 tr("Correlate images with GPX track"), 727 726 new String[] {tr("Correlate"), tr("Cancel")}, … … 932 931 } catch (JosmRuntimeException | IllegalArgumentException | IllegalStateException e) { 933 932 Logging.warn(e); 934 JOptionPane.showMessageDialog(Main .parent,933 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 935 934 tr("An error occurred while trying to match the photos to the GPX track." 936 935 +" You can adjust the sliders to manually match the photos."), … … 950 949 // immediately. Therefore "Close" is marked with an "OK" icon. 951 950 // Settings are only saved temporarily to the layer. 952 new ExtendedDialog(Main .parent,951 new ExtendedDialog(MainApplication.getMainFrame(), 953 952 tr("Adjust timezone and offset"), 954 953 tr("Close")). … … 1012 1011 } catch (IndexOutOfBoundsException ex) { 1013 1012 Logging.debug(ex); 1014 JOptionPane.showMessageDialog(Main .parent,1013 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 1015 1014 tr("The selected photos do not contain time information."), 1016 1015 tr("Photos do not contain time information"), JOptionPane.WARNING_MESSAGE); … … 1018 1017 } catch (NoGpxTimestamps ex) { 1019 1018 Logging.debug(ex); 1020 JOptionPane.showMessageDialog(Main .parent,1019 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), 1021 1020 tr("The selected GPX track does not contain timestamps. Please select another one."), 1022 1021 tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE); … … 1081 1080 if (item == null || ((GpxDataWrapper) item).file == null) { 1082 1081 if (complain) { 1083 JOptionPane.showMessageDialog(Main .parent, tr("You should select a GPX track"),1082 JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("You should select a GPX track"), 1084 1083 tr("No selected GPX track"), JOptionPane.ERROR_MESSAGE); 1085 1084 }
Note:
See TracChangeset
for help on using the changeset viewer.