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.
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;
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());
}
// 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);
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
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 */
-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
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;
*/
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
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 ?
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
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
# 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
-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.
=======
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
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:
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];
// 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))
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)
{
}
if (inIsVersion1_1) {inWriter.write('\t');}
inWriter.write("\t<desc>");
- inWriter.write(desc);
+ inWriter.write(inDesc);
inWriter.write("</desc>\n");
if (inIsVersion1_1)
{
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");
// 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;