Diff of /trunk/src/map-tool.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 204 by harbaum, Sun Nov 22 20:39:46 2009 UTC revision 205 by harbaum, Mon Nov 23 20:12:22 2009 UTC
# Line 156  static void map_draw_cache(GtkWidget *ma Line 156  static void map_draw_cache(GtkWidget *ma
156    int type = semi?ICON_CACHE_TYPE_SEMI:ICON_CACHE_TYPE;    int type = semi?ICON_CACHE_TYPE_SEMI:ICON_CACHE_TYPE;
157    
158    GdkPixbuf *icon = icon_get(type, cache->type);    GdkPixbuf *icon = icon_get(type, cache->type);
159      GdkPixbuf *over = NULL;
160    
161      if(cache->mine)                   over = icon_get(type, 14);
162      else if(cache->found)             over = icon_get(type, 12);
163      else if(cache->notes) {
164        if(cache->notes->found)         over = icon_get(type, 12);
165        else if(cache->notes->override) over = icon_get(type, 11);
166        else                            over = icon_get(type, 13);
167      }
168    
169      pos_t *pos = &cache->pos;
170    /* check if there's also an overwritten coordinate */    /* check if there's also an overwritten coordinate */
171    if(cache->notes && cache->notes->override) {    if(cache->notes && cache->notes->override)
172      GdkPixbuf *over = icon_get(type, 11);      pos = &cache->notes->pos;
173    
174      if(!isnan(pos->lat) && !isnan(pos->lon)) {
175      osm_gps_map_add_image(OSM_GPS_MAP(map),      osm_gps_map_add_image(OSM_GPS_MAP(map),
176            cache->notes->pos.lat, cache->notes->pos.lon, icon);                            pos->lat, pos->lon, icon);
177        if(over)
178      osm_gps_map_add_image(OSM_GPS_MAP(map),        osm_gps_map_add_image(OSM_GPS_MAP(map),
179            cache->notes->pos.lat, cache->notes->pos.lon, over);                              pos->lat, pos->lon, over);
   } else {  
     if(!isnan(cache->pos.lat) && !isnan(cache->pos.lon))  
       osm_gps_map_add_image(OSM_GPS_MAP(map),  
                             cache->pos.lat, cache->pos.lon, icon);  
180    }    }
181  }  }
182    

Legend:
Removed from v.204  
changed lines
  Added in v.205