The following commit has been merged in the master branch:
commit f6b29136bf65f90286caec9c31d11a529f1f59c1
Author: David Paleino <da...@debian.org>
Date:   Sat Oct 8 23:23:57 2011 +0200

    100-fix_SlippyMapBBoxChooser.patch added: class with missing methods and 
accessing protected members

diff --git a/debian/changelog b/debian/changelog
index ba18faa..7d09caa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,10 @@ josm (0.0.svn4487+dfsg2-1) UNRELEASED; urgency=low
 
   * New upstream release
   * Patches refreshed to cleanly apply to new sources
+  * 100-fix_SlippyMapBBoxChooser.patch added: class with missing methods
+    and accessing protected members
 
- -- David Paleino <da...@debian.org>  Sat, 08 Oct 2011 22:51:43 +0200
+ -- David Paleino <da...@debian.org>  Sat, 08 Oct 2011 23:23:34 +0200
 
 josm (0.0.svn4399+dfsg2-2) unstable; urgency=low
 
diff --git a/debian/patches/100-fix_SlippyMapBBoxChooser.patch 
b/debian/patches/100-fix_SlippyMapBBoxChooser.patch
new file mode 100644
index 0000000..494a41a
--- /dev/null
+++ b/debian/patches/100-fix_SlippyMapBBoxChooser.patch
@@ -0,0 +1,62 @@
+From: David Paleino <da...@debian.org>
+Subject: fix code used in SlippyMapBBoxChooser
+Origin: vendor
+Forwarded: no
+
+---
+ src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java  |    6 +++---
+ src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java |   10 
+++++++---
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+--- josm.orig/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
++++ josm/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
+@@ -72,12 +72,16 @@ public class SlippyMapBBoxChooser extend
+ 
+         @Override public Image getAttributionImage() { return 
source.getAttributionImage(); }
+ 
++        @Override public String getAttributionImageURL() { return 
source.getAttributionImageURL(); }
++
+         @Override public String getAttributionText(int zoom, Coordinate 
topLeft, Coordinate botRight) { return source.getAttributionText(zoom, topLeft, 
botRight); }
+ 
+         @Override public boolean requiresAttribution() { return 
source.requiresAttribution(); }
+ 
+         @Override public String getAttributionLinkURL() { return 
source.getAttributionLinkURL(); }
+ 
++        @Override public String getTermsOfUseText() { return 
source.getTermsOfUseText(); }
++
+         @Override public String getTermsOfUseURL() { return 
source.getTermsOfUseURL(); }
+ 
+         @Override public double latToTileY(double lat, int zoom) { return 
source.latToTileY(lat,zoom); }
+@@ -220,14 +224,14 @@ public class SlippyMapBBoxChooser extend
+ 
+         /* TODO: Somehow indicate the link is clickable state to user */
+ 
+-        if ((attrImageBounds != null && attrImageBounds.contains(p))
+-                || (attrTextBounds != null && attrTextBounds.contains(p))) {
++        if ((attribution.attrImageBounds != null && 
attribution.attrImageBounds.contains(p))
++                || (attribution.attrTextBounds != null && 
attribution.attrTextBounds.contains(p))) {
+             if (click)
+                 OpenBrowser.displayUrl(ts.getAttributionLinkURL());
+             /*else
+                 Main.warn(ts.getAttributionLinkURL());*/
+             return true;
+-        } else if (attrToUBounds != null && attrToUBounds.contains(p)) {
++        } else if (attribution.attrToUBounds != null && 
attribution.attrToUBounds.contains(p)) {
+             if (click)
+                 OpenBrowser.displayUrl(ts.getTermsOfUseURL());
+             /*else
+--- josm.orig/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java
++++ josm/src/org/openstreetmap/gui/jmapviewer/AttributionSupport.java
+@@ -27,9 +27,9 @@ public class AttributionSupport {
+     public static final Font ATTR_FONT = new Font("Arial", Font.PLAIN, 10);
+     public static final Font ATTR_LINK_FONT;
+     
+-    protected Rectangle attrTextBounds = null;
+-    protected Rectangle attrToUBounds = null;
+-    protected Rectangle attrImageBounds = null;
++    public Rectangle attrTextBounds = null;
++    public Rectangle attrToUBounds = null;
++    public Rectangle attrImageBounds = null;
+ 
+     static {
+         HashMap<TextAttribute, Integer> aUnderline = new 
HashMap<TextAttribute, Integer>();
diff --git a/debian/patches/series b/debian/patches/series
index a166bf5..0b885d9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@
 70-default_look_and_feel.patch
 80-fix_images.patch
 90-fix_version.patch
+100-fix_SlippyMapBBoxChooser.patch

-- 
Editor for OpenStreetMap

_______________________________________________
Pkg-osm-commits mailing list
Pkg-osm-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-osm-commits

Reply via email to