{
GError *error = NULL;
gboolean ret=TRUE;
+gfloat p;
switch (mis) {
case MAPPER_INIT_START:
track_init();
route_init();
mis=MAPPER_INIT_CONFIG;
+ p=0.1;
break;
case MAPPER_INIT_CONFIG:
config_init();
map_download_init();
mis=MAPPER_INIT_GPS;
+ p=0.2;
break;
case MAPPER_INIT_GPS:
gps_init();
mis=MAPPER_INIT_DB;
+ p=0.3;
break;
case MAPPER_INIT_DB:
if (db_connect(&_db, _mapper_db)) {
} else {
mis=MAPPER_INIT_VOICE;
}
+ p=0.5;
break;
case MAPPER_INIT_POI:
poi_init(&_db);
mis=MAPPER_INIT_OSM;
+ p=0.6;
break;
case MAPPER_INIT_OSM:
osm_init(&_db);
mis=MAPPER_INIT_VOICE;
+ p=0.8;
break;
case MAPPER_INIT_VOICE:
#if defined (WITH_GST) && defined (WITH_ESPEAK)
}
#endif
mis=MAPPER_INIT_MISC;
+ p=0.85;
break;
case MAPPER_INIT_MISC:
/* Initialize D-Bus system connection. */
}
#endif
mis=MAPPER_INIT_UI;
+ p=0.9;
break;
case MAPPER_INIT_UI:
mapper_ui_init();
mis=MAPPER_INIT_GOTO;
+ p=0.99;
break;
case MAPPER_INIT_GOTO:
if (map_goto_position(&_home)==FALSE)
g_printerr("Home is not set.\n");
+ else
+ map_center_unit(_center.unitx, _center.unity);
mis=MAPPER_INIT_DONE;
+ p=1.0;
break;
case MAPPER_INIT_DONE:
progress_dialog_remove(init_dialog);
break;
}
+#if 1
+gtk_progress_bar_set_fraction(GTK_PROGRESS(init_progress), p);
+#else
gtk_progress_bar_pulse(GTK_PROGRESS(init_progress));
+#endif
return ret;
}