The following commit has been merged in the master branch:
commit e64de882f95242c53fbde3a7b1e9abcb5a1d27dc
Author: David Paleino <da...@debian.org>
Date:   Tue Mar 23 21:26:28 2010 +0100

    debian/patches/00-fix_readme_in_about.patch added, fixes a bug in the About 
screen

diff --git a/debian/changelog b/debian/changelog
index 6d1b503..0568ef5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,11 @@ gpsprune (9-2) UNRELEASED; urgency=low
 
   * debian/control:
     - demote Java3d-related libraries to Recommends.
+  * debian/patches/:
+    - 00-fix_readme_in_about.patch added, fixes a bug in the About
+      screen
 
- -- David Paleino <da...@debian.org>  Mon, 22 Mar 2010 20:28:18 +0100
+ -- David Paleino <da...@debian.org>  Tue, 23 Mar 2010 21:26:11 +0100
 
 gpsprune (9-1) unstable; urgency=low
 
diff --git a/debian/patches/00-fix_readme_in_about.patch 
b/debian/patches/00-fix_readme_in_about.patch
new file mode 100644
index 0000000..cbabeaa
--- /dev/null
+++ b/debian/patches/00-fix_readme_in_about.patch
@@ -0,0 +1,71 @@
+From: David Paleino <da...@debian.org>
+Subject: read the text needed for the About Screen from the installed
+ readme.txt.gz rather than from the one embedded in the .jar (missing
+ in the Debian one)
+Forwarded: no
+
+---
+ tim/prune/function/AboutScreen.java |   40 
+++++++++++++++++++++++++++++++-----
+ 1 file changed, 35 insertions(+), 5 deletions(-)
+
+--- gpsprune.orig/tim/prune/function/AboutScreen.java
++++ gpsprune/tim/prune/function/AboutScreen.java
+@@ -11,7 +11,12 @@ import java.awt.event.ActionEvent;
+ import java.awt.event.ActionListener;
+ import java.awt.event.KeyEvent;
+ import java.awt.event.KeyListener;
++
+ import java.io.InputStream;
++import java.io.FileInputStream;
++import java.io.ByteArrayOutputStream;
++import java.io.OutputStream;
++import java.util.zip.GZIPInputStream;
+ 
+ import javax.swing.BorderFactory;
+ import javax.swing.BoxLayout;
+@@ -283,15 +288,40 @@ public class AboutScreen extends Generic
+               {
+                       // For some reason using ../readme.txt doesn't work, so 
need absolute path
+                       InputStream in = 
AboutScreen.class.getResourceAsStream("/tim/prune/readme.txt");
+-                      if (in != null) {
+-                              byte[] buffer = new byte[in.available()];
+-                              in.read(buffer);
+-                              return new String(buffer);
+-                      }
++
++                      byte[] buffer = new byte[in.available()];
++                      in.read(buffer);
++                      return new String(buffer);
+               }
+               catch (java.io.IOException e) {
+                       System.err.println("Exception trying to get readme : " 
+ e.getMessage());
+               }
++              catch (java.lang.NullPointerException e) {
++                      GZIPInputStream in = null;
++                      OutputStream out = null;
++
++                      try {
++                              String readme = 
"/usr/share/doc/gpsprune/readme.txt.gz";
++                              in = new GZIPInputStream(new 
FileInputStream(readme));
++                              out = new ByteArrayOutputStream();
++                              String ret = "";
++
++                              byte[] buffer = new byte[8 * 1024];
++                              int count = 0;
++                              do {
++                                      out.write(buffer, 0, count);
++                                      count = in.read(buffer, 0, 
buffer.length);
++                              } while (count != -1);
++
++                              ret = out.toString();
++                              out.close();
++                              in.close();
++                              return ret;
++                      }
++                      catch (java.io.IOException ex) {
++                              System.err.println("Exception trying to get 
readme : " + ex.getMessage());
++                      }
++              }
+               return I18nManager.getText("error.readme.notfound");
+       }
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..cb27725
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+00-fix_readme_in_about.patch

-- 
Tool to visualize, edit, convert and prune GPS data

_______________________________________________
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