]> git.street.me.uk Git - andy/viking.git/commitdiff
Tidy TrackWaypoint post read & verify thumbnails functions
authorRob Norris <rw_norris@hotmail.com>
Sun, 12 Mar 2017 23:06:47 +0000 (23:06 +0000)
committerRob Norris <rw_norris@hotmail.com>
Mon, 13 Mar 2017 23:41:28 +0000 (23:41 +0000)
Fix variable type and remove unused instances of it.

src/viktrwlayer.c
src/viktrwlayer.h
src/viktrwlayer_geotag.c

index 9a7029df77d85aca2327b81d7e8a1750b95e6af0..be644aa761b0d9a52ac15e27b8a76155a7f58fa4 100644 (file)
@@ -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 );
index 05c5a9d17dcb26acadc2121ce754ce2a253eda22..0acc9e46a4a6a8ff9f9901d725ce85fd1166aca6 100644 (file)
@@ -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 );
index c3dbed244b5c9a1009aa9d436051a3948bbcabe9..d4060b8aa6e42eaed27656221c4082dbff3c6f4b 100644 (file)
@@ -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
                }