X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/d6de71f9d6faa36a5aa2d60f61e1c062b75bc852..14b9e3a4c4f3912bfe5e848e6b0bf8d7620a53a0:/src/vikwindow.c?ds=sidebyside diff --git a/src/vikwindow.c b/src/vikwindow.c index e9ae89e8..51c51ba9 100644 --- a/src/vikwindow.c +++ b/src/vikwindow.c @@ -1343,7 +1343,6 @@ static void menu_copy_layer_cb ( GtkAction *a, VikWindow *vw ) static void menu_cut_layer_cb ( GtkAction *a, VikWindow *vw ) { vik_layers_panel_cut_selected ( vw->viking_vlp ); - draw_update ( vw ); vw->modified = TRUE; } @@ -1351,7 +1350,6 @@ static void menu_paste_layer_cb ( GtkAction *a, VikWindow *vw ) { if ( a_clipboard_paste ( vw->viking_vlp ) ) { - draw_update ( vw ); vw->modified = TRUE; } } @@ -1672,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); @@ -1961,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; @@ -2530,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 }, @@ -2789,6 +2801,8 @@ void vik_window_set_selected_trw_layer ( VikWindow *vw, gpointer vtl ) vw->selected_waypoint = NULL; vw->selected_waypoints = NULL; vw->selected_name = NULL; + // Set highlight thickness + vik_viewport_set_highlight_thickness ( vw->viking_vvp, vik_trw_layer_get_property_tracks_line_thickness (vw->containing_vtl) ); } gpointer vik_window_get_selected_tracks ( VikWindow *vw ) @@ -2806,6 +2820,8 @@ void vik_window_set_selected_tracks ( VikWindow *vw, gpointer gl, gpointer vtl ) vw->selected_waypoint = NULL; vw->selected_waypoints = NULL; vw->selected_name = NULL; + // Set highlight thickness + vik_viewport_set_highlight_thickness ( vw->viking_vvp, vik_trw_layer_get_property_tracks_line_thickness (vw->containing_vtl) ); } gpointer vik_window_get_selected_track ( VikWindow *vw ) @@ -2823,7 +2839,10 @@ void vik_window_set_selected_track ( VikWindow *vw, gpointer *vt, gpointer vtl, vw->selected_tracks = NULL; vw->selected_waypoint = NULL; vw->selected_waypoints = NULL; + // Set highlight thickness + vik_viewport_set_highlight_thickness ( vw->viking_vvp, vik_trw_layer_get_property_tracks_line_thickness (vw->containing_vtl) ); } + gpointer vik_window_get_selected_waypoints ( VikWindow *vw ) { return vw->selected_waypoints;