]> git.street.me.uk Git - andy/viking.git/blobdiff - src/acquire.c
added save previous user input string and input label options to datasource search...
[andy/viking.git] / src / acquire.c
index 813302150ac9ddc6175c583c1262b07831fd5de6..17ae43c96da548cc676ddd089e987c73d73f8538 100644 (file)
 #include "babel.h"
 #include "gpx.h"
 #include "acquire.h"
+#include "util.h"
 
 /************************ FILTER LIST *******************/
 // extern VikDataSourceInterface vik_datasource_gps_interface;
 
 /*** Input is TRWLayer ***/
 extern VikDataSourceInterface vik_datasource_bfilter_simplify_interface;
+extern VikDataSourceInterface vik_datasource_bfilter_compress_interface;
 extern VikDataSourceInterface vik_datasource_bfilter_dup_interface;
 
 /*** Input is a track and a TRWLayer ***/
@@ -48,6 +50,7 @@ extern VikDataSourceInterface vik_datasource_bfilter_exclude_polygon_interface;
 
 const VikDataSourceInterface *filters[] = {
   &vik_datasource_bfilter_simplify_interface,
+  &vik_datasource_bfilter_compress_interface,
   &vik_datasource_bfilter_dup_interface,
   &vik_datasource_bfilter_polygon_interface,
   &vik_datasource_bfilter_exclude_polygon_interface,
@@ -274,8 +277,9 @@ static void acquire ( VikWindow *vw,
     ((VikDataSourceGetCmdStringFuncWithInput) source_interface->get_cmd_string_func)
        ( pass_along_data, &cmd, &extra, name_src );
 
+    util_add_to_deletion_list ( name_src );
+
     g_free ( name_src );
-    /* TODO: delete the tmp file? or delete it only after we're done with it? */
   } else if ( source_interface->inputtype == VIK_DATASOURCE_INPUTTYPE_TRWLAYER_TRACK ) {
     gchar *name_src = a_gpx_write_tmp_file ( vtl, NULL );
     gchar *name_src_track = a_gpx_write_track_tmp_file ( track, NULL );
@@ -283,6 +287,9 @@ static void acquire ( VikWindow *vw,
     ((VikDataSourceGetCmdStringFuncWithInputInput) source_interface->get_cmd_string_func)
        ( pass_along_data, &cmd, &extra, name_src, name_src_track );
 
+    util_add_to_deletion_list ( name_src );
+    util_add_to_deletion_list ( name_src_track );
+
     g_free ( name_src );
     g_free ( name_src_track );
   } else if ( source_interface->inputtype == VIK_DATASOURCE_INPUTTYPE_TRACK ) {