436 |
gtk_label_set_text(GTK_LABEL(context->gotoc.bearing_label), "-----"); |
gtk_label_set_text(GTK_LABEL(context->gotoc.bearing_label), "-----"); |
437 |
} |
} |
438 |
|
|
439 |
float epe = gps_get_epe(context->appdata); |
float eph = gps_get_eph(context->appdata); |
440 |
if(isnan(epe)) |
if(isnan(eph)) |
441 |
gtk_label_set_text(GTK_LABEL(context->gotoc.epe_label), "-----"); |
gtk_label_set_text(GTK_LABEL(context->gotoc.eph_label), "-----"); |
442 |
else { |
else { |
443 |
char str[16]; |
char str[16]; |
444 |
if(context->appdata->imperial) { |
/* distance needs to be given in km */ |
445 |
epe *= 3.2808; |
if(context->appdata->imperial) |
446 |
snprintf(str, sizeof(str), "%.1f ft", epe); |
eph /= (6371.0/3959.0); // km to miles |
|
} else |
|
|
snprintf(str, sizeof(str), "%.1f m", epe); |
|
447 |
|
|
448 |
gtk_label_set_text(GTK_LABEL(context->gotoc.epe_label), str); |
distance_str(str, sizeof(str), eph/1000.0, context->appdata->imperial); |
449 |
|
gtk_label_set_text(GTK_LABEL(context->gotoc.eph_label), str); |
450 |
} |
} |
451 |
|
|
452 |
return TRUE; // fire again |
return TRUE; // fire again |
552 |
return FALSE; |
return FALSE; |
553 |
} |
} |
554 |
|
|
555 |
#ifdef USE_MAEMO |
#ifdef ENABLE_MAEMO_MAPPER |
556 |
static void on_mm_button_clicked(GtkButton *button, gpointer data) { |
static void on_mm_button_clicked(GtkButton *button, gpointer data) { |
557 |
cache_context_t *context = (cache_context_t*)data; |
cache_context_t *context = (cache_context_t*)data; |
558 |
|
|
686 |
gtk_table_attach_defaults(GTK_TABLE(table), |
gtk_table_attach_defaults(GTK_TABLE(table), |
687 |
gtk_label_new(_("Est. error:")), 0,1,6,7); |
gtk_label_new(_("Est. error:")), 0,1,6,7); |
688 |
gtk_table_attach_defaults(GTK_TABLE(table), |
gtk_table_attach_defaults(GTK_TABLE(table), |
689 |
(context->gotoc.epe_label = gtk_label_new("-----")), 1,2,6,7); |
(context->gotoc.eph_label = gtk_label_new("-----")), 1,2,6,7); |
690 |
|
|
691 |
gtk_table_set_row_spacing(GTK_TABLE(table), 6, 16); |
gtk_table_set_row_spacing(GTK_TABLE(table), 6, 16); |
692 |
|
|
706 |
|
|
707 |
gtk_box_pack_start(GTK_BOX(ihbox), context->gotoc.sat_area, 1,0,0); |
gtk_box_pack_start(GTK_BOX(ihbox), context->gotoc.sat_area, 1,0,0); |
708 |
|
|
709 |
#ifdef USE_MAEMO |
#ifdef ENABLE_MAEMO_MAPPER |
710 |
GtkWidget *mm_button = gtk_button_new(); |
GtkWidget *mm_button = gtk_button_new(); |
711 |
gtk_button_set_image(GTK_BUTTON(mm_button), icon_get_widget(ICON_MISC, 0)); |
gtk_button_set_image(GTK_BUTTON(mm_button), icon_get_widget(ICON_MISC, 0)); |
712 |
gtk_signal_connect(GTK_OBJECT(mm_button), "clicked", |
gtk_signal_connect(GTK_OBJECT(mm_button), "clicked", |