]> gitweb.fperrin.net Git - GpsPrune.git/commitdiff
Version 18.3, February 2016
authoractivityworkshop <mail@activityworkshop.net>
Thu, 10 Mar 2016 18:54:51 +0000 (19:54 +0100)
committeractivityworkshop <mail@activityworkshop.net>
Thu, 10 Mar 2016 18:54:51 +0000 (19:54 +0100)
README.md
tim/prune/GpsPrune.java
tim/prune/config/Config.java
tim/prune/copyright.txt
tim/prune/function/SaveConfig.java
tim/prune/lang/prune-texts_fr.properties
tim/prune/readme.txt
tim/prune/save/GpxExporter.java
tim/prune/save/KmlExporter.java
tim/prune/save/xml/XmlUtils.java

index 373a9922d347c4220975f971a0c0644a98ff3eb0..0c5eb639a4ce61b792c8556e6926547a10a8dd62 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,5 +3,5 @@ GpsPrune is a map-based application for viewing, editing and converting coordina
 
 It's a cross-platform java application, and its home page is at http://gpsprune.activityworkshop.net .
 
-Here on github you'll find all the sources from version 1 to the current version 18.2, and in the wiki at https://github.com/activityworkshop/GpsPrune/wiki there's the beginning of a translation effort for anyone to contribute.
+Here on github you'll find all the sources from version 1 to the current version 18.3, and in the wiki at https://github.com/activityworkshop/GpsPrune/wiki there's the beginning of a translation effort for anyone to contribute.
 Currently just the Spanish translations are online, to see whether it's a workable idea or not.  Please help with this if you can.
