321 |
return valid; |
return valid; |
322 |
} |
} |
323 |
|
|
324 |
GtkWidget *red_entry_new(void) { |
GtkWidget *red_entry_new_with_text(char *str) { |
325 |
GdkColor color; |
GdkColor color; |
326 |
|
|
327 |
GtkWidget *widget = entry_new(); |
GtkWidget *widget = entry_new(); |
328 |
gdk_color_parse("#ff0000", &color); |
gdk_color_parse("#ff0000", &color); |
329 |
gtk_widget_modify_text(widget, TAG_STATE, &color); |
gtk_widget_modify_text(widget, TAG_STATE, &color); |
330 |
|
if(str) gtk_entry_set_text(GTK_ENTRY(widget), str); |
331 |
|
|
332 |
return widget; |
return widget; |
333 |
} |
} |
334 |
|
|
613 |
pos_lat_str(str, sizeof(str), lat); |
pos_lat_str(str, sizeof(str), lat); |
614 |
|
|
615 |
#ifndef COORDINATE_PICKER |
#ifndef COORDINATE_PICKER |
616 |
GdkColor color; |
GtkWidget *widget = red_entry_new_with_text(str); |
|
|
|
|
GtkWidget *widget = entry_new(); |
|
|
gdk_color_parse("#ff0000", &color); |
|
|
gtk_widget_modify_text(widget, TAG_STATE, &color); |
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widget), str); |
|
617 |
|
|
618 |
g_signal_connect(G_OBJECT(widget), "changed", |
g_signal_connect(G_OBJECT(widget), "changed", |
619 |
G_CALLBACK(callback_modified_lat), NULL); |
G_CALLBACK(callback_modified_lat), NULL); |
732 |
pos_lon_str(str, sizeof(str), lon); |
pos_lon_str(str, sizeof(str), lon); |
733 |
|
|
734 |
#ifndef COORDINATE_PICKER |
#ifndef COORDINATE_PICKER |
735 |
GdkColor color; |
GtkWidget *widget = red_entry_new_with_text(str); |
|
|
|
|
GtkWidget *widget = entry_new(); |
|
|
gdk_color_parse("#ff0000", &color); |
|
|
gtk_widget_modify_text(widget, TAG_STATE, &color); |
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widget), str); |
|
|
|
|
736 |
g_signal_connect(G_OBJECT(widget), "changed", |
g_signal_connect(G_OBJECT(widget), "changed", |
737 |
G_CALLBACK(callback_modified_lon), NULL); |
G_CALLBACK(callback_modified_lon), NULL); |
738 |
|
|
930 |
distance_str(str, sizeof(str), dist, mil); |
distance_str(str, sizeof(str), dist, mil); |
931 |
|
|
932 |
#ifndef COORDINATE_PICKER |
#ifndef COORDINATE_PICKER |
933 |
GdkColor color; |
GtkWidget *widget = red_entry_new_with_text(str); |
|
GtkWidget *widget = entry_new(); |
|
|
gdk_color_parse("#ff0000", &color); |
|
|
gtk_widget_modify_text(widget, TAG_STATE, &color); |
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widget), str); |
|
|
|
|
934 |
g_signal_connect(G_OBJECT(widget), "changed", |
g_signal_connect(G_OBJECT(widget), "changed", |
935 |
G_CALLBACK(callback_modified_dist), NULL); |
G_CALLBACK(callback_modified_dist), NULL); |
936 |
|
|
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; |
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 |
|
|
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 |
|
|
1660 |
angle_str(str, sizeof(str), angle); |
angle_str(str, sizeof(str), angle); |
1661 |
|
|
1662 |
#ifndef COORDINATE_PICKER |
#ifndef COORDINATE_PICKER |
1663 |
GtkWidget *widget = red_entry_new(); |
GtkWidget *widget = red_entry_new_with_text(str); |
|
gtk_entry_set_text(GTK_ENTRY(widget), str); |
|
|
|
|
1664 |
g_signal_connect(G_OBJECT(widget), "changed", |
g_signal_connect(G_OBJECT(widget), "changed", |
1665 |
G_CALLBACK(callback_modified_angle), NULL); |
G_CALLBACK(callback_modified_angle), NULL); |
1666 |
#else |
#else |