Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 2566)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java	(revision 2592)
@@ -37,4 +37,5 @@
 import javax.swing.ButtonGroup;
 import javax.swing.JButton;
+import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JFileChooser;
@@ -149,5 +150,5 @@
                             if (!sel.getName().equals(wrapper.name)) {
                                 JOptionPane.showMessageDialog(
-                                		Main.parent,
+                                        Main.parent,
                                         tr("File {0} is loaded yet under the name \"{1}\"", sel.getName(), wrapper.name),
                                         tr("Error"),
@@ -173,18 +174,18 @@
                     x.printStackTrace();
                     JOptionPane.showMessageDialog(
-                    		Main.parent, 
-                    		tr("Error while parsing {0}",sel.getName())+": "+x.getMessage(),
-                    		tr("Error"),
-                    		JOptionPane.ERROR_MESSAGE
-                    		);
+                            Main.parent,
+                            tr("Error while parsing {0}",sel.getName())+": "+x.getMessage(),
+                            tr("Error"),
+                            JOptionPane.ERROR_MESSAGE
+                            );
                     return;
                 } catch (IOException x) {
                     x.printStackTrace();
                     JOptionPane.showMessageDialog(
-                    		Main.parent, 
-                    		tr("Could not read \"{0}\"",sel.getName())+"\n"+x.getMessage(),
-                    		tr("Error"),
-                    		JOptionPane.ERROR_MESSAGE
-                    		);
+                            Main.parent,
+                            tr("Could not read \"{0}\"",sel.getName())+"\n"+x.getMessage(),
+                            tr("Error"),
+                            JOptionPane.ERROR_MESSAGE
+                            );
                     return;
                 }
@@ -293,5 +294,5 @@
             cbTimezones = new JComboBox(vtTimezones);
 
-            String tzId = Main.pref.get("tagimages.timezoneid", "");
+            String tzId = Main.pref.get("geoimage.timezoneid", "");
             TimeZone defaultTz;
             if (tzId.length() == 0) {
@@ -351,5 +352,5 @@
 
                 public void actionPerformed(ActionEvent arg0) {
-                    JFileChooser fc = new JFileChooser(Main.pref.get("tagimages.lastdirectory"));
+                    JFileChooser fc = new JFileChooser(Main.pref.get("geoimage.lastdirectory"));
                     fc.setAcceptAllFileFilterUsed(false);
                     fc.setMultiSelectionEnabled(false);
@@ -387,9 +388,9 @@
             while (! isOk) {
                 int answer = JOptionPane.showConfirmDialog(
-                		Main.parent, panel, 
-                		tr("Synchronize time from a photo of the GPS receiver"), 
-                		JOptionPane.OK_CANCEL_OPTION,
-                		JOptionPane.QUESTION_MESSAGE
-                		);
+                        Main.parent, panel,
+                        tr("Synchronize time from a photo of the GPS receiver"),
+                        JOptionPane.OK_CANCEL_OPTION,
+                        JOptionPane.QUESTION_MESSAGE
+                        );
                 if (answer == JOptionPane.CANCEL_OPTION) {
                     return;
@@ -413,5 +414,5 @@
                 String tzValue = selectedTz.substring(pos + 1, selectedTz.length() - 1);
 
-                Main.pref.put("tagimages.timezoneid", tzId);
+                Main.pref.put("geoimage.timezoneid", tzId);
                 tfOffset.setText(Long.toString(delta / 1000));
                 tfTimezone.setText(tzValue);
@@ -476,7 +477,7 @@
         panelTf.add(new JLabel(tr("Timezone: ")), gc);
 
-        float gpstimezone = Float.parseFloat(Main.pref.get("tagimages.doublegpstimezone", "0.0"));
+        float gpstimezone = Float.parseFloat(Main.pref.get("geoimage.doublegpstimezone", "0.0"));
         if (gpstimezone == 0.0) {
-            gpstimezone = - Long.parseLong(Main.pref.get("tagimages.gpstimezone", "0"));
+            gpstimezone = - Long.parseLong(Main.pref.get("geoimage.gpstimezone", "0"));
         }
         tfTimezone = new JTextField();
@@ -498,5 +499,5 @@
         panelTf.add(new JLabel(tr("Offset:")), gc);
 
-        long delta = Long.parseLong(Main.pref.get("tagimages.delta", "0")) / 1000;
+        long delta = Long.parseLong(Main.pref.get("geoimage.delta", "0")) / 1000;
         tfOffset = new JTextField();
         tfOffset.setText(Long.toString(delta));
@@ -557,4 +558,14 @@
         panelTf.add(rbUntaggedImg, gc);
 
+        gc.gridx = 0;
+        gc.gridy = 5;
+        gc.gridwidth = 2;
+        gc.gridheight = 1;
+        gc.fill = GridBagConstraints.NONE;
+        gc.weightx = gc.weighty = 0.0;
+        yLayer.loadThumbs = Main.pref.getBoolean("geoimage.showThumbs", false);
+        JCheckBox cbShowThumbs = new JCheckBox(tr("Show Thumbnail images on the map"), yLayer.loadThumbs);
+        panelTf.add(cbShowThumbs, gc);
+
         ButtonGroup group = new ButtonGroup();
         group.add(rbAllImg);
@@ -573,14 +584,14 @@
         GpxDataWrapper selectedGpx = null;
         while (! isOk) {
-        	ExtendedDialog dialog = new ExtendedDialog(
-        			Main.parent,
+            ExtendedDialog dialog = new ExtendedDialog(
+                    Main.parent,
                 tr("Correlate images with GPX track"),
                 new String[] { tr("Correlate"), tr("Auto-Guess"), tr("Cancel") }
-        			);
-
-        	dialog.setContent(panel);
-        	dialog.setButtonIcons(new String[] { "ok.png", "dialogs/geoimage/gpx2imgManual.png", "cancel.png" });
-        	dialog.showDialog();
-        	int answer = dialog.getValue();
+                    );
+
+            dialog.setContent(panel);
+            dialog.setButtonIcons(new String[] { "ok.png", "dialogs/geoimage/gpx2imgManual.png", "cancel.png" });
+            dialog.showDialog();
+            int answer = dialog.getValue();
             if(answer != 1 && answer != 2)
                 return;
@@ -624,9 +635,18 @@
             }
 
-            Main.pref.put("tagimages.doublegpstimezone", Double.toString(gpstimezone));
-            Main.pref.put("tagimages.gpstimezone", Long.toString(- ((long) gpstimezone)));
-            Main.pref.put("tagimages.delta", Long.toString(delta * 1000));
-
+            yLayer.loadThumbs = cbShowThumbs.isSelected();
+
+            Main.pref.put("geoimage.doublegpstimezone", Double.toString(gpstimezone));
+            Main.pref.put("geoimage.gpstimezone", Long.toString(- ((long) gpstimezone)));
+            Main.pref.put("geoimage.delta", Long.toString(delta * 1000));
+            Main.pref.put("geoimage.showThumbs", yLayer.loadThumbs);
             isOk = true;
+
+            if (yLayer.loadThumbs) {
+                Thread tl = new Thread(new ThumbsLoader(yLayer.data));
+                tl.setPriority(Thread.MIN_PRIORITY);
+                tl.start();
+            }
+
         }
 
