Changeset 4172 in josm for trunk/geticons.pl


Ignore:
Timestamp:
2011-06-26T13:43:35+02:00 (14 years ago)
Author:
stoecker
Message:

remove unused icons, make connection timouts configurable and increase them a bit to handle JOSM server delays

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geticons.pl

    r3945 r4172  
    55my @default = (
    66  "styles/standard/*.xml",
     7  "styles/standard/*.mapcss",
    78  "data/*.xml",
    89  "src/org/openstreetmap/josm/*.java",
     
    3233        my $img = "styles/standard/$1";
    3334        $img = "styles/$1" if((!-f "images/$img") && -f "images/styles/$1");
     35        $img = $1 if((!-f "images/$img") && -f "images/$1");
    3436        ++$icons{$img};
    3537      }
    36       elsif($l =~ /icon\s*=\s*["']([^+]+?)["']/)
     38      elsif($l =~ /icon\s*[:=]\s*["']([^+]+?)["']/)
    3739      {
    3840        ++$icons{$1};
    3941      }
    4042
     43      if($l =~ /icon-image:\s*\"?(.*?)\"?\s*;/)
     44      {
     45        my $img = "styles/standard/$1";
     46        $img = "styles/$1" if((!-f "images/$img") && -f "images/styles/$1");
     47        $img = $1 if((!-f "images/$img") && -f "images/$1");
     48        ++$icons{$img};
     49      }
    4150      if($l =~ /ImageProvider\.get\(\"([^\"]*?)\"\)/)
    4251      {
     
    4554        ++$icons{$i};
    4655      }
     56      while($l =~ /\/\*\s*ICON\s*\*\/\s*\"(.*?)\"/g)
     57      {
     58        my $i = $1;
     59        $i .= ".png" if !($i =~ /\.png$/);
     60        ++$icons{$i};
     61      }
     62      while($l =~ /\/\*\s*ICON\((.*?)\)\s*\*\/\s*\"(.*?)\"/g)
     63      {
     64        my $i = "$1$2";
     65        $i .= ".png" if !($i =~ /\.png$/);
     66        ++$icons{$i};
     67      }
    4768      if($l =~ /new\s+ImageLabel\(\"(.*?)\"/)
    4869      {
     
    81102      {
    82103        my $i = "cursor/$1";
     104        $i .= ".png" if !($i =~ /\.png$/);
     105        ++$icons{$i};
     106      }
     107      if($l =~ /SideButton*\(\s*(?:mark)?tr\s*\(\s*\".*?\"\s*\)\s*,\s*\"(.*?)\"/)
     108      {
     109        my $i = "dialogs/$1";
    83110        $i .= ".png" if !($i =~ /\.png$/);
    84111        ++$icons{$i};
Note: See TracChangeset for help on using the changeset viewer.