Index: /applications/editors/josm/plugins/DirectDownload/.classpath
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/.classpath	(revision 29776)
+++ /applications/editors/josm/plugins/DirectDownload/.classpath	(revision 29776)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
+	<classpathentry kind="output" path="build"/>
+</classpath>
Index: /applications/editors/josm/plugins/DirectDownload/.project
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/.project	(revision 29776)
+++ /applications/editors/josm/plugins/DirectDownload/.project	(revision 29776)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>JOSM-DirectDownload</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: /applications/editors/josm/plugins/DirectDownload/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/.settings/org.eclipse.jdt.core.prefs	(revision 29776)
+++ /applications/editors/josm/plugins/DirectDownload/.settings/org.eclipse.jdt.core.prefs	(revision 29776)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Index: /applications/editors/josm/plugins/DirectDownload/README
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/README	(revision 29775)
+++ /applications/editors/josm/plugins/DirectDownload/README	(revision 29776)
@@ -7,5 +7,5 @@
 track using the "Open file ..." dialog.
 
-The plugin provides a new entry "Download track ..." in the file
+The plugin provides a new entry "Download track ..." in the GPS
 menu (no keyboard shortcut yet). This opens a dialog that will
 present a list of your uploaded tracks, showing the tracks timestamp
Index: /applications/editors/josm/plugins/DirectDownload/build.xml
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/build.xml	(revision 29775)
+++ /applications/editors/josm/plugins/DirectDownload/build.xml	(revision 29776)
@@ -1,243 +1,22 @@
 <?xml version="1.0" encoding="utf-8"?>
-<!--
-** This is a template build file for a JOSM  plugin.
-**
-** Maintaining versions
-** ====================
-** see README.template
-**
-** Usage
-** =====
-** To build it run
-**
-**    > ant  dist
-**
-** To install the generated plugin locally (in you default plugin directory) run
-**
-**    > ant  install
-**
-** The generated plugin jar is not automatically available in JOSMs plugin configuration
-** dialog. You have to check it in first.
-**
-** Use the ant target 'publish' to check in the plugin and make it available to other
-** JOSM users:
-**    set the properties commit.message and plugin.main.version
-** and run
-**    > ant  publish
-**
-**
--->
 <project name="DirectDownload" default="dist" basedir=".">
     <!-- enter the SVN commit message -->
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="5679"/>
-    <!--
-      ************************************************
-      ** should not be necessary to change the following properties
-     -->
-    <property name="josm" location="../../core/dist/josm-custom.jar"/>
-    <property name="plugin.build.dir" value="build"/>
-    <property name="plugin.src.dir" value="src"/>
-    <!-- this is the directory where the plugin jar is copied to -->
-    <property name="plugin.dist.dir" value="../../dist"/>
-    <property name="ant.build.javac.target" value="1.5"/>
-    <property name="plugin.dist.dir" value="../../dist"/>
-    <property name="plugin.jar" value="${plugin.dist.dir}/${ant.project.name}.jar"/>
-    <!--
-    **********************************************************
-    ** init - initializes the build
-    **********************************************************
+    <property name="plugin.main.version" value="6082"/>
+
+    <!-- Configure these properties (replace "..." accordingly).
+         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
     -->
