X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/37dd047d3bdd3ff58320c691545d5e6cf160738c..43e8b799d298705a645376a567b89faa20d55a87:/src/datasource_gps.c diff --git a/src/datasource_gps.c b/src/datasource_gps.c index 95fcc371..3e6ccced 100644 --- a/src/datasource_gps.c +++ b/src/datasource_gps.c @@ -2,6 +2,8 @@ * viking -- GPS Data and Topo Analyzer, Explorer, and Manager * * Copyright (C) 2003-2005, Evan Battaglia + * Copyright (C) 2006, Alex Foobarian + * Copyright (C) 2010, Rob Norris * * 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 @@ -56,6 +58,7 @@ VikDataSourceInterface vik_datasource_gps_interface = { VIK_DATASOURCE_CREATENEWLAYER, VIK_DATASOURCE_INPUTTYPE_NONE, TRUE, + TRUE, (VikDataSourceInitFunc) datasource_gps_init_func, (VikDataSourceCheckExistenceFunc) NULL, (VikDataSourceAddSetupWidgetsFunc) datasource_gps_add_setup_widgets, @@ -123,9 +126,15 @@ static void datasource_gps_get_cmd_string ( gpointer user_data, gchar **babelarg #endif if (!strcmp(proto, "Garmin")) { device = "garmin"; - } else { + } else if (!strcmp(proto, "Magellan")) { device = "magellan"; } + else if (!strcmp(proto, "DeLorme")) { + device = "delbin"; + } + else { + device = "navilink"; + } *babelargs = g_strdup_printf("-D 9 -t -w -i %s", device); /* device points to static content => no free */ @@ -169,7 +178,11 @@ static void datasource_gps_off ( gpointer user_data, gchar **babelargs, gchar ** #endif if (!strcmp(proto, "Garmin")) { device = "garmin,power_off"; - } else { + } + else if (!strcmp(proto, "NAViLink")) { + device = "navilink,power_off"; + } + else { return; } @@ -329,6 +342,8 @@ void datasource_gps_add_setup_widgets ( GtkWidget *dialog, VikViewport *vvp, gpo w->proto_b = GTK_COMBO_BOX(gtk_combo_box_new_text ()); gtk_combo_box_append_text (w->proto_b, "Garmin"); gtk_combo_box_append_text (w->proto_b, "Magellan"); + gtk_combo_box_append_text (w->proto_b, "DeLorme"); + gtk_combo_box_append_text (w->proto_b, "NAViLink"); gtk_combo_box_set_active (w->proto_b, 0); g_object_ref(w->proto_b); @@ -353,7 +368,7 @@ void datasource_gps_add_setup_widgets ( GtkWidget *dialog, VikViewport *vvp, gpo gtk_combo_box_set_active (w->ser_b, 0); g_object_ref(w->ser_b); - w->off_request_l = gtk_label_new (_("Turn Off After Transfer\n(Garmin Only)")); + w->off_request_l = gtk_label_new (_("Turn Off After Transfer\n(Garmin/NAViLink Only)")); w->off_request_b = GTK_CHECK_BUTTON ( gtk_check_button_new () ); box = GTK_TABLE(gtk_table_new(2, 3, FALSE));