Ignore:
Timestamp:
2012-01-04T08:45:12+01:00 (13 years ago)
Author:
jttt
Message:

Fix #7208 Plugin does not compile

Location:
applications/editors/josm/plugins/photo_geotagging
Files:
1 added
2 edited

Legend:

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

    r27019 r27401  
    2727    <property name="commit.message" value="fixed josm bug 5800 - 'Override old backup files?' message window can't get focus"/>
    2828    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    29     <property name="plugin.main.version" value="4549"/>
     29    <property name="plugin.main.version" value="4762"/>
    3030
    3131    <!--
  • applications/editors/josm/plugins/photo_geotagging/src/org/openstreetmap/josm/plugins/photo_geotagging/GeotaggingAction.java

    r27370 r27401  
    3838import org.openstreetmap.josm.gui.layer.geoimage.GeoImageLayer;
    3939import org.openstreetmap.josm.gui.layer.geoimage.ImageEntry;
    40 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
    4140import org.openstreetmap.josm.tools.GBC;
    4241import org.openstreetmap.josm.tools.ImageProvider;
     
    4645 */
    4746class GeotaggingAction extends AbstractAction implements LayerAction {
    48    
     47
    4948    final static boolean debug = false;
    5049    final static String KEEP_BACKUP = "plugins.photo_geotagging.keep_backup";
     
    5857    }
    5958
    60     public void actionPerformed(ActionEvent arg0) {
     59    @Override
     60        public void actionPerformed(ActionEvent arg0) {
    6161
    6262        GeoImageLayer layer = getLayer();
     
    112112
    113113        setMTime.addActionListener(new ActionListener(){
    114             public void actionPerformed(ActionEvent e) {
     114            @Override
     115                        public void actionPerformed(ActionEvent e) {
    115116                if (setMTime.isSelected()) {
    116117                    mTimeMode.setEnabled(true);
     
    228229                    // need this so the dialogs don't block
    229230                    SwingUtilities.invokeLater(new Runnable() {
    230                         public void run() {
     231                        @Override
     232                                                public void run() {
    231233                            JOptionPane.showMessageDialog(Main.parent, ioe.getMessage(), tr("Error"), JOptionPane.ERROR_MESSAGE);
    232234                        }
     
    276278            File fileTmp;
    277279            //fileTmp = File.createTempFile("img", ".jpg", file.getParentFile());
    278             // on win32, file.renameTo(fileTmp) does not work when the destination file exists 
     280            // on win32, file.renameTo(fileTmp) does not work when the destination file exists
    279281            // see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4017593
    280             // so we cannot use createTempFile(), which would create that "existing destination file" 
     282            // so we cannot use createTempFile(), which would create that "existing destination file"
    281283            // instead, let's use new File(), which doesn't actually create a file
    282284            // for getting a unique file name, we use UUID.randomUUID()
     
    298300            try {
    299301                SwingUtilities.invokeAndWait(new Runnable() {
    300                     public void run() {
     302                    @Override
     303                                        public void run() {
    301304                        JLabel l = new JLabel(tr("<html><h3>There are old backup files in the image directory!</h3>"));
    302305                        l.setIcon(UIManager.getIcon("OptionPane.warningIcon"));
    303306                        int override = new ExtendedDialog(
    304                                 Main.parent,
     307                                progressMonitor.getWindowParent(),
    305308                                tr("Override old backup files?"),
    306309                                new String[] {tr("Cancel"), tr("Keep old backups and continue"), tr("Override")})
     
    375378    }
    376379
    377     public Component createMenuComponent() {
     380    @Override
     381        public Component createMenuComponent() {
    378382        JMenuItem geotaggingItem = new JMenuItem(this);
    379383        geotaggingItem.setEnabled(enabled(getLayer()));
     
    381385    }
    382386
    383     public boolean supportLayers(List<Layer> layers) {
     387    @Override
     388        public boolean supportLayers(List<Layer> layers) {
    384389        return layers.size() == 1 && layers.get(0) instanceof GeoImageLayer;
    385390    }
Note: See TracChangeset for help on using the changeset viewer.