-    <target name="init">
-        <mkdir dir="${plugin.build.dir}"/>
-    </target>
-    <!--
-    **********************************************************
-    ** compile - complies the source tree
-    **********************************************************
-    -->
-    <target name="compile" depends="init">
-        <echo message="compiling sources for  ${plugin.jar} ... "/>
-        <javac srcdir="src" classpath="${josm}" debug="true" destdir="${plugin.build.dir}">
-            <compilerarg value="-Xlint:deprecation"/>
-            <compilerarg value="-Xlint:unchecked"/>
-        </javac>
-    </target>
-    <!--
-    **********************************************************
-    ** dist - creates the plugin jar
-    **********************************************************
-    -->
-    <target name="dist" depends="compile,revision">
-        <echo message="creating ${ant.project.name}.jar ... "/>
-        <copy todir="${plugin.build.dir}/resources">
-            <fileset dir="resources"/>
-        </copy>
-        <copy todir="${plugin.build.dir}/images">
-            <fileset dir="images"/>
-        </copy>
-        <copy todir="${plugin.build.dir}/data">
-            <fileset dir="data"/>
-        </copy>
-        <copy todir="${plugin.build.dir}">
-            <fileset dir=".">
-                <include name="README"/>
-                <include name="LICENSE"/>
-            </fileset>
-        </copy>
-        <jar destfile="${plugin.jar}" basedir="${plugin.build.dir}">
-            <!--
-        ************************************************
-        ** configure these properties. Most of them will be copied to the plugins
-        ** manifest file. Property values will also show up in the list available
-        ** plugins: http://josm.openstreetmap.de/wiki/Plugins.
-        **
-        ************************************************
-    -->
-            <manifest>
-                <attribute name="Author" value="Hartmut Holzgraefe"/>
-                <attribute name="Plugin-Class" value="org.openstreetmap.josm.plugins.directdownload.DirectDownload"/>
-                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
-                <attribute name="Plugin-Description" value="Download your GPX tracks from openstreetmap.org"/>
-                <attribute name="Plugin-Icon" value="images/DownloadAction.png"/>
-<!--            <attribute name="Plugin-Link" value="..."/> -->
-                <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/>
-                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
-            </manifest>
-        </jar>
-    </target>
-    <!--
-    **********************************************************
-    ** revision - extracts the current revision number for the
-    **    file build.number and stores it in the XML property
-    **    version.*
-    **********************************************************
-    -->
-    <target name="revision">
-        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="info"/>
-            <arg value="--xml"/>
-            <arg value="."/>
-        </exec>
-        <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
-        <delete file="REVISION"/>
-    </target>
-    <!--
-    **********************************************************
-    ** clean - clean up the build environment
-    **********************************************************
-    -->
-    <target name="clean">
-        <delete dir="${plugin.build.dir}"/>
-        <delete file="${plugin.jar}"/>
-    </target>
-    <!--
-    **********************************************************
-    ** install - install the plugin in your local JOSM installation
-    **********************************************************
-    -->
-    <target name="install" depends="dist">
-        <property environment="env"/>
-        <condition property="josm.plugins.dir" value="${env.APPDATA}/JOSM/plugins" else="${user.home}/.josm/plugins">
-            <and>
-                <os family="windows"/>
-            </and>
-        </condition>
-        <copy file="${plugin.jar}" todir="${josm.plugins.dir}"/>
-    </target>
-    <!--
-    ************************** Publishing the plugin *********************************** 
-    -->
-    <!--
-        ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
-        ** property ${coreversion.info.entry.revision}
-        **
-        -->
-    <target name="core-info">
-        <exec append="false" output="core.info.xml" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="info"/>
-            <arg value="--xml"/>
-            <arg value="../../core"/>
-        </exec>
-        <xmlproperty file="core.info.xml" prefix="coreversion" keepRoot="true" collapseAttributes="true"/>
-        <echo>Building against core revision ${coreversion.info.entry.revision}.</echo>
-        <echo>Plugin-Mainversion is set to ${plugin.main.version}.</echo>
-        <delete file="core.info.xml"/>
-    </target>
-    <!--
-        ** commits the source tree for this plugin
-        -->
-    <target name="commit-current">
-        <echo>Commiting the plugin source with message '${commit.message}' ...</echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="commit"/>
-            <arg value="-m '${commit.message}'"/>
-            <arg value="."/>
-        </exec>
-    </target>
-    <!--
-        ** updates (svn up) the source tree for this plugin
-        -->
-    <target name="update-current">
-        <echo>Updating plugin source ...</echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="up"/>
-            <arg value="."/>
-        </exec>
-        <echo>Updating ${plugin.jar} ...</echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="up"/>
-            <arg value="../dist/${plugin.jar}"/>
-        </exec>
-    </target>
-    <!--
-        ** commits the plugin.jar 
-        -->
-    <target name="commit-dist">
-        <echo>
-    ***** Properties of published ${plugin.jar} *****
-    Commit message    : '${commit.message}'                    
-    Plugin-Mainversion: ${plugin.main.version}
-    JOSM build version: ${coreversion.info.entry.revision}
-    Plugin-Version    : ${version.entry.commit.revision}
-    ***** / Properties of published ${plugin.jar} *****                    
-                        
-    Now commiting ${plugin.jar} ...
-    </echo>
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false">
-            <env key="LANG" value="C"/>
-            <arg value="-m '${commit.message}'"/>
-            <arg value="commit"/>
-            <arg value="${plugin.jar}"/>
-        </exec>
-    </target>
-    <!-- ** make sure svn is present as a command line tool ** -->
-    <target name="ensure-svn-present">
-        <exec append="true" output="svn.log" executable="svn" failifexecutionfails="false" failonerror="false" resultproperty="svn.exit.code">
-            <env key="LANG" value="C"/>
-            <arg value="--version"/>
-        </exec>
-        <fail message="Fatal: command 'svn --version' failed. Please make sure svn is installed on your system.">
-            <!-- return code not set at all? Most likely svn isn't installed -->
-            <condition>
-                <not>
-                    <isset property="svn.exit.code"/>
-                </not>
-            </condition>
-        </fail>
-        <fail message="Fatal: command 'svn --version' failed. Please make sure a working copy of svn is installed on your system.">
-            <!-- error code from SVN? Most likely svn is not what we are looking on this system -->
-            <condition>
-                <isfailure code="${svn.exit.code}"/>
-            </condition>
-        </fail>
-    </target>
-    <target name="publish" depends="ensure-svn-present,core-info,commit-current,update-current,clean,dist,commit-dist">
-    </target>
+    <property name="plugin.author" value="Hartmut Holzgraefe"/>
+    <property name="plugin.class" value="org.openstreetmap.josm.plugins.directdownload.DirectDownload"/>
+    <property name="plugin.description" value="Download your GPX tracks from openstreetmap.org"/>
+    <property name="plugin.icon" value="images/DownloadAction.png"/>
+    <!-- <property name="plugin.link" value="..."/>-->
+    <!--<property name="plugin.early" value="..."/>-->
+    <!--<property name="plugin.requires" value="..."/>-->
+    <!--<property name="plugin.stage" value="..."/>-->
+
+    <!-- ** include targets that all plugins have in common ** -->
+    <import file="../build-common.xml"/>
 </project>
