143 |
ret = yes_no_f(context->dialog, context->area->appdata, |
ret = yes_no_f(context->dialog, context->area->appdata, |
144 |
MISC_AGAIN_ID_AREA_TOO_BIG, MISC_AGAIN_FLAG_DONT_SAVE_NO, |
MISC_AGAIN_ID_AREA_TOO_BIG, MISC_AGAIN_FLAG_DONT_SAVE_NO, |
145 |
_("Area size warning!"), |
_("Area size warning!"), |
146 |
_("%s Do you really want to continue?"), wtext); |
_("%s\n\nDo you really want to continue?"), wtext); |
147 |
|
|
148 |
g_free(wtext); |
g_free(wtext); |
149 |
} |
} |
363 |
double width = pos_dist_get(context->extent.width, context->extent.is_mil); |
double width = pos_dist_get(context->extent.width, context->extent.is_mil); |
364 |
|
|
365 |
/* adjust unit flag */ |
/* adjust unit flag */ |
366 |
context->extent.is_mil = gtk_combo_box_get_active( |
context->extent.is_mil = |
367 |
GTK_COMBO_BOX(context->extent.mil_km)) == 0; |
combo_box_get_active(context->extent.mil_km) == 0; |
368 |
|
|
369 |
/* save values */ |
/* save values */ |
370 |
pos_dist_entry_set(context->extent.width, width, context->extent.is_mil); |
pos_dist_entry_set(context->extent.width, width, context->extent.is_mil); |
437 |
if(osd->check(osd, TRUE, (int)event->x, (int)event->y)) |
if(osd->check(osd, TRUE, (int)event->x, (int)event->y)) |
438 |
return FALSE; |
return FALSE; |
439 |
|
|
440 |
|
if(osm_gps_map_osd_get_state(OSM_GPS_MAP(widget))) |
441 |
|
return FALSE; |
442 |
|
|
443 |
/* remove existing marker */ |
/* remove existing marker */ |
444 |
osm_gps_map_clear_tracks(map); |
osm_gps_map_clear_tracks(map); |
445 |
|
|
472 |
osm_gps_map_add_track(map, box); |
osm_gps_map_add_track(map, box); |
473 |
} |
} |
474 |
|
|
475 |
/* always returning true here disables dragging in osm-gps-map */ |
/* returning true here disables dragging in osm-gps-map */ |
476 |
return TRUE; |
return !osm_gps_map_osd_get_state(OSM_GPS_MAP(widget)); |
477 |
} |
} |
478 |
|
|
479 |
static gboolean |
static gboolean |
524 |
if(osd->check(osd, TRUE, (int)event->x, (int)event->y)) |
if(osd->check(osd, TRUE, (int)event->x, (int)event->y)) |
525 |
return FALSE; |
return FALSE; |
526 |
|
|
527 |
return TRUE; |
/* returning true here disables dragging in osm-gps-map */ |
528 |
|
return !osm_gps_map_osd_get_state(OSM_GPS_MAP(widget)); |
529 |
} |
} |
530 |
|
|
531 |
static void on_page_switch(GtkNotebook *notebook, GtkNotebookPage *page, |
static void on_page_switch(GtkNotebook *notebook, GtkNotebookPage *page, |
700 |
gtk_table_attach_defaults(GTK_TABLE(table), |
gtk_table_attach_defaults(GTK_TABLE(table), |
701 |
context.extent.height, 1, 2, 2, 3); |
context.extent.height, 1, 2, 2, 3); |
702 |
|
|
703 |
context.extent.mil_km = gtk_combo_box_new_text(); |
context.extent.mil_km = combo_box_new(_("Unit")); |
704 |
gtk_combo_box_append_text(GTK_COMBO_BOX(context.extent.mil_km), _("mi")); |
combo_box_append_text(context.extent.mil_km, _("mi")); |
705 |
gtk_combo_box_append_text(GTK_COMBO_BOX(context.extent.mil_km), _("km")); |
combo_box_append_text(context.extent.mil_km, _("km")); |
706 |
gtk_combo_box_set_active(GTK_COMBO_BOX(context.extent.mil_km), 1); // km |
combo_box_set_active(context.extent.mil_km, 1); // km |
707 |
|
|
708 |
gtk_table_attach(GTK_TABLE(table), context.extent.mil_km, 2, 3, 1, 3, |
gtk_table_attach(GTK_TABLE(table), context.extent.mil_km, 2, 3, 1, 3, |
709 |
0, 0, 0, 0); |
0, 0, 0, 0); |
710 |
|
|