- gps_user_data_t *gps_data = (gps_user_data_t *)w->user_data;
-
- if (cnt < gps_data->total_count) {
- switch (gps_data->progress_type) {
- case WPT: s = g_strdup_printf(_("Downloaded %d out of %d %s..."), cnt, gps_data->total_count, "waypoints"); break;
- case TRK: s = g_strdup_printf(_("Downloaded %d out of %d %s..."), cnt, gps_data->total_count, "trackpoints"); break;
- default: s = g_strdup_printf(_("Downloaded %d out of %d %s..."), cnt, gps_data->total_count, "routepoints"); break;
- }
- } else {
- switch (gps_data->progress_type) {
- case WPT: s = g_strdup_printf(_("Downloaded %d %s."), cnt, "waypoints"); break;
- case TRK: s = g_strdup_printf(_("Downloaded %d %s."), cnt, "trackpoints"); break;
- default: s = g_strdup_printf(_("Downloaded %d %s."), cnt, "routepoints"); break;
- }
+ GtkWidget *progress_label;
+ gchar *s = NULL;
+ switch (gps_data->progress_type) {
+ case WPT:
+ progress_label = gps_data->wpt_label;
+ if ( gps_data->wpt_count < gps_data->wpt_total_count )
+ s = g_strdup_printf(_("Downloaded %d out of %d %s..."), gps_data->wpt_count, gps_data->wpt_total_count, "waypoints");
+ else
+ s = g_strdup_printf(_("Downloaded %d %s."), gps_data->wpt_count, "waypoints");
+ break;
+ case TRK:
+ progress_label = gps_data->trk_label;
+ if ( gps_data->trk_count < gps_data->trk_total_count )
+ s = g_strdup_printf(_("Downloaded %d out of %d %s..."), gps_data->trk_count, gps_data->trk_total_count, "trackpoints");
+ else
+ s = g_strdup_printf(_("Downloaded %d %s."), gps_data->trk_count, "trackpoints");
+ break;
+ default:
+ progress_label = gps_data->rte_label;
+ if ( gps_data->rte_count < gps_data->rte_total_count )
+ s = g_strdup_printf(_("Downloaded %d out of %d %s..."), gps_data->rte_count, gps_data->rte_total_count, "routepoints");
+ else
+ s = g_strdup_printf(_("Downloaded %d %s."), gps_data->rte_count, "routepoints");
+ break;