if (_autoroute_data.curl_easy) {
if (_curl_multi)
curl_multi_remove_handle(_curl_multi,
- _autoroute_data.
- curl_easy);
+ _autoroute_data.curl_easy);
curl_easy_cleanup(_autoroute_data.curl_easy);
_autoroute_data.curl_easy = NULL;
}
/* Attempt to download the route from the server. */
MACRO_CURL_EASY_INIT(curl_easy);
curl_easy_setopt(curl_easy, CURLOPT_URL, buffer);
- curl_easy_setopt(curl_easy, CURLOPT_WRITEFUNCTION,
- route_dl_cb_read);
+ curl_easy_setopt(curl_easy, CURLOPT_WRITEFUNCTION, route_dl_cb_read);
curl_easy_setopt(curl_easy, CURLOPT_WRITEDATA, &rdl_data);
if (CURLE_OK != curl_easy_perform(curl_easy)) {
popup_error(dialog,
- _
- ("Failed to connect to GPX Directions server"));
+ _("Failed to connect to GPX Directions server"));
curl_easy_cleanup(curl_easy);
g_free(rdl_data.bytes);
/* Let them try again */
if (strncmp(rdl_data.bytes, "<?xml", strlen("<?xml"))) {
/* Not an XML document - must be bad locations. */
popup_error(dialog,
- _
- ("Could not generate directions. Make sure your "
+ _("Could not generate directions. Make sure your "
"source and destination are valid."));
g_free(rdl_data.bytes);
/* Let them try again. */
if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(oti.chk_auto))) {
/* Kick off a timeout to start the first update. */
- _autoroute_data.dest =
- gnome_vfs_escape_string(to);
+ _autoroute_data.dest = gnome_vfs_escape_string(to);
_autoroute_data.enabled = TRUE;
}
/* Save Origin in Route Locations list if not from GPS. */
- if (!gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON(oti.rad_use_gps))
- && !g_slist_find_custom(_loc_list, from,
- (GCompareFunc) strcmp)) {
- _loc_list =
- g_slist_prepend(_loc_list, g_strdup(from));
+ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(oti.rad_use_gps))
+ && !g_slist_find_custom(_loc_list, from, (GCompareFunc) strcmp)) {
+ _loc_list = g_slist_prepend(_loc_list, g_strdup(from));
gtk_list_store_insert_with_values(_loc_model,
- &iter,
- INT_MAX, 0,
- from, -1);
+ &iter, INT_MAX, 0, from, -1);
}
/* Save Destination in Route Locations list. */
- if (!g_slist_find_custom(_loc_list, to,
- (GCompareFunc) strcmp)) {
- _loc_list =
- g_slist_prepend(_loc_list, g_strdup(to));
+ if (!g_slist_find_custom(_loc_list, to, (GCompareFunc) strcmp)) {
+ _loc_list = g_slist_prepend(_loc_list, g_strdup(to));
gtk_list_store_insert_with_values(_loc_model,
&iter,
INT_MAX, 0,