]> git.street.me.uk Git - andy/viking.git/blobdiff - src/datasource_gps.c
Improve documentation of background.c
[andy/viking.git] / src / datasource_gps.c
index 95fcc3716e970ca29a9af85c40c2c98b44ad88d0..3e6ccced7c861e555321d3dc3bf07c251a1fcf01 100644 (file)
@@ -2,6 +2,8 @@
  * viking -- GPS Data and Topo Analyzer, Explorer, and Manager
  *
  * Copyright (C) 2003-2005, Evan Battaglia <gtoevan@gmx.net>
+ * Copyright (C) 2006, Alex Foobarian <foobarian@gmail.com>
+ * Copyright (C) 2010, Rob Norris <rw_norris@hotmail.com>
  *
  * 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));