index 3a112b557a3d89dceed34285c943b226b35207df..2708fc08a9ae7aec73cc5e2f5e1f78b1f3b57704 100644 (file)
@@ -36,9 +36,9 @@ import tim.prune.gui.profile.ProfileChart;
 public class GpsPrune
 {
        /** Version number of application, used in about screen and for version check */
-       public static final String VERSION_NUMBER = "18.2";
+       public static final String VERSION_NUMBER = "18.3";
        /** Build number, just used for about screen */
-       public static final String BUILD_NUMBER = "336a";
+       public static final String BUILD_NUMBER = "336b";
        /** Static reference to App object */
        private static App APP = null;
 
@@ -233,7 +233,7 @@ public class GpsPrune
                try
                {
                        ArrayList<Image> icons = new ArrayList<Image>();
-                       String[] resolutions = {"_16", "_20", "_32", "_64", "_128"};
+                       String[] resolutions = {"_16", "_20", "_22", "_24", "_32", "_36", "_48", "_64", "_72", "_96", "_128"};
                        for (String r : resolutions) {
                                icons.add(IconManager.getImageIcon(IconManager.WINDOW_ICON + r + ".png").getImage());
                        }
@@ -255,7 +255,10 @@ public class GpsPrune
 
                // finish off and display frame
                frame.pack();
-               frame.setSize(650, 450);
+               if (!setFrameBoundsFromConfig(frame))
+               {
+                       frame.setSize(650, 450);
+               }
                frame.setVisible(true);
                // Set position of map/profile splitter
                midSplit.setDividerLocation(0.75);
@@ -270,6 +273,38 @@ public class GpsPrune
                APP.loadDataFiles(inDataFiles);
        }
 
+
+       /**
+        * Set the frame bounds using the saved config setting
+        * @param inFrame frame to set the bounds of
+        * @return true on success
+        */
+       private static boolean setFrameBoundsFromConfig(JFrame inFrame)
+       {
+               // Try to get bounds from config
+               String bounds = Config.getConfigString(Config.KEY_WINDOW_BOUNDS);
+               try
+               {
+                       String[] boundValues = bounds.split("x");
+                       if (boundValues.length == 4)
+                       {
+                               int[] elems = new int[4];
+                               for (int i=0; i<4; i++) {
+                                       elems[i] = Integer.parseInt(boundValues[i]);
+                               }
+                               // Make sure width and height aren't stupid
+                               elems[2] = Math.max(elems[2], 400);
+                               elems[3] = Math.max(elems[3], 300);
+                               inFrame.setBounds(elems[0], elems[1], elems[2], elems[3]);
+                               return true;
+                       }
+               }
+               catch (NullPointerException npe) {}  // if no entry found in config
+               catch (NumberFormatException nfe) {} // if string couldn't be parsed
+               return false;
+       }
+
+
        /**
         * Try to guess whether it's a mistyped parameter or a mistyped filename
         * @param inParam command line argument
index 892133273ece60eb7431b3ba60172a125b5628ad..d2d49c68d7ebb93485c9a428ab6c2fb3c40f3eec 100644 (file)
@@ -63,6 +63,8 @@ public abstract class Config
        public static final String KEY_MAPSOURCE_LIST = "prune.mapsourcelist";
        /** Key for show map flag */
        public static final String KEY_SHOW_MAP = "prune.showmap";
+       /** Key for window position */
+       public static final String KEY_WINDOW_BOUNDS = "prune.windowbounds";
        /** Key for path to disk cache */
        public static final String KEY_DISK_CACHE = "prune.diskcache";
        /** Key for working online flag */
index f5bd232cc37637b6488cd950780b61f770dc8849..e623180111efd8b1c80c45ca8973229a5b5b2baa 100644 (file)
@@ -1,4 +1,4 @@
-The source code of GpsPrune is copyright 2006-2015 activityworkshop.net
+The source code of GpsPrune is copyright 2006-2016 activityworkshop.net
 and is distributed under the terms of the Gnu GPL version 2.
 
 Portions of the package jpeg.drew (if included in this package) were taken
index 7d730d1b5763d5f819a1dfdf5a1cda70ea0e4b3b..c229437f7ac4cccbcb03e852bf9aa39667d48736 100644 (file)
@@ -4,6 +4,7 @@ import java.awt.BorderLayout;
 import java.awt.Component;
 import java.awt.FlowLayout;
 import java.awt.GridLayout;
+import java.awt.Rectangle;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
@@ -158,6 +159,12 @@ public class SaveConfig extends GenericFunction
         */
        private void saveConfig(File inSaveFile)
        {
+               // Set current window position in config
+               Rectangle currBounds = _app.getFrame().getBounds();
+               String windowBounds = "" + currBounds.x + "x" + currBounds.y + "x"
+                       + currBounds.width + "x" + currBounds.height;
+               Config.setConfigString(Config.KEY_WINDOW_BOUNDS, windowBounds);
+
                // TODO: Check for null inSaveFile, then just call finish() ?
                FileOutputStream outStream = null;
                try
index 5714803a3d5e8fc7ebf288754ef78fcca2884f7f..6c0f2a243885c2ffa49e2156053fd6ebbcbb4cfe 100644 (file)
@@ -368,9 +368,12 @@ dialog.gpsies.activity.motorbiking=Moto
 dialog.gpsies.activity.snowshoe=Raquette
 dialog.gpsies.activity.sailing=Volle
 dialog.gpsies.activity.skating=Skating
+dialog.mapillary.nonefound=Aucun foto trouv\u00e9
 dialog.wikipedia.column.name=Nom de l'article
 dialog.wikipedia.column.distance=Distance
 dialog.wikipedia.nonefound=Aucune points trouv\u00e9e
+dialog.wikipedia.gallery=Galerie
+dialog.geocaching.nonefound=Aucun g\u00e9ocaches trouv\u00e9e
 dialog.correlate.notimestamps=Les points n'ont pas d'indication de temps, il n'est pas possible de les corr\u00e9ler.
 dialog.correlate.nouncorrelatedphotos=Il n'y a pas de photos non-corr\u00e9l\u00e9es.\nVoulez-vous continuer ?
 dialog.correlate.nouncorrelatedaudios=Il n'y a pas d'audios non-corr\u00e9l\u00e9s.\nVoulez-vous continuer ?
@@ -520,6 +523,8 @@ dialog.colourer.type.byvertspeed=Selon vitesse verticale
 dialog.colourer.type.bygradient=Selon la pente
 dialog.colourer.type.bydate=Selon la date
 dialog.colourer.maxcolours=Nombre de couleurs maximum
+dialog.colourer.start=Couleur au d\u00e9but
+dialog.colourer.end=Couleur \u00e0 la fin
 dialog.setlanguage.firstintro=Vous pouvez s\u00e9lectionner l'une des langues disponibles,<p> ou bien un fichier de langue \u00e0 utiliser.
 dialog.setlanguage.secondintro=Vous devez sauvegarder vos param\u00e8tres puis<p>red\u00e9marrer GpsPrune pour changer de langue.
 dialog.setlanguage.language=Langue
@@ -572,7 +577,11 @@ dialog.weather.creditnotice=Ces donn\u00e9es sont fournies par openweathermap.or
 dialog.deletebydate.nodate=Sans horodatage
 dialog.deletebydate.column.keep=Garder
 dialog.deletebydate.column.delete=Supprimer
+dialog.setaltitudetolerance.text.metres=Limite (m\u00e8tres) pour les petites diff\u00e9rences d'altitude
+dialog.setaltitudetolerance.text.feet=Limite (pieds) pour les petites diff\u00e9rences d'altitude
 dialog.autoplay.duration=Dur\u00e9e (sec)
+dialog.autoplay.usetimestamps=Utiliser information de temps
+dialog.autoplay.rewind=Retour au d\u00e9but
 dialog.autoplay.pause=Pause
 dialog.autoplay.play=Jouer
 
@@ -622,9 +631,8 @@ confirm.correlateaudios.multi=fichiers audio ont \u00e9t\u00e9 corr\u00e9l\u00e9
 # Tips
 tip.title=Astuce
 tip.useamapcache=By setting up a disk cache (Pr\u00e9f\u00e9rences -> Enregistrer les cartes sur le disque)\nyou can speed up the display and reduce network traffic.
-tip.learntimeparams=The results will be more accurate if you use\nTrace -> Learn time estimation parameters\non your recorded tracks.
+tip.learntimeparams=The results will be more accurate if you use\nTrace -> Apprentissage de l'estimation\non your recorded tracks.
 tip.downloadsrtm=You can speed this up by calling\nEn ligne -> T\u00e9l\u00e9charger les donn\u00e9es SRTM\nto save the data in your map cache.
-tip.usesrtmfor3d=This track doesn't have altitudes.\nYou can use the SRTM functions to get approximate\naltitudes for the 3d view.
 tip.manuallycorrelateone=En corr\u00e9lant manuellement au moins une photo, le d\u00e9calage de temps peut \u00eatre calcul\u00e9 pour vous.
 
 # Buttons
index d9ff49f705d68dc47d27a3c80c0dbcc15b08c8b2..e507292ab6206be5c6c5802493f66143d73d7022 100644 (file)
@@ -1,11 +1,11 @@
-GpsPrune version 18.2
+GpsPrune version 18.3
 =====================
 
 GpsPrune is an application for viewing, editing and managing coordinate data from GPS systems,
 including format conversion, charting, 3d visualisation, audio and photo correlation, and online resource lookup.
 Full details can be found at http://gpsprune.activityworkshop.net/
 
-GpsPrune is copyright 2006-2015 activityworkshop.net and distributed under the terms of the Gnu GPL version 2.
+GpsPrune is copyright 2006-2016 activityworkshop.net and distributed under the terms of the Gnu GPL version 2.
 You may freely use the software, and may help others to freely use it too.  For further information
 on your rights and how they are protected, see the included license.txt file.
 
@@ -17,7 +17,7 @@ Running
 =======
 
 To run GpsPrune from the jar file, simply call it from a command prompt or shell:
-   java -jar gpsprune_18.2.jar
+   java -jar gpsprune_18.3.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
@@ -25,9 +25,16 @@ in a file manager window to execute it.  A shortcut, menu item, alias, desktop i
 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 gpsprune_18.2.jar --lang=DE
+   java -jar gpsprune_18.3.jar --lang=DE
 
 
+New with version 18.3
+=====================
+The following fixes and additions were made since version 18.2:
+  - Fix for saving track names and descriptions containing ampersands in xml formats (thanks, Joe!)
+  - Additional window icon sizes (thanks, Sebastic!)
+  - Remember window size
+
 New with version 18.2
 =====================
 The following fixes and additions were made since version 18.1:
index ff2c98fb6c57971d7925ffbaae9119f930f1b267..936361680495e30a75f528d62e465d32a72260c8 100644 (file)
@@ -347,11 +347,11 @@ public class GpxExporter extends GenericFunction implements Runnable
                final String gpxHeader = getGpxHeaderString(inGpxCachers);
                final boolean isVersion1_1 = (gpxHeader.toUpperCase().indexOf("GPX/1/1") > 0);
                inWriter.write(gpxHeader);
-               // Name field
-               String trackName = (inName != null && !inName.equals("")) ? inName : "GpsPruneTrack";
-               writeNameAndDescription(inWriter, inName, inDesc, isVersion1_1);
+               // name and description
+               String trackName = (inName != null && !inName.equals("")) ? XmlUtils.fixCdata(inName) : "GpsPruneTrack";
+               String desc      = (inDesc != null && !inDesc.equals("")) ? XmlUtils.fixCdata(inDesc) : "Export from GpsPrune";
+               writeNameAndDescription(inWriter, trackName, desc, isVersion1_1);
 
-               int i = 0;
                DataPoint point = null;
                final boolean exportTrackpoints = inSaveFlags[0];
                final boolean exportWaypoints = inSaveFlags[1];
@@ -368,7 +368,7 @@ public class GpxExporter extends GenericFunction implements Runnable
                // Loop over waypoints
                final int numPoints = inInfo.getTrack().getNumPoints();
                int numSaved = 0;
-               for (i=0; i<numPoints; i++)
+               for (int i=0; i<numPoints; i++)
                {
                        point = inInfo.getTrack().getPoint(i);
                        if (!exportSelection || (i>=selStart && i<=selEnd))
@@ -423,7 +423,6 @@ public class GpxExporter extends GenericFunction implements Runnable
        private static void writeNameAndDescription(OutputStreamWriter inWriter,
                String inName, String inDesc, boolean inIsVersion1_1) throws IOException
        {
-               String desc = (inDesc != null && !inDesc.equals("")) ? inDesc : "Export from GpsPrune";
                // Position of name and description fields needs to be different for GPX1.0 and GPX1.1
                if (inIsVersion1_1)
                {
@@ -439,7 +438,7 @@ public class GpxExporter extends GenericFunction implements Runnable
                }
                if (inIsVersion1_1) {inWriter.write('\t');}
                inWriter.write("\t<desc>");
-               inWriter.write(desc);
+               inWriter.write(inDesc);
                inWriter.write("</desc>\n");
                if (inIsVersion1_1)
                {
index 1de5fad5f7e7c5da20372dfcdc23bfa7ae2ee1b9..bb1d5a3239a238d40953d5d4f004fed76ee6b87d 100644 (file)
@@ -483,7 +483,7 @@ public class KmlExporter extends GenericFunction implements Runnable
                inWriter.write("<Folder>\n\t<name>");
                if (_descriptionField != null && _descriptionField.getText() != null && !_descriptionField.getText().equals(""))
                {
-                       inWriter.write(_descriptionField.getText());
+                       inWriter.write(XmlUtils.fixCdata(_descriptionField.getText()));
                }
                else {
                        inWriter.write("Export from GpsPrune");
index 3943d078de1c1166e708a15345989df0ef7fc428..643ebb015c5d8aa6a0e1dd1c3bb754ddb355fd11 100644 (file)
@@ -37,7 +37,7 @@ public abstract class XmlUtils
                // Remove all instances of end block
                result = result.replaceAll(CDATA_END, "");
                // Now check whether cdata block is required
-               if (!XmlUtils.hasIllegalCharacter(result)) {
+               if (!hasIllegalCharacter(result)) {
                        return result;
                }
                return CDATA_START + result + CDATA_END;