]> gitweb.fperrin.net Git - GpsPrune.git/commitdiff
Version 4.1, February 2008
authoractivityworkshop <mail@activityworkshop.net>
Sat, 14 Feb 2015 13:55:08 +0000 (14:55 +0100)
committeractivityworkshop <mail@activityworkshop.net>
Sat, 14 Feb 2015 13:55:08 +0000 (14:55 +0100)
tim/prune/GpsPruner.java
tim/prune/data/Track.java
tim/prune/gui/MapChart.java
tim/prune/readme.txt
tim/prune/save/ExifSaver.java

index 8a95f7f69e3f950eae3ec45cfe539f68cca1ad4b..e19cb2108b49161098484e856519011f64728a94 100644 (file)
@@ -22,9 +22,9 @@ import tim.prune.gui.SelectorDisplay;
  */
 public class GpsPruner
 {
-       // Final release of version 4
-       public static final String VERSION_NUMBER = "4";
-       public static final String BUILD_NUMBER = "089";
+       // Patch to version 4
+       public static final String VERSION_NUMBER = "4.1";
+       public static final String BUILD_NUMBER = "091";
        private static App APP = null;
 
 
index 1188a7c5a83d6edef42a2d8f66c1b7bf59f608df..f6ad709b05e3bde338749607e3526426e85b3a9a 100644 (file)
@@ -537,6 +537,23 @@ public class Track
                return _yRange;
        }
 
+       /**
+        * @return The range of lat values as a DoubleRange object
+        */
+       public DoubleRange getLatRange()
+       {
+               if (!_scaled) scalePoints();
+               return _latRange;
+       }
+       /**
+        * @return The range of lon values as a DoubleRange object
+        */
+       public DoubleRange getLonRange()
+       {
+               if (!_scaled) scalePoints();
+               return _longRange;
+       }
+
        /**
         * @param inPointNum point index, starting at 0
         * @return scaled x value of specified point
index a22cb1811b9bc513c135173011db478e24ea2ef8..a5e7819ba209ab14e6b565fc31e49cca1523e091 100644 (file)
@@ -23,6 +23,7 @@ import tim.prune.DataSubscriber;
 import tim.prune.I18nManager;
 import tim.prune.data.DataPoint;
 import tim.prune.data.TrackInfo;
+//import tim.prune.gui.map.MapWindow;
 
 
 /**
@@ -392,6 +393,16 @@ public class MapChart extends GenericChart implements MouseWheelListener, KeyLis
                _autoPanMenuItem = new JCheckBoxMenuItem(I18nManager.getText("menu.map.autopan"));
                _autoPanMenuItem.setSelected(true);
                _popup.add(_autoPanMenuItem);
+/*
+               JMenuItem mapItem = new JMenuItem("Show map");
+               mapItem.addActionListener(new ActionListener() {
+                       public void actionPerformed(ActionEvent e)
+                       {
+                               showMap();
+                       }
+               });
+               _popup.add(mapItem);
+*/
        }
 
 
@@ -631,4 +642,15 @@ public class MapChart extends GenericChart implements MouseWheelListener, KeyLis
        {
                // ignore
        }
+
+       /**
+        * Show a map window - probably only temporarily here until it gets fixed
+        */
+/*
+       private void showMap()
+       {
+               MapWindow map = new MapWindow(_track);
+               map.show();
+       }
+*/
 }
index 267378783e184130c308baad49e4197faa49e379..94702c4d736b4ef469a4469b26a2c5c53b2375bc 100644 (file)
@@ -1,5 +1,5 @@
-Prune version 4
-===============
+Prune version 4.1
+=================
 
 Prune is an application for viewing, editing and managing coordinate data from GPS systems,
 including format conversion and photo correlation.
@@ -16,17 +16,23 @@ Running
 =======
 
 To run Prune from the jar file, simply call it from a command prompt or shell:
-   java -jar prune_04.jar
+   java -jar prune_04.1.jar
 
 If the jar file is saved in a different directory, you will need to include the path.
 Depending on your system settings, you may be able to click or double-click on the jar file
-in a file manager window to execute it.  A shortcut, menu item, desktop icon or other link
-can of course be made should you wish.
+in a file manager window to execute it.  A shortcut, menu item, alias, desktop icon
+or other link can of course be made should you wish.
 
 To specify a language other than the default, use an additional parameter, eg:
-   java -jar prune_04.jar --lang=DE
+   java -jar prune_04.1.jar --lang=DE
 
 
+New with version 4.1
+====================
+
+The following fix was added since version 4:
+  - Exiftool calls now made in series rather than in parallel to avoid performance problems in Windows
+
 New with version 4
 ==================
 
index ec0c2f446840359f2d9c7a24772c6bb7883ec96e..42f9e4f80cf4c3dee51d6478eaa792ca604af6fa 100644 (file)
@@ -35,9 +35,11 @@ public class ExifSaver implements Runnable
 {
        private Frame _parentFrame = null;
        private JDialog _dialog = null;
+       private JButton _okButton = null;
        private JCheckBox _overwriteCheckbox = null;
        private JProgressBar _progressBar = null;
        private PhotoTableModel _photoTableModel = null;
+       private boolean _saveCancelled = false;
 
 
        // To preserve timestamps of file use parameter -P
@@ -167,19 +169,22 @@ public class ExifSaver implements Runnable
                // Lower panel with ok and cancel buttons
                JPanel buttonPanel = new JPanel();
                buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
-               JButton okButton = new JButton(I18nManager.getText("button.ok"));
-               okButton.addActionListener(new ActionListener() {
+               _okButton = new JButton(I18nManager.getText("button.ok"));
+               _okButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e)
                        {
+                               // disable ok button
+                               _okButton.setEnabled(false);
                                // start new thread to do save
                                new Thread(ExifSaver.this).start();
                        }
                });
-               buttonPanel.add(okButton);
+               buttonPanel.add(_okButton);
                JButton cancelButton = new JButton(I18nManager.getText("button.cancel"));
                cancelButton.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e)
                        {
+                               _saveCancelled = true;
                                _dialog.dispose();
                        }
                });
@@ -209,6 +214,7 @@ public class ExifSaver implements Runnable
         */
        public void run()
        {
+               _saveCancelled = false;
                PhotoTableEntry entry = null;
                Photo photo = null;
                int numPhotos = _photoTableModel.getRowCount();
@@ -221,7 +227,7 @@ public class ExifSaver implements Runnable
                for (int i=0; i<numPhotos; i++)
                {
                        entry = _photoTableModel.getPhotoTableEntry(i);
-                       if (entry != null && entry.getSaveFlag())
+                       if (entry != null && entry.getSaveFlag() && !_saveCancelled)
                        {
                                // Only look at photos which are selected and whose status has changed since load
                                photo = entry.getPhoto();
@@ -298,7 +304,12 @@ public class ExifSaver implements Runnable
                // Execute exif command
                try
                {
-                       Runtime.getRuntime().exec(command);
+                       Process process = Runtime.getRuntime().exec(command);
+                       // Wait for process to finish so not too many run in parallel
+                       try {
+                               process.waitFor();
+                       }
+                       catch (InterruptedException ie) {}
                }
                catch (Exception e)
                {