VikDataSourceInterface vik_datasource_gps_interface = {
N_("Acquire from GPS"),
N_("Acquired from GPS"),
- VIK_DATASOURCE_CREATENEWLAYER,
+ VIK_DATASOURCE_AUTO_LAYER_MANAGEMENT,
VIK_DATASOURCE_INPUTTYPE_NONE,
TRUE,
TRUE,
(VikDataSourceProgressFunc) datasource_gps_progress,
(VikDataSourceAddProgressWidgetsFunc) datasource_gps_add_progress_widgets,
(VikDataSourceCleanupFunc) datasource_gps_cleanup,
- (VikDataSourceOffFunc) datasource_gps_off
+ (VikDataSourceOffFunc) datasource_gps_off,
+
+ NULL,
+ 0,
+ NULL,
+ NULL,
+ 0
};
/*********************************************************
}
static gint find_entry = -1;
-static gint garmin_entry = -1;
static gint wanted_entry = -1;
static void find_protocol (gpointer elem, gpointer user_data)
// Use setting
if ( protocol )
g_list_foreach (a_babel_device_list, find_protocol, protocol);
- // If not found set it to the first entry, otherwise use the entry
- last_active = ( wanted_entry < 0 ) ? 0 : wanted_entry;
}
else {
- // Maintain default to Garmin devices (assumed most popular/numerous device)
- garmin_entry = -1;
+ // Attempt to maintain default to Garmin devices (assumed most popular/numerous device)
g_list_foreach (a_babel_device_list, find_protocol, "garmin");
- last_active = ( garmin_entry < 0 ) ? 0 : garmin_entry;
}
+ // If not found set it to the first entry, otherwise use the entry
+ last_active = ( wanted_entry < 0 ) ? 0 : wanted_entry;
}
gtk_combo_box_set_active (GTK_COMBO_BOX(w->proto_b), last_active);