Changeset 13277 in josm


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

see #15734 - fix icon detection

Location:
trunk
Files:
4 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;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ImproveWayAccuracyAction.java

    r13048 r13277  
    6262        SelectionChangedListener, ModifierExListener {
    6363
    64     private static final String CROSSHAIR = "crosshair";
     64    private static final String CROSSHAIR = /* ICON(cursor/)*/ "crosshair";
    6565
    6666    enum State {
     
    8181    private boolean dragging;
    8282
    83     private final Cursor cursorSelect = ImageProvider.getCursor("normal", "mode");
    84     private final Cursor cursorSelectHover = ImageProvider.getCursor("hand", "mode");
     83    private final Cursor cursorSelect = ImageProvider.getCursor(/* ICON(cursor/)*/ "normal", /* ICON(cursor/modifier/)*/ "mode");
     84    private final Cursor cursorSelectHover = ImageProvider.getCursor(/* ICON(cursor/)*/ "hand", /* ICON(cursor/modifier/)*/ "mode");
    8585    private final Cursor cursorImprove = ImageProvider.getCursor(CROSSHAIR, null);
    86     private final Cursor cursorImproveAdd = ImageProvider.getCursor(CROSSHAIR, "addnode");
    87     private final Cursor cursorImproveDelete = ImageProvider.getCursor(CROSSHAIR, "delete_node");
    88     private final Cursor cursorImproveAddLock = ImageProvider.getCursor(CROSSHAIR, "add_node_lock");
    89     private final Cursor cursorImproveLock = ImageProvider.getCursor(CROSSHAIR, "lock");
     86    private final Cursor cursorImproveAdd = ImageProvider.getCursor(CROSSHAIR, /* ICON(cursor/modifier/)*/ "addnode");
     87    private final Cursor cursorImproveDelete = ImageProvider.getCursor(CROSSHAIR, /* ICON(cursor/modifier/)*/ "delete_node");
     88    private final Cursor cursorImproveAddLock = ImageProvider.getCursor(CROSSHAIR, /* ICON(cursor/modifier/)*/ "add_node_lock");
     89    private final Cursor cursorImproveLock = ImageProvider.getCursor(CROSSHAIR, /* ICON(cursor/modifier/)*/ "lock");
    9090
    9191    private Color guideColor;
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r13189 r13277  
    7272public class SelectAction extends MapMode implements ModifierExListener, KeyPressReleaseListener, SelectionEnded {
    7373
    74     private static final String NORMAL = "normal";
     74    private static final String NORMAL = /* ICON(cursor/)*/ "normal";
    7575
    7676    /**
     
    9292    enum SelectActionCursor {
    9393
    94         rect(NORMAL, "selection"),
    95         rect_add(NORMAL, "select_add"),
    96         rect_rm(NORMAL, "select_remove"),
    97         way(NORMAL, "select_way"),
    98         way_add(NORMAL, "select_way_add"),
    99         way_rm(NORMAL, "select_way_remove"),
    100         node(NORMAL, "select_node"),
    101         node_add(NORMAL, "select_node_add"),
    102         node_rm(NORMAL, "select_node_remove"),
    103         virtual_node(NORMAL, "addnode"),
    104         scale("scale", null),
    105         rotate("rotate", null),
    106         merge("crosshair", null),
    107         lasso(NORMAL, "rope"),
    108         merge_to_node("crosshair", "joinnode"),
     94        rect(NORMAL, /* ICON(cursor/modifier/)*/ "selection"),
     95        rect_add(NORMAL, /* ICON(cursor/modifier/)*/ "select_add"),
     96        rect_rm(NORMAL, /* ICON(cursor/modifier/)*/ "select_remove"),
     97        way(NORMAL, /* ICON(cursor/modifier/)*/ "select_way"),
     98        way_add(NORMAL, /* ICON(cursor/modifier/)*/ "select_way_add"),
     99        way_rm(NORMAL, /* ICON(cursor/modifier/)*/ "select_way_remove"),
     100        node(NORMAL, /* ICON(cursor/modifier/)*/ "select_node"),
     101        node_add(NORMAL, /* ICON(cursor/modifier/)*/ "select_node_add"),
     102        node_rm(NORMAL, /* ICON(cursor/modifier/)*/ "select_node_remove"),
     103        virtual_node(NORMAL, /* ICON(cursor/modifier/)*/ "addnode"),
     104        scale(/* ICON(cursor/)*/ "scale", null),
     105        rotate(/* ICON(cursor/)*/ "rotate", null),
     106        merge(/* ICON(cursor/)*/ "crosshair", null),
     107        lasso(NORMAL, /* ICON(cursor/modifier/)*/ "rope"),
     108        merge_to_node(/* ICON(cursor/)*/ "crosshair", /* ICON(cursor/modifier/)*/"joinnode"),
    109109        move(Cursor.MOVE_CURSOR);
    110110
  • trunk/src/org/openstreetmap/josm/gui/ScrollViewport.java

    r12866 r13277  
    128128        // UP
    129129        if ((direction & UP_DIRECTION) != 0) {
    130             addScrollButton(UP_DIRECTION, "svpUp", BorderLayout.NORTH);
     130            addScrollButton(UP_DIRECTION, /* ICON */ "svpUp", BorderLayout.NORTH);
    131131        }
    132132
    133133        // DOWN
    134134        if ((direction & DOWN_DIRECTION) != 0) {
    135             addScrollButton(DOWN_DIRECTION, "svpDown", BorderLayout.SOUTH);
     135            addScrollButton(DOWN_DIRECTION, /* ICON */ "svpDown", BorderLayout.SOUTH);
    136136        }
    137137
    138138        // LEFT
    139139        if ((direction & LEFT_DIRECTION) != 0) {
    140             addScrollButton(LEFT_DIRECTION, "svpLeft", BorderLayout.WEST);
     140            addScrollButton(LEFT_DIRECTION, /* ICON */ "svpLeft", BorderLayout.WEST);
    141141        }
    142142
    143143        // RIGHT
    144144        if ((direction & RIGHT_DIRECTION) != 0) {
    145             addScrollButton(RIGHT_DIRECTION, "svpRight", BorderLayout.EAST);
     145            addScrollButton(RIGHT_DIRECTION, /* ICON */ "svpRight", BorderLayout.EAST);
    146146        }
    147147
Note: See TracChangeset for help on using the changeset viewer.