+ /* Capture some potential errors */
+ if (strstr(line, "[ERROR] GPS")) {
+ gchar **tokens = g_strsplit(line, "\n", 0);
+ gps_data->info = g_strdup(tokens[0]);
+ gps_data->id_info = gdk_threads_add_idle ( (GSourceFunc)show_gps_info, w );
+ g_strfreev(tokens);
+ }
+ if (strstr(line, "an't in")) {
+ gchar **tokens = g_strsplit(line, "\n", 0);
+ gps_data->info = g_strdup(tokens[0]);
+ gps_data->id_info = gdk_threads_add_idle ( (GSourceFunc)show_gps_info, w );
+ g_strfreev(tokens);
+ }
+
+ if (strstr(line, "Can't get waypoint")) {
+ gchar **tokens = g_strsplit(line, "\n", 0);
+ gps_data->info = g_strdup(tokens[0]);
+ gps_data->id_info = gdk_threads_add_idle ( (GSourceFunc)show_gps_info, w );
+ g_strfreev(tokens);
+ }