Diff of /trunk/src/cache.c

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

revision 12 by harbaum, Fri Jun 26 12:24:24 2009 UTC revision 13 by harbaum, Sat Jun 27 11:09:19 2009 UTC
# Line 92  void overview_coordinate_update(cache_co Line 92  void overview_coordinate_update(cache_co
92                          (GtkCallback)gtk_widget_destroy, NULL);                          (GtkCallback)gtk_widget_destroy, NULL);
93    
94    /* update distance/etc */    /* update distance/etc */
95    bearing_fill_hbox(context->bearing_hbox, context->appdata,    if(!isnan(context->cache->pos.lat) &&
96                      *get_pos(context->appdata), notes_get_pos(context));       !isnan(context->cache->pos.lon))
97        bearing_fill_hbox(context->bearing_hbox, context->appdata,
98                          *get_pos(context->appdata), notes_get_pos(context));
99    
100    gtk_widget_show_all(context->bearing_hbox);    gtk_widget_show_all(context->bearing_hbox);
101  }  }
102    
# Line 212  static GtkWidget *cache_overview(cache_c Line 215  static GtkWidget *cache_overview(cache_c
215         context->pos_lon_label = pos_lon(cache->pos.lon, SIZE_BIG, strike));         context->pos_lon_label = pos_lon(cache->pos.lon, SIZE_BIG, strike));
216    
217    /* but calculations may be done with respect to the overriden one */    /* but calculations may be done with respect to the overriden one */
218    context->bearing_hbox = gtk_hbox_new(FALSE, 0);    if(!isnan(cache->pos.lat) && !isnan(cache->pos.lon)) {
219    bearing_fill_hbox(context->bearing_hbox, appdata, *refpos,      context->bearing_hbox = gtk_hbox_new(FALSE, 0);
220                      gpx_cache_pos(cache));      bearing_fill_hbox(context->bearing_hbox, appdata, *refpos,
221    gtk_box_pack_start_defaults(GTK_BOX(ivbox), context->bearing_hbox);                        gpx_cache_pos(cache));
222        gtk_box_pack_start_defaults(GTK_BOX(ivbox), context->bearing_hbox);
223      }
224    
225    gtk_table_attach_defaults(GTK_TABLE(table), ivbox, 3,4,0,2);    gtk_table_attach_defaults(GTK_TABLE(table), ivbox, 3,4,0,2);
226    

Legend:
Removed from v.12  
changed lines
  Added in v.13