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

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

revision 35 by harbaum, Thu Jul 30 08:29:52 2009 UTC revision 38 by harbaum, Sun Aug 2 18:37:10 2009 UTC
# Line 141  static gboolean on_map_configure(GtkWidg Line 141  static gboolean on_map_configure(GtkWidg
141    return FALSE;    return FALSE;
142  }  }
143    
144    static void map_draw_cachelist(GtkWidget *map, cache_t *cache) {
145      while(cache) {
146        GdkPixbuf *icon = icon_get(ICON_CACHE_TYPE, cache->type);
147    
148        osm_gps_map_add_image(OSM_GPS_MAP(map),
149                              cache->pos.lat, cache->pos.lon, icon);
150    
151        cache = cache->next;
152      }
153    }
154    
155  void map(appdata_t *appdata) {  void map(appdata_t *appdata) {
156    map_context_t context;    map_context_t context;
157    context.appdata = appdata;    context.appdata = appdata;
# Line 170  void map(appdata_t *appdata) { Line 181  void map(appdata_t *appdata) {
181    
182    g_free(path);    g_free(path);
183    
184      /* draw all geocaches */
185      gpx_t *gpx = appdata->gpx;
186      while(gpx) {
187        map_draw_cachelist(context.widget, gpx->cache);
188        gpx = gpx->next;
189      }
190    
191    g_signal_connect(G_OBJECT(context.widget), "configure-event",    g_signal_connect(G_OBJECT(context.widget), "configure-event",
192                     G_CALLBACK(on_map_configure), &context);                     G_CALLBACK(on_map_configure), &context);
193  #if 0  #if 0

Legend:
Removed from v.35  
changed lines
  Added in v.38