Changeset 5432 in josm


Ignore:
Timestamp:
2012-08-12T00:25:59+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #7822 - display the EXIF/GPS time for geotagged images, when known

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r4982 r5432  
    1616import java.awt.event.KeyEvent;
    1717import java.awt.event.WindowEvent;
     18import java.text.DateFormat;
    1819
    1920import javax.swing.AbstractAction;
     
    247248            //}
    248249            //osd.append(tr("\nfile mtime: {0}", Long.toString(entry.getFile().lastModified())));
    249             //osd.append(tr("\nImage exif time: {0}", Long.toString(entry.getExifTime().getTime())));
    250             //if (entry.getGpsTime() != null) {
    251             //    osd.append(tr("\nImage gps time: {0}", Long.toString(entry.getGpsTime().getTime())));
    252             //}
     250            DateFormat dtf = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
     251            if (entry.getExifTime() != null) {
     252                osd.append(tr("\nEXIF time: {0}", dtf.format(entry.getExifTime())));
     253            }
     254            if (entry.getGpsTime() != null) {
     255                osd.append(tr("\nGPS time: {0}", dtf.format(entry.getGpsTime())));
     256            }
    253257
    254258            imgDisplay.setOsdText(osd.toString());
Note: See TracChangeset for help on using the changeset viewer.