84 |
{ "goto_dss", STORE_BOOL, OFFSET(goto_disable_screensaver) }, |
{ "goto_dss", STORE_BOOL, OFFSET(goto_disable_screensaver) }, |
85 |
{ "cachelist_update", STORE_BOOL, OFFSET(cachelist_update) }, |
{ "cachelist_update", STORE_BOOL, OFFSET(cachelist_update) }, |
86 |
#endif |
#endif |
87 |
|
#ifdef ENABLE_OSM_GPS_MAP |
88 |
|
{ "map_lat", STORE_FLOAT, OFFSET(map.pos.lat) }, |
89 |
|
{ "map_lon", STORE_FLOAT, OFFSET(map.pos.lon) }, |
90 |
|
{ "map_zoom", STORE_INT, OFFSET(map.zoom) }, |
91 |
|
#endif |
92 |
{ NULL, -1, -1 } |
{ NULL, -1, -1 } |
93 |
}; |
}; |
94 |
|
|
330 |
#endif |
#endif |
331 |
appdata->image_path = strdup(DEFAULT_IMAGE_PATH); |
appdata->image_path = strdup(DEFAULT_IMAGE_PATH); |
332 |
|
|
333 |
|
/* check if this path is actually accessible */ |
334 |
|
/* and change it to the current users home if not */ |
335 |
|
/* (this should only happen on scratchbox) */ |
336 |
|
if(!g_file_test(appdata->image_path, G_FILE_TEST_IS_DIR)) { |
337 |
|
if(g_mkdir_with_parents(appdata->image_path, 0700) != 0) { |
338 |
|
char *p = getenv("HOME"); |
339 |
|
if(!p) p = "/tmp/"; |
340 |
|
|
341 |
|
appdata->image_path = |
342 |
|
g_strdup_printf("%s%s%s", p, |
343 |
|
(p[strlen(p)-1]!='/')?"/":"", |
344 |
|
DEFAULT_IMAGE_PATH_HOME); |
345 |
|
printf("using alt path %s\n", appdata->image_path); |
346 |
|
} |
347 |
|
} |
348 |
|
|
349 |
} else { |
} else { |
350 |
/* some versions old versions messed up the path */ |
/* some versions old versions messed up the path */ |
351 |
if(appdata->image_path[strlen(appdata->image_path)-1] != '/') { |
if(appdata->image_path[strlen(appdata->image_path)-1] != '/') { |