Point *curr = NULL;
WayPoint *wcurr = NULL;
gboolean trkseg_break = FALSE;
- printf("%s()\n", __PRETTY_FUNCTION__);
/* Find first non-zero point. */
for (curr = path->head - 1, wcurr = path->whead; curr++ != path->tail;) {
/* Write the footer. */
WRITE_STRING(" </trkseg>\n" " </trk>\n" "</gpx>\n");
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
static void
gpx_start_element(SaxData * data, const xmlChar * name, const xmlChar ** attrs)
{
- vprintf("%s(%s)\n", __PRETTY_FUNCTION__, name);
switch (data->state) {
case ERROR:
;
}
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}
/**
static void
gpx_end_element(SaxData * data, const xmlChar * name)
{
- vprintf("%s(%s)\n", __PRETTY_FUNCTION__, name);
switch (data->state) {
case ERROR:
;
}
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}
/**
gpx_chars(SaxData * data, const xmlChar * ch, int len)
{
guint i;
- vprintf("%s()\n", __PRETTY_FUNCTION__);
switch (data->state) {
case ERROR:
break;
}
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}
/**
static xmlEntityPtr
gpx_get_entity(SaxData * data, const xmlChar * name)
{
- vprintf("%s()\n", __PRETTY_FUNCTION__);
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
return xmlGetPredefinedEntity(name);
}
static void
gpx_error(SaxData * data, const gchar * msg, ...)
{
- vprintf("%s()\n", __PRETTY_FUNCTION__);
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
data->state = ERROR;
}
{
SaxData data;
xmlSAXHandler sax_handler;
- printf("%s()\n", __PRETTY_FUNCTION__);
MACRO_PATH_INIT(data.path);
data.state = START;
g_string_free(data.chars, TRUE);
if (data.state != FINISH) {
- vprintf("%s(): return FALSE\n", __PRETTY_FUNCTION__);
return FALSE;
}
to_replace->wtail - to_replace->whead + 1);
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
{
gtk_progress_bar_set_fraction(_progress_item, fraction);
if (fraction==1.0) {
- gtk_widget_hide(_progress_item);
gtk_progress_bar_set_text(_progress_item, "");
+ gtk_widget_hide(_progress_item);
} else
gtk_widget_show(_progress_item);
}
GtkWidget *hildon_banner_show_animation(GtkWidget *widget, const gchar *animation_name, const gchar *text)
{
hildon_banner_show_information(_status_bar, NULL, text);
+gtk_progress_bar_set_text(_progress_item, text);
gtk_widget_show(_progress_item);
gtk_progress_bar_pulse(_progress_item);
-gtk_progress_bar_set_text(_progress_item, text);
return NULL;
}
g_slice_free(ProgressUpdateInfo, pui);
}
-
gboolean
map_download_timeout()
{
gint num_transfers = 0, num_msgs = 0;
gint deletes_left = 50; /* only do 50 deletes at a time. */
CURLMsg *msg;
-vprintf("%s()\n", __PRETTY_FUNCTION__);
if (_curl_multi && CURLM_CALL_MULTI_PERFORM == curl_multi_perform(_curl_multi, &num_transfers))
return TRUE; /* Give UI a chance first. */
_curl_multi = NULL;
_curl_sid = 0;
- vprintf("%s(): return FALSE\n", __PRETTY_FUNCTION__);
return FALSE;
}
} else
destroy_counter = 50;
-vprintf("%s(): return TRUE (%d, %d)\n", __PRETTY_FUNCTION__,
- num_transfers, g_tree_nnodes(_pui_tree));
return TRUE;
}
if (!_num_downloads++ && !_download_banner) {
gchar buffer[100];
- g_snprintf(buffer, 100, _("Downloading maps (%d/%d)"), _curr_download, _num_downloads);
+ g_snprintf(buffer, 100, _("Downloading maps (%d)"), g_tree_nnodes(_pui_tree));
_download_banner = hildon_banner_show_progress(_window, NULL, buffer);
}
}
popup_error(rmi->dialog,
_("Cannot delete the last repository - there must be at"
" lease one repository."));
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
gtk_widget_destroy(confirm);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
cmb_repos))),
NULL) - 1);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return rei;
}
GtkWidget *label;
GtkWidget *txt_name;
GtkWidget *dialog;
- printf("%s()\n", __PRETTY_FUNCTION__);
dialog = gtk_dialog_new_with_buttons(_("New Repository"),
GTK_WINDOW(rmi->dialog),
gtk_widget_destroy(dialog);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
}
gtk_widget_destroy(confirm);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
gchar *tail;
gint size;
GnomeVFSResult vfs_result;
- printf("%s()\n", __PRETTY_FUNCTION__);
/* Get repo config file from www.gnuite.com. */
if (GNOME_VFS_OK != (vfs_result = gnome_vfs_read_entire_file
}
gtk_widget_destroy(confirm);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
map_set_zoom(_zoom); /* make sure we're at an appropriate zoom level. */
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
guint i;
gchar buffer[80];
GtkWidget *confirm;
- printf("%s()\n", __PRETTY_FUNCTION__);
latlon2unit(start_lat, start_lon, start_unitx, start_unity);
latlon2unit(end_lat, end_lon, end_unitx, end_unity);
if (GTK_RESPONSE_OK != gtk_dialog_run(GTK_DIALOG(confirm))) {
gtk_widget_destroy(confirm);
- vprintf("%s(): return FALSE\n", __PRETTY_FUNCTION__);
return FALSE;
}
for (i = 0; i < MAX_ZOOM; i++) {
}
}
gtk_widget_destroy(confirm);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
guint radius =
hildon_number_editor_get_value(HILDON_NUMBER_EDITOR
(mapman_info->num_route_radius));
- printf("%s()\n", __PRETTY_FUNCTION__);
/* First, get the number of maps to download. */
for (i = 0; i < MAX_ZOOM; i++) {
if (GTK_RESPONSE_OK != gtk_dialog_run(GTK_DIALOG(confirm))) {
gtk_widget_destroy(confirm);
- vprintf("%s(): return FALSE\n", __PRETTY_FUNCTION__);
return FALSE;
}
}
_route_dl_radius = radius;
gtk_widget_destroy(confirm);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
static void
mapman_clear(GtkWidget * widget, MapmanInfo * mapman_info)
{
- guint i;
- printf("%s()\n", __PRETTY_FUNCTION__);
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(mapman_info->notebook)))
- /* This is the second page (the "Zoom" page) - clear the checks. */
- for (i = 0; i < MAX_ZOOM; i++)
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON
- (mapman_info->
- chk_zoom_levels[i]),
- FALSE);
- else {
- /* This is the first page (the "Area" page) - clear the text fields. */
- gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_topleft_lat), "");
- gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_topleft_lon), "");
- gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_botright_lat),
- "");
- gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_botright_lon),
- "");
- }
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+guint i;
+
+if (gtk_notebook_get_current_page(GTK_NOTEBOOK(mapman_info->notebook))) {
+ /* This is the second page (the "Zoom" page) - clear the checks. */
+ for (i = 0; i < MAX_ZOOM; i++)
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(mapman_info->chk_zoom_levels[i]), FALSE);
+} else {
+ /* This is the first page (the "Area" page) - clear the text fields. */
+ gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_topleft_lat), "");
+ gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_topleft_lon), "");
+ gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_botright_lat), "");
+ gtk_entry_set_text(GTK_ENTRY(mapman_info->txt_botright_lon), "");
+}
}
static void
mapman_update_state(GtkWidget * widget, MapmanInfo * mapman_info)
{
- printf("%s()\n", __PRETTY_FUNCTION__);
- gtk_widget_set_sensitive(mapman_info->chk_overwrite,
- gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
- (mapman_info->
- rad_download)));
+gtk_widget_set_sensitive(mapman_info->chk_overwrite,
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(mapman_info->rad_download)));
if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(mapman_info->rad_by_area)))
gtk_widget_set_sensitive(mapman_info->num_route_radius,
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON
- (mapman_info->
- rad_by_route)));
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+ (mapman_info->rad_by_route)));
}
gboolean menu_cb_mapman(GtkAction * action)
gchar buffer[80];
gfloat lat, lon;
guint i;
- printf("%s()\n", __PRETTY_FUNCTION__);
- mapman_info.dialog = dialog =
- gtk_dialog_new_with_buttons(_("Manage Maps"), GTK_WINDOW(_window),
+ mapman_info.dialog = dialog = gtk_dialog_new_with_buttons(_("Manage Maps"), GTK_WINDOW(_window),
GTK_DIALOG_MODAL, GTK_STOCK_OK,
GTK_RESPONSE_ACCEPT, NULL);
/* Enable the help button. */
#ifdef WITH_OSSO
- ossohelp_dialog_help_enable(GTK_DIALOG(mapman_info.dialog),
- HELP_ID_MAPMAN, _osso);
+ ossohelp_dialog_help_enable(GTK_DIALOG(mapman_info.dialog), HELP_ID_MAPMAN, _osso);
#endif
/* Clear button. */
G_CALLBACK(mapman_clear), &mapman_info);
/* Cancel button. */
- gtk_dialog_add_button(GTK_DIALOG(dialog),
- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
+ gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
- mapman_info.notebook =
- gtk_notebook_new(), TRUE, TRUE, 0);
+ mapman_info.notebook = gtk_notebook_new(), TRUE, TRUE, 0);
/* Setup page. */
gtk_notebook_append_page(GTK_NOTEBOOK(mapman_info.notebook),
gtk_box_pack_start(GTK_BOX(vbox),
hbox = gtk_hbox_new(FALSE, 4), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox),
- mapman_info.rad_download
- =
- gtk_radio_button_new_with_label(NULL,
- _("Download Maps")),
- FALSE, FALSE, 0);
+ mapman_info.rad_download = gtk_radio_button_new_with_label(NULL, _("Download Maps")), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), label =
gtk_alignment_new(0.f, 0.5f, 0.f, 0.f), FALSE, FALSE,
0);
gtk_box_pack_start(GTK_BOX(vbox),
mapman_info.rad_by_area
- = gtk_radio_button_new_with_label(NULL,
- _
- ("By Area (see tab)")),
- FALSE, FALSE, 0);
+ = gtk_radio_button_new_with_label(NULL, _("By Area (see tab)")), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), hbox =
gtk_hbox_new(FALSE, 4), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), mapman_info.rad_by_route =
gtk_widget_hide(dialog); /* Destroying causes a crash (!?!?!??!) */
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
+/*
+ * This file is part of mapper
+ *
+ * Copyright (C) 2007 Kaj-Michael Lang
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#define _GNU_SOURCE
#include <unistd.h>
+/*
+ * This file is part of mapper
+ *
+ * Copyright (C) 2007 Kaj-Michael Lang
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef _OSM_DB_H
#define _OSM_DB_H
+/*
+ * This file is part of mapper
+ *
+ * Copyright (C) 2007 Kaj-Michael Lang
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#define _GNU_SOURCE
#include <stdio.h>
+/*
+ * This file is part of mapper
+ *
+ * Copyright (C) 2007 Kaj-Michael Lang
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
#ifndef _OSM_H
#define _OSM_H
gboolean
origin_type_selected(GtkWidget * toggle, OriginToggleInfo * oti)
{
- printf("%s()\n", __PRETTY_FUNCTION__);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(toggle))) {
if (toggle == oti->rad_use_gps) {
gtk_widget_set_sensitive(oti->chk_auto,
toggle == oti->rad_use_gps);
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
WayPoint *wnear;
guint64 nearest_squared;
Point pos = { unitx, unity, 0, NAN };
- printf("%s()\n", __PRETTY_FUNCTION__);
wcurr = wnear = _route.whead;
if (wcurr && wcurr != _route.wtail) {
MACRO_BANNER_SHOW_INFO(_window, _("There are no waypoints."));
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
return NULL;
}
Point *curr, *near;
WayPoint *wcurr, *wnext;
guint64 near_dist_squared;
- printf("%s(%d)\n", __PRETTY_FUNCTION__, quick);
/* If we have waypoints (_next_way != NULL), then determine the "next
* waypoint", which is defined as the waypoint after the nearest point,
}
}
- vprintf("%s(): return %d\n", __PRETTY_FUNCTION__, ret);
return ret;
}
void
route_find_nearest_point()
{
- printf("%s()\n", __PRETTY_FUNCTION__);
/* Initialize _near_point to first non-zero point. */
_near_point = _route.head;
route_update_nears(FALSE);
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}
/**
gchar buffer[80];
gfloat lat1, lon1, lat2, lon2;
gdouble sum = 0.0;
- printf("%s()\n", __PRETTY_FUNCTION__);
/* If point is NULL, use the next waypoint. */
if (point == NULL && _next_way)
/* If point is still NULL, return an error. */
if (point == NULL) {
- printf("%s(): return FALSE\n", __PRETTY_FUNCTION__);
return FALSE;
}
MACRO_BANNER_SHOW_INFO(_window, buffer);
return TRUE;
- printf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
}
void
route_show_distance_to_next()
{
- printf("%s()\n", __PRETTY_FUNCTION__);
if (!route_show_distance_to(NULL)) {
MACRO_BANNER_SHOW_INFO(_window,
_("There is no next waypoint."));
}
- printf("%s(): return\n", __PRETTY_FUNCTION__);
}
void
route_show_distance_to_last()
{
- printf("%s()\n", __PRETTY_FUNCTION__);
if (_route.head != _route.tail) {
/* Find last non-zero point. */
MACRO_BANNER_SHOW_INFO(_window,
_("The current route is empty."));
}
- printf("%s(): return\n", __PRETTY_FUNCTION__);
}