Index: /applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DirectDownload.java
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DirectDownload.java	(revision 29775)
+++ /applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DirectDownload.java	(revision 29776)
@@ -3,67 +3,58 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.event.ActionEvent;
 import java.io.InputStream;
-import java.io.IOException;
-
 import java.net.URL;
 
-import java.util.List;
-
-import java.awt.event.ActionEvent;
+import javax.swing.JOptionPane;
 
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-
+import org.openstreetmap.josm.gui.MainMenu;
+import org.openstreetmap.josm.gui.layer.GpxLayer;
+import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
+import org.openstreetmap.josm.io.GpxReader;
+import org.openstreetmap.josm.io.OsmApi;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
-
-import org.openstreetmap.josm.gui.download.DownloadSelection;
-
-import org.openstreetmap.josm.gui.layer.GpxLayer;
-import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
-
-import org.openstreetmap.josm.io.GpxReader;
-
-import javax.swing.JOptionPane;
-
 import org.xml.sax.SAXException;
 
 public class DirectDownload extends Plugin {
-    DownloadAction openaction;
+    private DownloadAction openaction;
 
-     /**
-      * Will be invoked by JOSM to bootstrap the plugin
-      *
-      * @param info  information about the plugin and its local installation    
-      */
-      public DirectDownload(PluginInformation info) {
-         super(info);
+    /**
+     * Will be invoked by JOSM to bootstrap the plugin
+     *
+     * @param info  information about the plugin and its local installation    
+     */
+    public DirectDownload(PluginInformation info) {
+        super(info);
 
-	 openaction = new DownloadAction();
-	 Main.main.menu.fileMenu.add(openaction);
-      }
+        openaction = new DownloadAction();
+        MainMenu.add(Main.main.menu.gpsMenu, openaction);
+    }
 
-    class DownloadAction extends JosmAction{
-        public DownloadAction(){
-            super(tr("Download Track ..."), "DownloadAction", tr("Download GPX track from openstreetmap.org"),
-            null, false);
+    class DownloadAction extends JosmAction {
+        public DownloadAction() {
+            super(tr("Download Track ..."), "DownloadAction",
+                    tr("Download GPX track from openstreetmap.org"), null, false);
         }
+
         public void actionPerformed(ActionEvent event) {
             DownloadDataGui go = new DownloadDataGui();
             go.setVisible(true);
 
-	    UserTrack track = go.getSelectedUserTrack();
+            UserTrack track = go.getSelectedUserTrack();
 
-	    if ((go.getValue() == 1) && (track != null)) {
-		String apiBaseUrl = "http://api.openstreetmap.org/api/0.6/";
-		String urlString = apiBaseUrl + "gpx/" + track.id + "/data";
+            if ((go.getValue() == 1) && (track != null)) {
+                String urlString = OsmApi.getOsmApi().getBaseUrl() + "gpx/" + track.id + "/data";
 
-		try {
-		    URL trackDataUrl = new URL(urlString);
-		    InputStream is = trackDataUrl.openStream();
+                try {
+                    URL trackDataUrl = new URL(urlString);
+                    InputStream is = trackDataUrl.openStream();
 
-		    GpxReader r = new GpxReader(is);
-		    boolean parsedProperly = r.parse(true);
-		    GpxLayer gpxLayer = new GpxLayer(r.getGpxData(), track.filename, true);
+                    GpxReader r = new GpxReader(is);
+                    boolean parsedProperly = r.parse(true);
+                    GpxLayer gpxLayer = new GpxLayer(r.getGpxData(), track.filename, true);
 
                     if (r.getGpxData().hasRoutePoints() || r.getGpxData().hasTrackPoints()) {
@@ -78,18 +69,20 @@
                     }
                     if (!parsedProperly) {
-                        JOptionPane.showMessageDialog(null, tr("Error occurred while parsing gpx file {0}. Only a part of the file will be available.", urlString));
+                        JOptionPane.showMessageDialog(Main.parent,
+                            tr("Error occurred while parsing gpx file {0}. Only a part of the file will be available.", urlString));
                     }
 
-		} catch (java.net.MalformedURLException e) {
-		    JOptionPane.showMessageDialog(null, tr("Invalid URL {0}", urlString));
-		} catch (java.io.IOException e) {
-		    JOptionPane.showMessageDialog(null, tr("Error fetching URL {0}", urlString));
-		} catch (SAXException e) {
-		    JOptionPane.showMessageDialog(null, tr("Error parsing data from URL {0}", urlString));
-		}
-	    }
+                } catch (java.net.MalformedURLException e) {
+                    JOptionPane.showMessageDialog(Main.parent,
+                            tr("Invalid URL {0}", urlString));
+                } catch (java.io.IOException e) {
+                    JOptionPane.showMessageDialog(Main.parent,
+                            tr("Error fetching URL {0}", urlString));
+                } catch (SAXException e) {
+                    JOptionPane.showMessageDialog(Main.parent,
+                            tr("Error parsing data from URL {0}", urlString));
+                }
+            }
         }
     }
-
 }
-
Index: /applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DownloadDataGui.java
===================================================================
--- /applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DownloadDataGui.java	(revision 29775)
+++ /applications/editors/josm/plugins/DirectDownload/src/org/openstreetmap/josm/plugins/directdownload/DownloadDataGui.java	(revision 29776)
@@ -3,26 +3,15 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.io.InputStream;
-import java.io.IOException;
-
+import java.awt.BorderLayout;
+import java.awt.Component;
+import java.awt.Dimension;
 import java.net.URL;
-
 import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
-import java.util.StringTokenizer;
-
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.ExtendedDialog;
-
-import java.awt.BorderLayout;
-import java.awt.Component;
-import java.awt.Dimension;
 
 import javax.swing.BorderFactory;
-import javax.swing.DefaultListModel;
 import javax.swing.DefaultListSelectionModel;
 import javax.swing.JLabel;
-import javax.swing.JList;
 import javax.swing.JOptionPane;
 import javax.swing.JPanel;
@@ -31,27 +20,22 @@
 import javax.swing.ListSelectionModel;
 import javax.swing.UIManager;
-
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
-
 import javax.swing.table.DefaultTableColumnModel;
 import javax.swing.table.DefaultTableModel;
 import javax.swing.table.TableCellRenderer;
 import javax.swing.table.TableColumn;
-
-import org.xml.sax.*;
-import org.xml.sax.helpers.*;
-
-import javax.xml.parsers.SAXParserFactory; 
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.parsers.SAXParser;
-
+import javax.xml.parsers.SAXParserFactory;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.ExtendedDialog;
+import org.openstreetmap.josm.io.OsmApi;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 public class DownloadDataGui extends ExtendedDialog {
-    private String apiBaseUrl = "http://api.openstreetmap.org/api/0.6/";
-
-    // User for log in when downloading trace
-    private String username = Main.pref.get("osm-server.username");
-    private String password = Main.pref.get("osm-server.password");
 
     private NamedResultTableModel model;
@@ -62,12 +46,12 @@
         // Initalizes ExtendedDialog
         super(Main.parent,
-	      tr("Download Track"),
-	      new String[] {tr("Download Track"), tr("Cancel")},
-	      true
-	      );
-
-	JPanel panel = new JPanel();
-	panel.setLayout(new BorderLayout());
-	
+          tr("Download Track"),
+          new String[] {tr("Download Track"), tr("Cancel")},
+          true
+          );
+
+        JPanel panel = new JPanel();
+        panel.setLayout(new BorderLayout());
+    
         DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         model = new NamedResultTableModel(selectionModel);
@@ -80,48 +64,45 @@
         panel.add(scrollPane, BorderLayout.CENTER);
 
-	model.setData(getTrackList());
-
-	setContent(panel);
-	setupDialog();
+    model.setData(getTrackList());
+
+    setContent(panel);
+    setupDialog();
     }
 
     private static class TrackListHandler extends DefaultHandler {
         private LinkedList<UserTrack> data = new LinkedList<UserTrack>();
-	private String cdata = new String();
-
-        @Override
-        public void startElement(String namespaceURI, String localName, String qName, Attributes atts)
-        throws SAXException {
-	    if (qName.equals("gpx_file")) {
-		UserTrack track = new UserTrack();
-
-		track.id       = atts.getValue("id");
-		track.filename = atts.getValue("name");
-		track.datetime = atts.getValue("timestamp").replaceAll("[TZ]", " "); // TODO: do real parsing and time zone conversion
-		
-		data.addFirst(track);
-	    } 
-	    cdata = new String();
-	}
-
-	public void characters(char ch[], int start, int length)
-	    throws SAXException {
-	    cdata += new String(ch, start, length);
-	}
-
-	public void endElement(String uri, String localName,
-			       String qName)
-	    throws SAXException {
-	    if (qName.equals("description")) {
-		data.getFirst().description = cdata;
-	    }
-	    /*
-	    else if (qName.equals("tag")) {
-		data.getFirst().tags = cdata;
-		cdata = new String();
-	    }	
-	    */
-	}
-
+        
+        private String cdata = new String();
+    
+        @Override
+        public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+            if (qName.equals("gpx_file")) {
+            UserTrack track = new UserTrack();
+    
+            track.id       = atts.getValue("id");
+            track.filename = atts.getValue("name");
+            track.datetime = atts.getValue("timestamp").replaceAll("[TZ]", " "); // TODO: do real parsing and time zone conversion
+            
+            data.addFirst(track);
+            } 
+            cdata = new String();
+        }
+    
+        public void characters(char ch[], int start, int length)
+            throws SAXException {
+            cdata += new String(ch, start, length);
+        }
+    
+        public void endElement(String uri, String localName, String qName) throws SAXException {
+            if (qName.equals("description")) {
+            data.getFirst().description = cdata;
+            }
+            /*
+            else if (qName.equals("tag")) {
+            data.getFirst().tags = cdata;
+            cdata = new String();
+            }    
+            */
+        }
 
         public List<UserTrack> getResult() {
@@ -131,30 +112,30 @@
 
     private List<UserTrack> getTrackList() {
-	String urlString = apiBaseUrl + "user/gpx_files";
-
-	try {
-	    URL userTracksUrl = new URL(urlString);
-
-	    SAXParserFactory spf = SAXParserFactory.newInstance();
-	    TrackListHandler handler = new TrackListHandler();
-
-	    //get a new instance of parser
-	    SAXParser sp = spf.newSAXParser();
-	    
-	    //parse the file and also register this class for call backs
-	    sp.parse(userTracksUrl.openStream(), handler);
-	    
-	    return handler.getResult();
-	} catch (java.net.MalformedURLException e) {
-	    JOptionPane.showMessageDialog(null, tr("Invalid URL {0}", urlString));
-	} catch (java.io.IOException e) {
-	    JOptionPane.showMessageDialog(null, tr("Error fetching URL {0}", urlString));
-	} catch (SAXException e) {
-	    JOptionPane.showMessageDialog(null, tr("Error parsing data from URL {0}", urlString));
-	} catch(ParserConfigurationException pce) {
-	    JOptionPane.showMessageDialog(null, tr("Error parsing data from URL {0}", urlString));
-	}
-
-	return new LinkedList<UserTrack>();
+        String urlString = OsmApi.getOsmApi().getBaseUrl() + "user/gpx_files";
+
+        try {
+            URL userTracksUrl = new URL(urlString);
+    
+            SAXParserFactory spf = SAXParserFactory.newInstance();
+            TrackListHandler handler = new TrackListHandler();
+    
+            //get a new instance of parser
+            SAXParser sp = spf.newSAXParser();
+            
+            //parse the file and also register this class for call backs
+            sp.parse(userTracksUrl.openStream(), handler);
+            
+            return handler.getResult();
+        } catch (java.net.MalformedURLException e) {
+            JOptionPane.showMessageDialog(null, tr("Invalid URL {0}", urlString));
+        } catch (java.io.IOException e) {
+            JOptionPane.showMessageDialog(null, tr("Error fetching URL {0}", urlString));
+        } catch (SAXException e) {
+            JOptionPane.showMessageDialog(null, tr("Error parsing data from URL {0}", urlString));
+        } catch(ParserConfigurationException pce) {
+            JOptionPane.showMessageDialog(null, tr("Error parsing data from URL {0}", urlString));
+        }
+
+        return new LinkedList<UserTrack>();
     }
 
@@ -167,4 +148,5 @@
             this.selectionModel = selectionModel;
         }
+        
         @Override
         public int getRowCount() {
@@ -187,4 +169,5 @@
             fireTableDataChanged();
         }
+        
         @Override
         public boolean isCellEditable(int row, int column) {
@@ -200,7 +183,6 @@
 
     public UserTrack getSelectedUserTrack() {
-	return model.getSelectedUserTrack();
-    }
-   
+        return model.getSelectedUserTrack();
+    }
 
     static class NamedResultTableColumnModel extends DefaultTableColumnModel {
@@ -234,5 +216,5 @@
 
             // column 3 - tags
-	    /*
+        /*
             col = new TableColumn(3);
             col.setHeaderValue(tr("Tags"));
@@ -241,5 +223,5 @@
             col.setCellRenderer(renderer);
             addColumn(col);
-	    */
+        */
         }
 
@@ -286,21 +268,20 @@
             switch(column) {
             case 0:
-		setText(sr.datetime);
+                setText(sr.datetime);
                 break;
             case 1:
                 setText(sr.filename);
-                break;		
-	    case 2:
+                break;        
+            case 2:
                 setText(sr.description);
                 break;
-		/*
+        /*
             case 3:
                 setText(sr.tags);
                 break;
-		*/
+        */
             }
             return this;
         }
     }
-
 }
