Index: /applications/editors/josm/plugins/agpifoj/build.xml
===================================================================
--- /applications/editors/josm/plugins/agpifoj/build.xml	(revision 17355)
+++ /applications/editors/josm/plugins/agpifoj/build.xml	(revision 17356)
@@ -34,5 +34,5 @@
                 <attribute name="Plugin-Early" value="false"/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/AgPifoJ"/>
-                <attribute name="Plugin-Mainversion" value="1893"/>
+                <attribute name="Plugin-Mainversion" value="2005"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
             </manifest>
Index: /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/CorrelateGpxWithImages.java
===================================================================
--- /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/CorrelateGpxWithImages.java	(revision 17355)
+++ /applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/CorrelateGpxWithImages.java	(revision 17356)
@@ -148,5 +148,5 @@
                             cbGpx.setSelectedIndex(i);
                             if (!sel.getName().equals(wrapper.name)) {
-                                OptionPaneUtil.showMessageDialog(
+                                JOptionPane.showMessageDialog(
                                 		Main.parent,
                                         tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name),
@@ -172,5 +172,5 @@
                 } catch (SAXException x) {
                     x.printStackTrace();
-                    OptionPaneUtil.showMessageDialog(
+                    JOptionPane.showMessageDialog(
                     		Main.parent, 
                     		tr("Error while parsing {0}",sel.getName())+": "+x.getMessage(),
@@ -181,5 +181,5 @@
                 } catch (IOException x) {
                     x.printStackTrace();
-                    OptionPaneUtil.showMessageDialog(
+                    JOptionPane.showMessageDialog(
                     		Main.parent, 
                     		tr("Could not read \"{0}\"",sel.getName())+"\n"+x.getMessage(),
@@ -386,5 +386,5 @@
             boolean isOk = false;
             while (! isOk) {
-                int answer = OptionPaneUtil.showConfirmationDialog(
+                int answer = JOptionPane.showConfirmDialog(
                 		Main.parent, panel, 
                 		tr("Synchronize time from a photo of the GPS receiver"), 
@@ -402,5 +402,5 @@
                             - dateFormat.parse(tfGpsTime.getText()).getTime();
                 } catch(ParseException e) {
-                    OptionPaneUtil.showMessageDialog(Main.parent, tr("Error while parsing the date.\n"
+                    JOptionPane.showMessageDialog(Main.parent, tr("Error while parsing the date.\n"
                             + "Please use the requested format"),
                             tr("Invalid date"), JOptionPane.ERROR_MESSAGE );
@@ -586,5 +586,5 @@
 
             if (item == null || ! (item instanceof GpxDataWrapper)) {
-                OptionPaneUtil.showMessageDialog(Main.parent, tr("You should select a GPX track"),
+                JOptionPane.showMessageDialog(Main.parent, tr("You should select a GPX track"),
                                               tr("No selected GPX track"), JOptionPane.ERROR_MESSAGE );
                 continue;
@@ -599,5 +599,5 @@
             Float timezoneValue = parseTimezone(tfTimezone.getText().trim());
             if (timezoneValue == null) {
-                OptionPaneUtil.showMessageDialog(Main.parent, tr("Error while parsing timezone.\nExpected format: {0}", "+H:MM"),
+                JOptionPane.showMessageDialog(Main.parent, tr("Error while parsing timezone.\nExpected format: {0}", "+H:MM"),
                         tr("Invalid timezone"), JOptionPane.ERROR_MESSAGE);
                 continue;
@@ -612,5 +612,5 @@
                     delta = Long.parseLong(deltaText);
                 } catch(NumberFormatException nfe) {
-                    OptionPaneUtil.showMessageDialog(Main.parent, tr("Error while parsing offset.\nExpected format: {0}", "number"),
+                    JOptionPane.showMessageDialog(Main.parent, tr("Error while parsing offset.\nExpected format: {0}", "number"),
                             tr("Invalid offset"), JOptionPane.ERROR_MESSAGE);
                     continue;
@@ -691,5 +691,5 @@
         // no images found, exit
         if(autoImgs.size() <= 0) {
-            OptionPaneUtil.showMessageDialog(Main.parent,
+            JOptionPane.showMessageDialog(Main.parent,
                 tr("The selected photos don't contain time information."),
                 tr("Photos don't contain time information"), JOptionPane.WARNING_MESSAGE);
@@ -698,6 +698,5 @@
 
         AgpifojDialog dialog = AgpifojDialog.getInstance();
-        dialog.action.button.setSelected(true);
-        dialog.action.actionPerformed(null);
+        dialog.showDialog();
         // Will show first photo if none is selected yet
         if(!dialog.hasImage())
@@ -727,5 +726,5 @@
         // No GPX timestamps found, exit
         if(firstGPXDate < 0) {
-            OptionPaneUtil.showMessageDialog(Main.parent,
+            JOptionPane.showMessageDialog(Main.parent,
                 tr("The selected GPX track doesn't contain timestamps. Please select another one."),
                 tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE);
@@ -864,5 +863,5 @@
             sldSeconds.setValue(offset%60);
         } catch(Exception e) {
-            OptionPaneUtil.showMessageDialog(Main.parent,
+            JOptionPane.showMessageDialog(Main.parent,
                 tr("An error occurred while trying to match the photos to the GPX track."
                     +" You can adjust the sliders to manually match the photos."),
