X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/9a9c986e71c9e77b87a9585c6d3594cf2794c707..14b9e3a4c4f3912bfe5e848e6b0bf8d7620a53a0:/src/vikwindow.c?ds=inline diff --git a/src/vikwindow.c b/src/vikwindow.c index f444b87e..51c51ba9 100644 --- a/src/vikwindow.c +++ b/src/vikwindow.c @@ -1670,12 +1670,15 @@ static void on_activate_recent_item (GtkRecentChooser *chooser, g_object_unref ( file ); if ( self->filename ) { - gchar *filenames[] = { path, NULL }; + GSList *filenames = NULL; + filenames = g_slist_append ( filenames, path ); g_signal_emit ( G_OBJECT(self), window_signals[VW_OPENWINDOW_SIGNAL], 0, filenames ); + // NB: GSList & contents are freed by main.open_window } - else + else { vik_window_open_file ( self, path, TRUE ); - g_free ( path ); + g_free ( path ); + } } g_free (filename); @@ -1959,6 +1962,14 @@ static void acquire_from_gc ( GtkAction *a, VikWindow *vw ) } #endif +#ifdef VIK_CONFIG_GEOTAG +static void acquire_from_geotag ( GtkAction *a, VikWindow *vw ) +{ + vik_datasource_geotag_interface.mode = VIK_DATASOURCE_CREATENEWLAYER; + a_acquire(vw, vw->viking_vlp, vw->viking_vvp, &vik_datasource_geotag_interface ); +} +#endif + static void goto_default_location( GtkAction *a, VikWindow *vw) { struct LatLon ll; @@ -2528,6 +2539,9 @@ static GtkActionEntry entries[] = { #endif #ifdef VIK_CONFIG_GEOCACHES { "AcquireGC", NULL, N_("Geo_caches..."), NULL, N_("Get Geocaches from geocaching.com"), (GCallback)acquire_from_gc }, +#endif +#ifdef VIK_CONFIG_GEOTAG + { "AcquireGeotag", NULL, N_("From Geotagged _Images..."), NULL, N_("Create waypoints from geotagged images"), (GCallback)acquire_from_geotag }, #endif { "Save", GTK_STOCK_SAVE, N_("_Save"), "S", N_("Save the file"), (GCallback)save_file }, { "SaveAs", GTK_STOCK_SAVE_AS, N_("Save _As..."), NULL, N_("Save the file under different name"), (GCallback)save_file_as },