X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/2b756ea0f81ebe3ef92ba3d40b67b9ad0d2e19e6..e2c4a855b70fe77269603d376acc7eb40d56378e:/src/datasource_bfilter.c diff --git a/src/datasource_bfilter.c b/src/datasource_bfilter.c index 453eb182..fb237496 100644 --- a/src/datasource_bfilter.c +++ b/src/datasource_bfilter.c @@ -1,7 +1,7 @@ /* * viking -- GPS Data and Topo Analyzer, Explorer, and Manager * - * Copyright (C) 2003-2005, Evan Battaglia + * Copyright (C) 2003-2007, Evan Battaglia * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,19 +43,26 @@ VikLayerParamScale simplify_params_scales[] = { }; VikLayerParam bfilter_simplify_params[] = { - { "numberofpoints", VIK_LAYER_PARAM_UINT, VIK_LAYER_GROUP_NONE, N_("Max number of points:"), VIK_LAYER_WIDGET_SPINBUTTON, simplify_params_scales + 0 }, + { "numberofpoints", VIK_LAYER_PARAM_UINT, VIK_LAYER_GROUP_NONE, N_("Max number of points:"), VIK_LAYER_WIDGET_SPINBUTTON, simplify_params_scales, NULL }, }; VikLayerParamData bfilter_simplify_params_defaults[] = { + /* Annoyingly 'C' cannot initialize unions properly */ + /* It's dependent on the standard used or the compiler support... */ +#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L || __GNUC__ + { .i = 100 }, +#else { 100 }, +#endif }; VikDataSourceInterface vik_datasource_bfilter_simplify_interface = { - N_("Simplify All Tracks"), + N_("Simplify All Tracks..."), N_("Simplified Tracks"), VIK_DATASOURCE_SHELL_CMD, VIK_DATASOURCE_CREATENEWLAYER, VIK_DATASOURCE_INPUTTYPE_TRWLAYER, + TRUE, FALSE, /* keep dialog open after success */ NULL, NULL, NULL, (VikDataSourceGetCmdStringFunc) datasource_bfilter_simplify_get_cmd_string, @@ -90,6 +97,7 @@ VikDataSourceInterface vik_datasource_bfilter_dup_interface = { VIK_DATASOURCE_SHELL_CMD, VIK_DATASOURCE_CREATENEWLAYER, VIK_DATASOURCE_INPUTTYPE_TRWLAYER, + TRUE, FALSE, /* keep dialog open after success */ NULL, NULL, NULL, (VikDataSourceGetCmdStringFunc) datasource_bfilter_dup_get_cmd_string, @@ -121,6 +129,7 @@ VikDataSourceInterface vik_datasource_bfilter_polygon_interface = { VIK_DATASOURCE_SHELL_CMD, VIK_DATASOURCE_CREATENEWLAYER, VIK_DATASOURCE_INPUTTYPE_TRWLAYER_TRACK, + TRUE, FALSE, /* keep dialog open after success */ NULL, NULL, NULL, (VikDataSourceGetCmdStringFunc) datasource_bfilter_polygon_get_cmd_string, @@ -155,6 +164,7 @@ VikDataSourceInterface vik_datasource_bfilter_exclude_polygon_interface = { VIK_DATASOURCE_SHELL_CMD, VIK_DATASOURCE_CREATENEWLAYER, VIK_DATASOURCE_INPUTTYPE_TRWLAYER_TRACK, + TRUE, FALSE, /* keep dialog open after success */ NULL, NULL, NULL, (VikDataSourceGetCmdStringFunc) datasource_bfilter_exclude_polygon_get_cmd_string,