From e1f7a7a5b86d0dba3b42863a9b6e2f62de948d4f Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 12 Mar 2017 23:06:47 +0000 Subject: [PATCH] Tidy TrackWaypoint post read & verify thumbnails functions Fix variable type and remove unused instances of it. --- src/viktrwlayer.c | 12 ++++++------ src/viktrwlayer.h | 2 +- src/viktrwlayer_geotag.c | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/viktrwlayer.c b/src/viktrwlayer.c index 9a7029df..be644aa7 100644 --- a/src/viktrwlayer.c +++ b/src/viktrwlayer.c @@ -689,7 +689,7 @@ enum { /* Layer Interface function definitions */ static VikTrwLayer* trw_layer_create ( VikViewport *vp ); static void trw_layer_realize ( VikTrwLayer *vtl, VikTreeview *vt, GtkTreeIter *layer_iter ); -static void trw_layer_post_read ( VikTrwLayer *vtl, GtkWidget *vvp, gboolean from_file ); +static void trw_layer_post_read ( VikTrwLayer *vtl, VikViewport *vvp, gboolean from_file ); static void trw_layer_free ( VikTrwLayer *trwlayer ); static void trw_layer_draw ( VikTrwLayer *l, gpointer data ); static void trw_layer_change_coord_mode ( VikTrwLayer *vtl, VikCoordMode dest_mode ); @@ -2825,7 +2825,7 @@ static void trw_layer_realize ( VikTrwLayer *vtl, VikTreeview *vt, GtkTreeIter * vik_treeview_item_set_visible ( (VikTreeview *) vt, &(vtl->waypoints_iter), vtl->waypoints_visible ); } - trw_layer_verify_thumbnails ( vtl, NULL ); + trw_layer_verify_thumbnails ( vtl ); trw_layer_sort_all ( vtl ); } @@ -3820,7 +3820,7 @@ static void trw_layer_acquire_geotagged_cb ( menu_array_layer values ) // Reverify thumbnails as they may have changed vtl->has_verified_thumbnails = FALSE; - trw_layer_verify_thumbnails ( vtl, NULL ); + trw_layer_verify_thumbnails ( vtl ); } #endif @@ -10588,7 +10588,7 @@ static void thumbnail_create_thread_free ( thumbnail_create_thread_data *tctd ) g_free ( tctd ); } -void trw_layer_verify_thumbnails ( VikTrwLayer *vtl, GtkWidget *vp ) +void trw_layer_verify_thumbnails ( VikTrwLayer *vtl ) { if ( ! vtl->has_verified_thumbnails ) { @@ -10818,10 +10818,10 @@ static time_t trw_layer_get_timestamp ( VikTrwLayer *vtl ) return timestamp_waypoints; } -static void trw_layer_post_read ( VikTrwLayer *vtl, GtkWidget *vvp, gboolean from_file ) +static void trw_layer_post_read ( VikTrwLayer *vtl, VikViewport *vvp, gboolean from_file ) { if ( VIK_LAYER(vtl)->realized ) - trw_layer_verify_thumbnails ( vtl, vvp ); + trw_layer_verify_thumbnails ( vtl ); trw_layer_track_alloc_colors ( vtl ); trw_layer_calculate_bounds_waypoints ( vtl ); diff --git a/src/viktrwlayer.h b/src/viktrwlayer.h index 05c5a9d1..0acc9e46 100644 --- a/src/viktrwlayer.h +++ b/src/viktrwlayer.h @@ -139,7 +139,7 @@ GdkPixbuf* get_wp_sym_small ( gchar *symbol ); /* Exposed Layer Interface function definitions */ // Intended only for use by other trw_layer subwindows -void trw_layer_verify_thumbnails ( VikTrwLayer *vtl, GtkWidget *vp ); +void trw_layer_verify_thumbnails ( VikTrwLayer *vtl ); // Other functions only for use by other trw_layer subwindows gchar *trw_layer_new_unique_sublayer_name ( VikTrwLayer *vtl, gint sublayer_type, const gchar *name ); void trw_layer_waypoint_rename ( VikTrwLayer *vtl, VikWaypoint *wp, const gchar *new_name ); diff --git a/src/viktrwlayer_geotag.c b/src/viktrwlayer_geotag.c index c3dbed24..d4060b8a 100644 --- a/src/viktrwlayer_geotag.c +++ b/src/viktrwlayer_geotag.c @@ -456,7 +456,7 @@ static int trw_layer_geotag_thread ( geotag_options_t *options, gpointer threadd if ( IS_VIK_LAYER(options->vtl) ) { trw_layer_calculate_bounds_waypoints ( options->vtl ); // Ensure any new images get shown - trw_layer_verify_thumbnails ( options->vtl, NULL ); // NB second parameter not used ATM + trw_layer_verify_thumbnails ( options->vtl ); // Force redraw as verify only redraws if there are new thumbnails (they may already exist) vik_layer_emit_update ( VIK_LAYER(options->vtl) ); // NB Update from background } -- 2.39.5