return(vw->viking_vlp);
}
+/**
+ * Returns the statusbar for the window
+ */
+VikStatusbar * vik_window_get_statusbar ( VikWindow *vw )
+{
+ return vw->viking_vs;
+}
+
void vik_window_selected_layer(VikWindow *vw, VikLayer *vl)
{
int i, j, tool_count;
case LOAD_TYPE_GPSBABEL_FAILURE:
a_dialog_error_msg ( GTK_WINDOW(vw), _("GPSBabel is required to load files of this type or GPSBabel encountered problems.") );
break;
+ case LOAD_TYPE_UNSUPPORTED_FAILURE:
+ a_dialog_error_msg_extra ( GTK_WINDOW(vw), _("Unsupported file type for %s"), filename );
+ break;
case LOAD_TYPE_VIK_SUCCESS:
{
GtkWidget *mode_button;
static void acquire_from_gps ( GtkAction *a, VikWindow *vw )
{
+ // Via the file menu, acquiring from a GPS makes a new layer
+ // this has always been the way (not entirely sure if this was the real intention!)
+ // thus maintain the behaviour ATM.
+ // Hence explicit setting here (as the value may be changed elsewhere)
+ vik_datasource_gps_interface.mode = VIK_DATASOURCE_CREATENEWLAYER;
a_acquire(vw, vw->viking_vlp, vw->viking_vvp, &vik_datasource_gps_interface );
}
a_acquire(vw, vw->viking_vlp, vw->viking_vvp, &vik_datasource_google_interface );
}
+#ifdef VIK_CONFIG_OPENSTREETMAP
+static void acquire_from_osm ( GtkAction *a, VikWindow *vw )
+{
+ a_acquire(vw, vw->viking_vlp, vw->viking_vvp, &vik_datasource_osm_interface );
+}
+#endif
+
#ifdef VIK_CONFIG_GEOCACHES
static void acquire_from_gc ( GtkAction *a, VikWindow *vw )
{
{ "Acquire", NULL, N_("A_cquire"), 0, 0, 0 },
{ "AcquireGPS", NULL, N_("From _GPS..."), NULL, N_("Transfer data from a GPS device"), (GCallback)acquire_from_gps },
{ "AcquireGoogle", NULL, N_("Google _Directions..."), NULL, N_("Get driving directions from Google"), (GCallback)acquire_from_google },
+#ifdef VIK_CONFIG_OPENSTREETMAP
+ { "AcquireOSM", NULL, N_("_OSM Traces..."), NULL, N_("Get traces from OpenStreetMap"), (GCallback)acquire_from_osm },
+#endif
#ifdef VIK_CONFIG_GEOCACHES
{ "AcquireGC", NULL, N_("Geo_caches..."), NULL, N_("Get Geocaches from geocaching.com"), (GCallback)acquire_from_gc },
#endif