Diff of /trunk/src/misc.c

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

revision 227 by harbaum, Wed Dec 2 20:05:52 2009 UTC revision 228 by harbaum, Thu Dec 3 20:07:13 2009 UTC
# Line 1178  static void cb_cache(GtkWidget *item, gp Line 1178  static void cb_cache(GtkWidget *item, gp
1178    
1179    if(!id)    if(!id)
1180      pos_set(item, cache->pos.lat, cache->pos.lon);      pos_set(item, cache->pos.lat, cache->pos.lon);
1181    else if(id == 1)    else if(id == 1) {
1182      pos_set(item, cache->notes->pos.lat, cache->notes->pos.lon);      /* fetch position out of notes dialog since they probably */
1183    else {      /* haven't been saved yet */
1184        pos_t pos = notes_get_pos(appdata->cache_context);
1185        pos_set(item, pos.lat, pos.lon);
1186      } else {
1187      wpt_t *wpt = cache->wpt;      wpt_t *wpt = cache->wpt;
1188      while(wpt && id > 2) {      while(wpt && id > 2) {
1189        wpt = wpt->next;        wpt = wpt->next;
# Line 1261  static GtkWidget *popup_menu_create(appd Line 1264  static GtkWidget *popup_menu_create(appd
1264                 name, cb_cache, 0, lon_entry, lat_entry);                 name, cb_cache, 0, lon_entry, lat_entry);
1265    
1266      /* overwritten cache position */      /* overwritten cache position */
1267      if(cache->notes && pos_valid(&cache->notes->pos))      if(appdata->cache_context && notes_get_override(appdata->cache_context))
1268        menu_add(menu, appdata, icon_get_widget(ICON_POS, cache->type + 6),        menu_add(menu, appdata, icon_get_widget(ICON_POS, cache->type + 6),
1269                 _("Modified coordinate"), cb_cache, 1, lon_entry, lat_entry);                 _("Modified coordinate"), cb_cache, 1, lon_entry, lat_entry);
1270    
# Line 1444  static GtkWidget *preset_picker_create(a Line 1447  static GtkWidget *preset_picker_create(a
1447                          name, cb_cache, 0);                          name, cb_cache, 0);
1448    
1449      /* overwritten cache position */      /* overwritten cache position */
1450      if(cache->notes && pos_valid(&cache->notes->pos))      if(appdata->cache_context && notes_get_override(appdata->cache_context))
1451        preset_picker_add(store, appdata, icon_get(ICON_POS, cache->type + 6),        preset_picker_add(store, appdata, icon_get(ICON_POS, cache->type + 6),
1452                          _("Modified coordinate"), cb_cache, 1);                          _("Modified coordinate"), cb_cache, 1);
1453    

Legend:
Removed from v.227  
changed lines
  Added in v.228