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);
}
#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;
#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"), "<control>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 },