./configure --prefix=/usr --sysconfdir=/etc \
--enable-maintainer-mode --enable-debug \
--enable-gpsd --enable-gst --enable-hal \
- --enable-btdbus \
+ --enable-btdbus --enable-gtk-doc \
--enable-cairo --enable-opengl
;;
hildon)
gboolean
menu_cb_route_distnext(GtkAction *action)
{
-route_show_distance_to_next(_route);
+path_show_distance_to_next(_route);
return TRUE;
}
gboolean
menu_cb_route_distlast(GtkAction *action)
{
-route_show_distance_to_last(_route);
+path_show_distance_to_last(_route);
return TRUE;
}
{
path_find_nearest_point(_route);
gtk_map_refresh(_map);
-MACRO_QUEUE_DRAW_AREA();
return TRUE;
}
gboolean
menu_cb_track_insert_mark(GtkAction *action)
{
-if (track_insert_mark(_track)) {
+if (path_insert_mark(_track)) {
path_tree_view_update_store(track_tree_view, _track);
}
return TRUE;
gboolean
menu_cb_track_distlast(GtkAction *action)
{
-track_show_distance_from_last(_track);
+path_show_distance_from_last(_track);
return TRUE;
}
gboolean
menu_cb_track_distfirst(GtkAction *action)
{
-track_show_distance_from_first(_track);
+path_show_distance_from_first(_track);
return TRUE;
}
gboolean
menu_cb_track_clear(GtkAction *action)
{
-track_clear(_track);
+path_clear(_track);
path_tree_view_update_store(track_tree_view, _track);
return TRUE;
}
if (_gps->io.conn > RCVR_OFF)
gps_conn_set_state(_gps, RCVR_OFF);
gps_disconnect(_gps);
- track_add(_track, NULL);
+ path_add_break(_track);
_speed_excess=FALSE;
}
if (_enable_gps==FALSE)
}
break;
case CUSTOM_ACTION_ROUTE_DISTNEXT:
- route_show_distance_to_next(_route);
+ path_show_distance_to_next(_route);
break;
case CUSTOM_ACTION_ROUTE_DISTLAST:
- route_show_distance_to_last(_route);
+ path_show_distance_to_last(_route);
break;
case CUSTOM_ACTION_TRACK_BREAK:
path_insert_break(_track);
break;
case CUSTOM_ACTION_TRACK_DISTLAST:
- track_show_distance_from_last(_track);
+ path_show_distance_from_last(_track);
break;
case CUSTOM_ACTION_TRACK_DISTFIRST:
- track_show_distance_from_first(_track);
+ path_show_distance_from_first(_track);
break;
case CUSTOM_ACTION_TOGGLE_GPS:
set_action_activate("gps_enable", !_enable_gps);
/* Now, parse the autoroute and update the display. */
if (_autoroute_data.enabled && gpx_parse(&_route, _autoroute_data.rdl_data.bytes, _autoroute_data.rdl_data.bytes_read, 0)) {
/* Find the nearest route point, if we're connected. */
- route_find_nearest_point(_route);
- map_force_redraw();
+ path_find_nearest_point(_route);
}
route_cancel_autoroute(_route, TRUE); /* We're done. Clean up. */
} else {
return FALSE;
}
+/**
+ * Append a waypoint to path at given lat, lon with description desc
+ */
gboolean
path_add_waypoint(Path *path, gdouble lat, gdouble lon, gchar *desc)
{
latlon2unit(lat, lon, unitx, unity);
MACRO_PATH_INCREMENT_TAIL(*path);
-path->tail->unitx = unitx;
-path->tail->unity = unity;
-path->tail->time = 0;
-path->tail->altitude = NAN;
+path->tail->unitx=unitx;
+path->tail->unity=unity;
+path->tail->time=0;
+path->tail->altitude=NAN;
MACRO_PATH_INCREMENT_WTAIL(*path);
-path->wtail->point = path->tail;
-path->wtail->desc = desc;
+path->wtail->point=path->tail;
+path->wtail->desc=desc;
path_find_nearest_point(path);
+g_signal_emit(G_OBJECT(path), signals[NEW_WAYPOINT], 0, NULL);
+
return TRUE;
}
+/**
+ * Append a path point to path
+ *
+ * Returns: TRUE if the new point was added. FALSE is returned if new point distance was under sensitivity setting.
+ */
gboolean
path_add_point(Path *path, GpsData *gps)
{
g_return_val_if_fail(path, FALSE);
if (!gps) {
- MACRO_PATH_INCREMENT_TAIL(*path);
- *path->tail=_point_null;
+ path_add_break(path);
return FALSE;
}
g_debug("TRACK: %f %f (%d)", path->length, path->avgspeed, path->points);
g_signal_emit(G_OBJECT(path), signals[NEW_POINT], 0, NULL);
+ return TRUE;
}
-return TRUE;
+return FALSE;
}
gboolean
-path_insert_break(Path *path)
+path_add_break(Path *path)
{
g_return_val_if_fail(path, FALSE);
g_return_val_if_fail(path->tail, FALSE);
void path_find_nearest_point(Path *path);
gboolean path_update_nears(Path *route, Point *point, gboolean quick);
-gboolean path_insert_break(Path *path);
+gboolean path_add_break(Path *path);
void path_insert_mark_text(Path *path, gchar *text);
void path_insert_mark_autonumber(Path *path);
void path_insert_mark_audio(Path *path, gchar *audio);
route_cancel_autoroute(route, FALSE);
announced_waypoint=NULL;
path_clear(route);
- route_find_nearest_point(route);
+ path_find_nearest_point(route);
r=TRUE;
}
MACRO_BANNER_SHOW_INFO(_window, _("Route Opened"));
/* Find the nearest route point, if we're connected. */
- route_find_nearest_point(route);
+ path_find_nearest_point(route);
route_set_destination_from_last(route, &_dest);
return TRUE;
} else {
GtkTreeIter iter;
/* Find the nearest route point, if we're connected. */
- route_find_nearest_point(route);
+ path_find_nearest_point(route);
/* Cancel any autoroute that might be occurring. */
route_cancel_autoroute(route, FALSE);