} SpeedLocation;
gchar *SPEED_LOCATION_TEXT[SPEED_LOCATION_ENUM_COUNT];
-typedef struct _RouteDownloadData RouteDownloadData;
-struct _RouteDownloadData {
- gchar *bytes;
- guint bytes_read;
-};
-
-/** Data used during the asynchronous automatic route downloading operation. */
-typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
-struct _AutoRouteDownloadData {
- gboolean enabled;
- gboolean in_progress;
- gchar *dest;
- CURL *curl_easy;
- gchar *src_str;
- RouteDownloadData rdl_data;
-};
-
typedef struct _BrowseInfo BrowseInfo;
struct _BrowseInfo {
GtkWidget *dialog;
#include "file.h"
#include "latlon.h"
#include "path.h"
-#include "map-download.h"
+#include "path-mapper.h"
typedef struct _OriginToggleInfo OriginToggleInfo;
struct _OriginToggleInfo {
if (path && path_has_points(path)) {
dist=path_calculate_distance_from(path, point);
- g_snprintf(buffer, sizeof(buffer), "%s: %.02f %s", _("Distance"), sum * UNITS_CONVERT[_units], UNITS_TEXT[_units]);
+ g_snprintf(buffer, sizeof(buffer), "%s: %.02f %s", _("Distance"), dist * UNITS_CONVERT[_units], UNITS_TEXT[_units]);
MACRO_BANNER_SHOW_INFO(_window, buffer);
} else {
MACRO_BANNER_SHOW_INFO(_window, _("The current path is empty."));
CURLMsg *msg;
gint num_msgs = 0;
-if (!_autoroute.curl_multi) {
+if (!_autoroute_data.curl_multi) {
route_cancel_autoroute(_route, TRUE);
return FALSE;
}
-while (_autoroute.curl_multi && (msg = curl_multi_info_read(_autoroute.curl_multi, &num_msgs))) {
+while (_autoroute_data.curl_multi && (msg = curl_multi_info_read(_autoroute_data.curl_multi, &num_msgs))) {
if (msg->msg == CURLMSG_DONE) {
/* Now, parse the autoroute and update the display. */
if (_autoroute_data.enabled && path_gpx_parse(_route, _autoroute_data.rdl_data.bytes, _autoroute_data.rdl_data.bytes_read, 0)) {
Path *_track;
+typedef struct _RouteDownloadData RouteDownloadData;
+struct _RouteDownloadData {
+ gchar *bytes;
+ guint bytes_read;
+};
+
+/** Data used during the asynchronous automatic route downloading operation. */
+typedef struct _AutoRouteDownloadData AutoRouteDownloadData;
+struct _AutoRouteDownloadData {
+ gboolean enabled;
+ gboolean in_progress;
+ gchar *dest;
+ guint curl_sid;
+ CURLM *curl_multi;
+ CURL *curl_easy;
+ gchar *src_str;
+ RouteDownloadData rdl_data;
+};
/** The singleton auto-route-download data. */
AutoRouteDownloadData _autoroute_data;
void route_show_distance_to_last(Path *route);
void route_show_distance_to_next(Path *route);
-
gboolean track_save(Path *track);
gboolean track_open(Path *track);
void track_clear(Path *track);