53 |
gtk_box_pack_start(GTK_BOX(hbox), gtk_image_new_from_pixbuf( |
gtk_box_pack_start(GTK_BOX(hbox), gtk_image_new_from_pixbuf( |
54 |
icon_bearing(refpos, pos)),1,0,0); |
icon_bearing(refpos, pos)),1,0,0); |
55 |
|
|
56 |
if(refpos.lat && refpos.lon) { |
if(!isnan(refpos.lat) && !isnan(refpos.lon)) { |
57 |
gtk_box_pack_start_defaults(GTK_BOX(hbox), |
gtk_box_pack_start_defaults(GTK_BOX(hbox), |
58 |
GTK_LABEL_SMALL((char*)pos_get_bearing_str(refpos, pos))); |
GTK_LABEL_SMALL((char*)pos_get_bearing_str(refpos, pos))); |
59 |
snprintf(str, sizeof(str), _("%.1f°"), |
snprintf(str, sizeof(str), _("%.1f°"), |
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 |
|
|
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 |
|
|
684 |
g_object_set_data(G_OBJECT(window), "cur_view", appdata->cur_view); |
g_object_set_data(G_OBJECT(window), "cur_view", appdata->cur_view); |
685 |
|
|
686 |
appdata->cur_cache = cache; |
appdata->cur_cache = cache; |
687 |
char *title = g_strdup_printf("GPXView - %s", cache->name); |
char *title = g_strdup_printf("%s - GPXView", cache->name); |
688 |
gtk_window_set_title(GTK_WINDOW(window), title); |
gtk_window_set_title(GTK_WINDOW(window), title); |
689 |
g_free(title); |
g_free(title); |
690 |
|
|