Author: gmascellani-guest
Date: 2009-06-07 13:32:22 +0000 (Sun, 07 Jun 2009)
New Revision: 2267

Modified:
   packages/josm-plugins/trunk/debian/patches/100_surveyor.dpatch
Log:
Backporting recent code for pluing surveyor


Modified: packages/josm-plugins/trunk/debian/patches/100_surveyor.dpatch
===================================================================
--- packages/josm-plugins/trunk/debian/patches/100_surveyor.dpatch      
2009-06-07 13:20:17 UTC (rev 2266)
+++ packages/josm-plugins/trunk/debian/patches/100_surveyor.dpatch      
2009-06-07 13:32:22 UTC (rev 2267)
@@ -3,6 +3,7 @@
 ##
 ## DP: Patch for plugin surveyor
 ## DP:  * Disable upstream SVN access
+## DP:  * Backport recent code
 
 @DPATCH@
 diff -urNad trunk~/surveyor/build.xml trunk/surveyor/build.xml
@@ -17,3 +18,35 @@
          <copy todir="${plugin.build.dir}/">
              <fileset dir="resources">
                  <include name="*.xml"/>
+diff -urNad 
trunk~/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
 
trunk/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
+--- 
trunk~/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
    2009-02-01 21:50:42.000000000 +0100
++++ 
trunk/surveyor/src/at/dallermassl/josm/plugin/surveyor/AutoSaveEditLayerTimerTask.java
     2009-05-21 16:21:51.000000000 +0200
+@@ -7,10 +7,11 @@
+ import static org.openstreetmap.josm.tools.I18n.tr;
+ 
+ import java.io.File;
+ import java.io.FileOutputStream;
+ import java.io.IOException;
++import java.io.PrintWriter;
+ import java.util.TimerTask;
+ 
+ import javax.swing.JOptionPane;
+ 
+ import livegps.LiveGpsLock;
+@@ -51,11 +52,15 @@
+ 
+             // write to temporary file, on success, rename tmp file to target 
file:
+             File tmpFile = new File(file.getAbsoluteFile()+".tmp");
+             System.out.println("AutoSaving osm data to file " + 
file.getAbsolutePath());
+             synchronized(LiveGpsLock.class) {
+-                XmlWriter.output(new FileOutputStream(tmpFile), new 
OsmWriter.All(dataset, false));
++                OsmWriter w = new OsmWriter(new PrintWriter(new 
FileOutputStream(tmpFile)), false, dataset.version);
++                w.header();
++                w.writeDataSources(dataset);
++                w.writeContent(dataset);
++                w.footer();
+             }
+             tmpFile.renameTo(file);
+             System.out.println("AutoSaving finished");
+         } catch (IOException x) {
+             x.printStackTrace();


_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel

Reply via email to