Changeset 13277 in josm for trunk/geticons.pl


Ignore:
Timestamp:
2018-01-04T16:00:01+01:00 (5 years ago)
Author:
stoecker
Message:

see #15734 - fix icon detection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/geticons.pl

    r10566 r13277  
    2323  for my $file (glob($arg))
    2424  {
     25    my @defs;
    2526    open(FILE,"<",$file) or die "Could not open $file\n";
    2627    #print "Read file $file\n";
     
    2930    while(my $l = <FILE>)
    3031    {
     32      if($l =~ /private static final String ([A-Z_]+) = ("[^"]+")/)
     33      {
     34        push(@defs, [$1, $2]);
     35      }
    3136      next if $l =~ /NO-ICON/;
     37      for my $d (@defs)
     38      {
     39        $l =~ s/$d->[0]/$d->[1]/g;
     40      }
    3241      if($l =~ /icon\s*[:=]\s*["']([^"'+]+?)["']/)
    3342      {
     
    122131        ++$icons{$i};
    123132      }
    124       if($l =~ /setButtonIcons.*\{(.*)\}/)
     133      if($l =~ /setButtonIcons.*\{(.*)\}/ || $l =~ /setButtonIcons\((.*)\)/ )
    125134      {
    126135        my $t = $1;
Note: See TracChangeset for help on using the changeset viewer.