X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/f2643f9e3eb05de5452b98cf8db39d9553db1a39..b127ccd23c8c9afe3dae1aebb68a951093f92403:/src/datasource_gc.c diff --git a/src/datasource_gc.c b/src/datasource_gc.c index 21d653bf..78feb585 100644 --- a/src/datasource_gc.c +++ b/src/datasource_gc.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 @@ -71,7 +71,8 @@ VikDataSourceInterface vik_datasource_gc_interface = { (VikDataSourceGetCmdStringFunc) datasource_gc_get_cmd_string, (VikDataSourceProgressFunc) NULL, (VikDataSourceAddProgressWidgetsFunc) NULL, - (VikDataSourceCleanupFunc) datasource_gc_cleanup + (VikDataSourceCleanupFunc) datasource_gc_cleanup, + (VikDataSourceOffFunc) NULL, }; static VikLayerParam prefs[] = { @@ -167,11 +168,11 @@ static void datasource_gc_add_setup_widgets ( GtkWidget *dialog, VikViewport *vv gchar *s_ll; num_label = gtk_label_new (_("Number geocaches:")); - widgets->num_spin = gtk_spin_button_new ( GTK_ADJUSTMENT(gtk_adjustment_new( 100, 1, 1000, 10, 20, 50 )), 25, 0 ); + widgets->num_spin = gtk_spin_button_new ( GTK_ADJUSTMENT(gtk_adjustment_new( 100, 1, 1000, 10, 20, 0 )), 25, 0 ); center_label = gtk_label_new (_("Centered around:")); widgets->center_entry = gtk_entry_new(); miles_radius_label = gtk_label_new ("Miles Radius:"); - widgets->miles_radius_spin = gtk_spin_button_new ( GTK_ADJUSTMENT(gtk_adjustment_new( 100, 1, 1000, 5, 20, 50 )), 25, 2 ); + widgets->miles_radius_spin = gtk_spin_button_new ( GTK_ADJUSTMENT(gtk_adjustment_new( 100, 1, 1000, 5, 20, 0 )), 25, 2 ); vik_coord_to_latlon ( vik_viewport_get_center(vvp), &ll ); s_ll = g_strdup_printf("%f,%f", ll.lat, ll.lon ); @@ -202,7 +203,7 @@ static void datasource_gc_get_cmd_string ( datasource_gc_widgets_t *widgets, gch gchar *safe_string = g_shell_quote ( gtk_entry_get_text ( GTK_ENTRY(widgets->center_entry) ) ); gchar *safe_user = g_shell_quote ( a_preferences_get ( VIKING_GC_PARAMS_NAMESPACE "username")->s ); gchar *safe_pass = g_shell_quote ( a_preferences_get ( VIKING_GC_PARAMS_NAMESPACE "password")->s ); - *cmd = g_strdup_printf( "gcget -u %s -p -- %s %s %d %.2lf", safe_user, safe_pass, safe_string, + *cmd = g_strdup_printf( "gcget -u %s -p %s %s %d %.2lf", safe_user, safe_pass, safe_string, gtk_spin_button_get_value_as_int ( GTK_SPIN_BUTTON(widgets->num_spin) ), gtk_spin_button_get_value_as_float ( GTK_SPIN_BUTTON(widgets->miles_radius_spin) ) ); *input_file_type = NULL;