![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "config.h"#include <pwd.h>#include "osx/osx.h"#include "common/grealpath.h"#include "common/paths.h"#include "darktable.h"#include "file_location.h"#include "whereami.h"#include "system/macros.h"#include "system/mem_alloc.h"#include "common/logging.h"#include "common/utility.h"
Include dependency graph for file_location.c:Go to the source code of this file.
Macros | |
| #define | HAVE_GETPWNAM_R 1 |
| #define HAVE_GETPWNAM_R 1 |
Definition at line 46 of file file_location.c.
Definition at line 68 of file file_location.c.
References IS_NULL_PTR, and L.
Referenced by dt_loc_init(), and dt_loc_resolve_localedir().
check if directory open worked. Exit with error message in case it does not.
Definition at line 252 of file file_location.c.
References directory, DT_DEBUG_DEV, dt_free, dt_print(), IS_NULL_PTR, and L.
Referenced by dt_loc_init_datadir(), dt_loc_init_kerneldir(), dt_loc_init_localedir(), dt_loc_init_moduledir(), dt_loc_init_sharedir(), dt_loc_init_tmp_dir(), dt_loc_init_user_cache_dir(), and dt_loc_init_user_config_dir().
Definition at line 347 of file file_location.c.
References darktable_t::cachedir, and darktable.
Referenced by dt_loc_get_user_cache_dir().
Definition at line 342 of file file_location.c.
References darktable_t::configdir, and darktable.
Referenced by dt_loc_get_user_config_dir(), and main().
interned read-only getters for the app-lifetime path constants. Written once at startup by the dt_loc_init_*() family, never mutated afterwards: the returned pointer is valid for the whole application lifetime. Do not free.
Definition at line 317 of file file_location.c.
References darktable, and darktable_t::datadir.
Referenced by dt_loc_get_datadir(), and main().
| void dt_loc_get_datadir | ( | char * | datadir, |
| size_t | bufsize | ||
| ) |
Definition at line 384 of file file_location.c.
References dt_loc_datadir(), and L.
Referenced by _build_softproof_gamut_popover(), _database_init(), _get_model(), _handle_get_property(), _lib_geotagging_get_timezones(), _ls_db(), _noiseprofile_load(), _splash_build_data_path(), _splash_create_logo(), _splash_load_authors(), _util_get_svg_img(), dt_copy_resource_file(), dt_curl_init(), dt_gui_gtk_init(), dt_gui_load_theme(), dt_rawspeed_load_meta(), get_language_names(), gui_init(), gui_init(), load_profile_from_dir(), load_themes(), process(), and refresh_watermarks().
| gchar * dt_loc_get_home_dir | ( | const gchar * | user | ) |
returns the users home directory
Definition at line 114 of file file_location.c.
References dt_free, IS_NULL_PTR, and L.
Referenced by _dt_check_basedir(), _init_expansion(), dt_conf_expand_default_dir(), and dt_util_fix_path().
| void dt_loc_get_kerneldir | ( | char * | kerneldir, |
| size_t | bufsize | ||
| ) |
Definition at line 357 of file file_location.c.
References dt_loc_kerneldir(), and L.
Referenced by dt_opencl_device_init(), and dt_opencl_md5sum().
| void dt_loc_get_localedir | ( | char * | localedir, |
| size_t | bufsize | ||
| ) |
Definition at line 367 of file file_location.c.
References dt_loc_localedir(), and L.
Referenced by dt_init(), dt_l10n_init(), and get_language_names().
| void dt_loc_get_moduledir | ( | char * | moduledir, |
| size_t | bufsize | ||
| ) |
Definition at line 362 of file file_location.c.
References dt_loc_moduledir(), and L.
Referenced by dt_module_read_manifest().
| void dt_loc_get_sharedir | ( | char * | sharedir, |
| size_t | bufsize | ||
| ) |
Definition at line 388 of file file_location.c.
References dt_loc_sharedir(), and L.
Referenced by _splash_create_logo(), dt_gui_gtk_init(), and dt_init().
| void dt_loc_get_tmp_dir | ( | char * | tmpdir, |
| size_t | bufsize | ||
| ) |
Definition at line 380 of file file_location.c.
References dt_loc_tmpdir(), and L.
Referenced by _print_job_run(), dt_print_file(), and store().
| void dt_loc_get_user_cache_dir | ( | char * | cachedir, |
| size_t | bufsize | ||
| ) |
Definition at line 376 of file file_location.c.
References dt_loc_cachedir(), and L.
Referenced by _database_delete_mipmaps_files(), _opencl_driver_crash_marker_path(), dt_image_local_copy_paths_from_fullpath(), dt_image_local_copy_reset(), dt_mipmap_cache_get_filename(), and dt_opencl_device_init().
| void dt_loc_get_user_config_dir | ( | char * | configdir, |
| size_t | bufsize | ||
| ) |
Definition at line 372 of file file_location.c.
References dt_loc_configdir(), and L.
Referenced by _build_softproof_gamut_popover(), _database_init(), _database_migrate_to_xdg_structure(), _get_custom_model(), _get_model(), _handle_get_property(), _list_custom_models(), _ls_db(), _noiseprofile_load(), dt_colorchecker_find_CGATS_reference_files(), dt_colorchecker_find_cht_files(), dt_conf_expand_default_dir(), dt_folder_survey_init(), dt_gui_gtk_init(), dt_gui_load_theme(), dt_init(), dt_styles_save_to_file(), gui_init(), gui_init(), init_tab_general(), load_profile_from_dir(), load_themes(), process(), refresh_watermarks(), and save_usercss().
| void dt_loc_init | ( | const char * | datadir, |
| const char * | moduledir, | ||
| const char * | localedir, | ||
| const char * | configdir, | ||
| const char * | cachedir, | ||
| const char * | tmpdir, | ||
| const char * | kerneldir | ||
| ) |
initializes all dirs
Definition at line 96 of file file_location.c.
References _application_directory(), DT_DEBUG_DEV, dt_free, dt_loc_init_datadir(), dt_loc_init_kerneldir(), dt_loc_init_localedir(), dt_loc_init_moduledir(), dt_loc_init_sharedir(), dt_loc_init_tmp_dir(), dt_loc_init_user_cache_dir(), dt_loc_init_user_config_dir(), dt_print(), and L.
Referenced by dt_init().
init systemwide data dir
Definition at line 295 of file file_location.c.
References darktable, DARKTABLE_DATADIR, darktable_t::datadir, dt_check_opendir(), dt_loc_init_generic(), and L.
Referenced by dt_loc_init(), and main().
| gchar * dt_loc_init_generic | ( | const char * | absolute_value, |
| const char * | application_directory, | ||
| const char * | default_value | ||
| ) |
init specific dir. Value is appended if application_directory is not NULL (relative path resolution).
bundle detected ...
outside a bundle. Apply standard linux path rules
Definition at line 159 of file file_location.c.
References dt_free, dt_osx_get_bundle_res_path(), DT_PATH_MAX, dt_util_fix_path(), FALSE, g_realpath(), and L.
Referenced by dt_loc_init_datadir(), dt_loc_init_kerneldir(), dt_loc_init_localedir(), dt_loc_init_moduledir(), dt_loc_init_sharedir(), dt_loc_init_tmp_dir(), dt_loc_init_user_cache_dir(), dt_loc_init_user_config_dir(), and dt_loc_resolve_localedir().
init OpenCL kernels dir
Definition at line 307 of file file_location.c.
References darktable, DARKTABLE_KERNELSDIR, dt_check_opendir(), dt_loc_init_generic(), darktable_t::kerneldir, and L.
Referenced by dt_loc_init().
init the locale dir
Definition at line 289 of file file_location.c.
References darktable, DARKTABLE_LOCALEDIR, dt_check_opendir(), dt_loc_init_generic(), L, and darktable_t::localedir.
Referenced by dt_loc_init().
init the plugin dir
Definition at line 246 of file file_location.c.
References darktable, DARKTABLE_MODULEDIR, dt_check_opendir(), dt_loc_init_generic(), L, and darktable_t::moduledir.
Referenced by dt_loc_init().
init share dir
Definition at line 301 of file file_location.c.
References darktable, DARKTABLE_SHAREDIR, dt_check_opendir(), dt_loc_init_generic(), L, and darktable_t::sharedir.
Referenced by dt_loc_init().
init user local dir
Definition at line 232 of file file_location.c.
References darktable, dt_check_opendir(), dt_loc_init_generic(), L, and darktable_t::tmpdir.
Referenced by dt_loc_init().
init user cache dir
Definition at line 238 of file file_location.c.
References darktable_t::cachedir, darktable, dt_check_opendir(), dt_free, dt_loc_init_generic(), and L.
Referenced by dt_loc_init().
init user config dir
Definition at line 224 of file file_location.c.
References darktable_t::configdir, darktable, dt_check_opendir(), dt_free, dt_loc_init_generic(), and L.
Referenced by dt_loc_init(), and main().
Definition at line 352 of file file_location.c.
References darktable, and darktable_t::kerneldir.
Referenced by dt_loc_get_kerneldir().
Definition at line 332 of file file_location.c.
References darktable, and darktable_t::localedir.
Referenced by dt_loc_get_localedir().
Definition at line 327 of file file_location.c.
References darktable, and darktable_t::moduledir.
Referenced by dt_loc_get_moduledir().
| void dt_loc_resolve_localedir | ( | char * | localedir, |
| size_t | bufsize | ||
| ) |
Resolve the locale directory the way dt_loc_init() does, creating it if missing, but set no global and check nothing: dt_init() checks it right after. For the command-line tools, which bind their text domain before dt_init(). dt_init() zeroes every path before resolving them all, so whatever an earlier dt_loc_init() set would leak.
Definition at line 87 of file file_location.c.
References _application_directory(), DARKTABLE_LOCALEDIR, dt_free, dt_loc_init_generic(), and L.
Referenced by main().
Definition at line 322 of file file_location.c.
References darktable, and darktable_t::sharedir.
Referenced by dt_loc_get_sharedir().
Definition at line 337 of file file_location.c.
References darktable, and darktable_t::tmpdir.
Referenced by dt_loc_get_tmp_dir().