--- trunk/src/gconf.c 2009/07/29 19:24:15 34 +++ trunk/src/gconf.c 2009/08/18 20:33:08 62 @@ -84,7 +84,11 @@ { "goto_dss", STORE_BOOL, OFFSET(goto_disable_screensaver) }, { "cachelist_update", STORE_BOOL, OFFSET(cachelist_update) }, #endif - +#ifdef ENABLE_OSM_GPS_MAP + { "map_lat", STORE_FLOAT, OFFSET(map.pos.lat) }, + { "map_lon", STORE_FLOAT, OFFSET(map.pos.lon) }, + { "map_zoom", STORE_INT, OFFSET(map.zoom) }, +#endif { NULL, -1, -1 } }; @@ -326,6 +330,22 @@ #endif appdata->image_path = strdup(DEFAULT_IMAGE_PATH); + /* check if this path is actually accessible */ + /* and change it to the current users home if not */ + /* (this should only happen on scratchbox) */ + if(!g_file_test(appdata->image_path, G_FILE_TEST_IS_DIR)) { + if(g_mkdir_with_parents(appdata->image_path, 0700) != 0) { + char *p = getenv("HOME"); + if(!p) p = "/tmp/"; + + appdata->image_path = + g_strdup_printf("%s%s%s", p, + (p[strlen(p)-1]!='/')?"/":"", + DEFAULT_IMAGE_PATH_HOME); + printf("using alt path %s\n", appdata->image_path); + } + } + } else { /* some versions old versions messed up the path */ if(appdata->image_path[strlen(appdata->image_path)-1] != '/') {