Author: gmascellani-guest
Date: 2008-12-22 23:02:50 +0000 (Mon, 22 Dec 2008)
New Revision: 1811

Modified:
   packages/josm/trunk/debian/patches/40_elemstyles.dpatch
Log:
Upstream code was modified quite a log, but I couldn't find a way to quickly
fix this patch, so now it's a stub and will require love in the next days.


Modified: packages/josm/trunk/debian/patches/40_elemstyles.dpatch
===================================================================
--- packages/josm/trunk/debian/patches/40_elemstyles.dpatch     2008-12-22 
23:01:21 UTC (rev 1810)
+++ packages/josm/trunk/debian/patches/40_elemstyles.dpatch     2008-12-22 
23:02:50 UTC (rev 1811)
@@ -6,55 +6,14 @@
 ## DP: Point josm to the correct directory so that the icons are found.
 
 @DPATCH@
-diff -urNad 
josm-0.0.0.20080518~/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
 
josm-0.0.0.20080518/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
---- 
josm-0.0.0.20080518~/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
 2008-05-18 17:20:35.000000000 +0200
-+++ 
josm-0.0.0.20080518/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
  2008-05-18 17:24:31.000000000 +0200
-@@ -26,6 +26,11 @@
-       long curScaleMax = 1000000000;
-       long curScaleMin = 0;
- 
-+      public final static String[] iconDefaultLocations = {
-+              "/usr/share/icons/openstreetmap/classic.small/",
-+              "/usr/share/icons/openstreetmap/square.small/"
-+              };
-+
-       public ElemStyleHandler() {
-               inDoc=inRule=inCondition=inElemStyle=inLine=inIcon=inArea=false;
-       }
-@@ -85,21 +90,23 @@
-                                                       //open icon from user 
directory
-                                                       curIcon = new 
ImageIcon(imageFile);
-                                               } else {
--                                                      try {
--                                                              URL path = 
getClass().getResource("/styles/standard/icons/"+atts.getValue(count));
--                                                              if (path == 
null) {
--                                                                      /* icon 
not found, using default */
--                                                                      
System.out.println("Mappaint: Icon " + atts.getValue(count) + " not found, 
using default icon");
--                                                                      path = 
getClass().getResource("/styles/standard/icons/misc/no_icon.png");
--                                                                      curIcon 
= new ImageIcon(Toolkit.getDefaultToolkit().createImage(path));
-+                                                      for (String location : 
this.iconDefaultLocations) {
-+                                                              imageFile = 
location + atts.getValue(count);
-+                                                              f = new 
File(imageFile);
-+                                                              if (f.exists()) 
{
-+                                                                      // open 
icon from system directory
-+                                                                      curIcon 
= new ImageIcon(imageFile);
-+                                                                      break;
-                                                               } else {
--                                                                      curIcon 
= new ImageIcon(Toolkit.getDefaultToolkit().createImage(path));
-+                                                                      f = 
null;
-                                                               }
--                                                      }
--                                                      catch (Exception e){
--                                                              URL path = 
getClass().getResource("/styles/standard/icons/amenity.png");
--                                                              curIcon = new 
ImageIcon(Toolkit.getDefaultToolkit().createImage(path));
--                                                      }
-+                                                      }
-+                            if (f == null) {
-+                                /* icon not found, using default */
-+                                                              
System.out.println("Mappaint: Icon " + atts.getValue(count) + " not found, 
using default icon");
-+                                    imageFile = 
"/usr/share/icons/openstreetmap/classic.small/misc/no_icon.png";
-+                                                                      curIcon 
= new ImageIcon(imageFile);
-+                            }
-                                               }
-                                       } else if 
(atts.getQName(count).equals("annotate")) {
-                                               curIconAnnotate = 
Boolean.parseBoolean (atts.getValue(count));
+diff -urNad 
josm-0.0.0.20081222~/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
 
josm-0.0.0.20081222/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
+--- 
josm-0.0.0.20081222~/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
 2008-09-21 14:03:38.000000000 +0200
++++ 
josm-0.0.0.20081222/src/org/openstreetmap/josm/gui/mappaint/ElemStyleHandler.java
  2008-12-23 00:00:20.000000000 +0100
+@@ -149,6 +149,7 @@
+                               for (int count=0; count<atts.getLength(); 
count++)
+                               {
+                                       if (atts.getQName(count).equals("src"))
++                                              // Icons should be taken from 
openstreetmap-map-* packages
+                                               rule.icon.icon = 
MapPaintStyles.getIcon(atts.getValue(count), styleName);
+                                       else if 
(atts.getQName(count).equals("annotate"))
+                                               rule.icon.annotate = 
Boolean.parseBoolean (atts.getValue(count));


_______________________________________________
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