GalleryDialog: Changes the paths to the system and custom galleries

This commit is contained in:
YuSanka 2021-07-14 17:41:37 +02:00
parent 8f5715b0d7
commit 4257ffddde
18 changed files with 25 additions and 20 deletions

View file

@ -159,6 +159,7 @@ void PresetBundle::setup_directories()
data_dir,
data_dir / "vendor",
data_dir / "cache",
data_dir / "shapes",
#ifdef SLIC3R_PROFILE_USE_PRESETS_SUBDIR
// Store the print/filament/printer presets into a "presets" directory.
data_dir / "presets",

View file

@ -46,9 +46,9 @@ void set_local_dir(const std::string &path);
const std::string& localization_dir();
// Set a path with shapes gallery files.
void set_gallery_dir(const std::string &path);
// Return a full path to the gallery directory.
const std::string& gallery_dir();
void set_sys_shapes_dir(const std::string &path);
// Return a full path to the system shapes gallery directory.
const std::string& sys_shapes_dir();
// Set a path with preset files.
void set_data_dir(const std::string &path);

View file

@ -175,16 +175,16 @@ const std::string& localization_dir()
return g_local_dir;
}
static std::string g_gallery_dir;
static std::string g_sys_shapes_dir;
void set_gallery_dir(const std::string &dir)
void set_sys_shapes_dir(const std::string &dir)
{
g_gallery_dir = dir;
g_sys_shapes_dir = dir;
}
const std::string& gallery_dir()
const std::string& sys_shapes_dir()
{
return g_gallery_dir;
return g_sys_shapes_dir;
}
// Translate function callback, to call wxWidgets translate function to convert non-localized UTF8 string to a localized one.