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

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

revision 219 by harbaum, Fri Nov 27 17:10:57 2009 UTC revision 220 by harbaum, Sat Nov 28 14:20:28 2009 UTC
# Line 181  static void map_draw_cache(GtkWidget *ma Line 181  static void map_draw_cache(GtkWidget *ma
181  }  }
182    
183  static void map_draw_wpt(GtkWidget *map, cache_t *cache, wpt_t *wpt) {  static void map_draw_wpt(GtkWidget *map, cache_t *cache, wpt_t *wpt) {
   
184    /* only draw wpts that don't equal the main point */    /* only draw wpts that don't equal the main point */
185    if(pos_differ(&cache->pos, &wpt->pos)) {    if(pos_differ(&cache->pos, &wpt->pos)) {
186      GdkPixbuf *icon =      if(!isnan(wpt->pos.lat) && !isnan(wpt->pos.lon))  {
187        icon_get(ICON_WPT, (wpt->sym!=WPT_SYM_UNKNOWN)?        GdkPixbuf *icon =
188                 wpt->sym:WPT_SYM_REFPOINT);          icon_get(ICON_WPT, (wpt->sym!=WPT_SYM_UNKNOWN)?
189                     wpt->sym:WPT_SYM_REFPOINT);
190      if(!isnan(wpt->pos.lat) && !isnan(wpt->pos.lon))  
191        osm_gps_map_add_image(OSM_GPS_MAP(map),        osm_gps_map_add_image(OSM_GPS_MAP(map),
192                              wpt->pos.lat, wpt->pos.lon, icon);                              wpt->pos.lat, wpt->pos.lon, icon);
193        }
194    }    }
195  }  }
196    
# Line 356  static void map_setup(map_context_t *con Line 356  static void map_setup(map_context_t *con
356  #endif  #endif
357    }    }
358    
359      /* also mark geomath position */
360    
361      /* remove all existing appearances of this icon first */
362      osm_gps_map_remove_image(OSM_GPS_MAP(context->widget),
363                               icon_get(ICON_MISC, 6));
364    
365      if(!isnan(context->appdata->geomath.lat) &&
366         !isnan(context->appdata->geomath.lon))  {
367    
368        osm_gps_map_add_image(OSM_GPS_MAP(context->widget),
369                              context->appdata->geomath.lat,
370                              context->appdata->geomath.lon,
371                              icon_get(ICON_MISC, 6));
372      }
373    
374    if(name) {    if(name) {
375      char *title = g_strdup_printf(_("Map - %s"), name);      char *title = g_strdup_printf(_("Map - %s"), name);
376      g_free(name);      g_free(name);

Legend:
Removed from v.219  
changed lines
  Added in v.220