merge with dev
This commit is contained in:
@@ -606,6 +606,15 @@ void Options::setDefaults()
|
||||
rtSettings.cbdlsensi = 1.0;//betwen 0.001 to 1
|
||||
rtSettings.fftwsigma = true; //choice between sigma^2 or empirical formula
|
||||
|
||||
rtSettings.itcwb_thres = 34;//between 10 to 55
|
||||
rtSettings.itcwb_sort = false;
|
||||
rtSettings.itcwb_greenrange = 0;//between 0 to 2
|
||||
rtSettings.itcwb_greendeltatemp = 2;//between 0 and 4
|
||||
rtSettings.itcwb_forceextra = true;
|
||||
rtSettings.itcwb_sizereference = 3;//between 1 and 5
|
||||
rtSettings.itcwb_delta = 1;//between 0 and 5
|
||||
rtSettings.itcwb_stdobserver10 = true;
|
||||
rtSettings.itcwb_precis = 5;//3 or 5 or 9
|
||||
// end locallab
|
||||
|
||||
rtSettings.protectred = 60;
|
||||
@@ -1542,6 +1551,42 @@ void Options::readFromFile(Glib::ustring fname)
|
||||
rtSettings.level123_cbdl = keyFile.get_double("Color Management", "CBDLlevel123");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_thres")) {
|
||||
rtSettings.itcwb_thres = keyFile.get_integer("Color Management", "Itcwb_thres");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_sort")) {
|
||||
rtSettings.itcwb_sort = keyFile.get_boolean("Color Management", "Itcwb_sort");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_forceextra")) {
|
||||
rtSettings.itcwb_forceextra = keyFile.get_boolean("Color Management", "Itcwb_forceextra");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_stdobserver10")) {
|
||||
rtSettings.itcwb_stdobserver10 = keyFile.get_boolean("Color Management", "Itcwb_stdobserver10");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_greenrange")) {
|
||||
rtSettings.itcwb_greenrange = keyFile.get_integer("Color Management", "Itcwb_greenrange");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_greendeltatemp")) {
|
||||
rtSettings.itcwb_greendeltatemp = keyFile.get_integer("Color Management", "Itcwb_greendeltatemp");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_sizereference")) {
|
||||
rtSettings.itcwb_sizereference = keyFile.get_integer("Color Management", "Itcwb_sizereference");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_delta")) {
|
||||
rtSettings.itcwb_delta = keyFile.get_integer("Color Management", "Itcwb_delta");
|
||||
}
|
||||
|
||||
if (keyFile.has_key("Color Management", "Itcwb_precis")) {
|
||||
rtSettings.itcwb_precis = keyFile.get_integer("Color Management", "Itcwb_precis");
|
||||
}
|
||||
|
||||
//if (keyFile.has_key ("Color Management", "Colortoningab")) rtSettings.colortoningab = keyFile.get_double("Color Management", "Colortoningab");
|
||||
//if (keyFile.has_key ("Color Management", "Decaction")) rtSettings.decaction = keyFile.get_double("Color Management", "Decaction");
|
||||
|
||||
@@ -2241,6 +2286,16 @@ void Options::saveToFile(Glib::ustring fname)
|
||||
//keyFile.set_boolean ("Color Management", "Ciebadpixgauss", rtSettings.ciebadpixgauss);
|
||||
keyFile.set_double("Color Management", "CBDLlevel0", rtSettings.level0_cbdl);
|
||||
keyFile.set_double("Color Management", "CBDLlevel123", rtSettings.level123_cbdl);
|
||||
keyFile.set_integer("Color Management", "Itcwb_thres", rtSettings.itcwb_thres);
|
||||
keyFile.set_boolean("Color Management", "Itcwb_sort", rtSettings.itcwb_sort);
|
||||
keyFile.set_integer("Color Management", "Itcwb_greenrange", rtSettings.itcwb_greenrange);
|
||||
keyFile.set_integer("Color Management", "Itcwb_greendeltatemp", rtSettings.itcwb_greendeltatemp);
|
||||
keyFile.set_boolean("Color Management", "Itcwb_forceextra", rtSettings.itcwb_forceextra);
|
||||
keyFile.set_integer("Color Management", "Itcwb_sizereference", rtSettings.itcwb_sizereference);
|
||||
keyFile.set_integer("Color Management", "Itcwb_delta", rtSettings.itcwb_delta);
|
||||
keyFile.set_boolean("Color Management", "Itcwb_stdobserver10", rtSettings.itcwb_stdobserver10);
|
||||
keyFile.set_integer("Color Management", "Itcwb_precis", rtSettings.itcwb_precis);
|
||||
|
||||
//keyFile.set_double ("Color Management", "Colortoningab", rtSettings.colortoningab);
|
||||
//keyFile.set_double ("Color Management", "Decaction", rtSettings.decaction);
|
||||
keyFile.set_string("Color Management", "ClutsDirectory", clutsDir);
|
||||
@@ -2356,8 +2411,18 @@ void Options::load(bool lightweight)
|
||||
const gchar* path;
|
||||
Glib::ustring dPath;
|
||||
|
||||
#ifdef __APPLE__
|
||||
// Build Application Support directory path for macOS.
|
||||
const char* homedir = g_getenv("HOME"); // This returns the current container data dir in ~/Library
|
||||
std::string homebuf{homedir};
|
||||
int homelength = strlen(homebuf.c_str());
|
||||
homebuf[homelength-44] = '\0'; // Terminate string after ${HOME}/Library
|
||||
std::string homeconfig{homebuf};
|
||||
std::strcat(&homeconfig[0], "/Application Support/RawTherapee/config");
|
||||
path = homeconfig.c_str();
|
||||
#else
|
||||
path = g_getenv("RT_SETTINGS");
|
||||
|
||||
#endif
|
||||
if (path != nullptr) {
|
||||
rtdir = Glib::ustring(path);
|
||||
|
||||
@@ -2366,6 +2431,7 @@ void Options::load(bool lightweight)
|
||||
throw Error(msg);
|
||||
}
|
||||
} else {
|
||||
|
||||
#ifdef WIN32
|
||||
WCHAR pathW[MAX_PATH] = {0};
|
||||
|
||||
@@ -2398,9 +2464,14 @@ void Options::load(bool lightweight)
|
||||
rtdir = Glib::build_filename(argv0, "mysettings");
|
||||
}
|
||||
|
||||
// Modify the path of the cache folder to the one provided in RT_CACHE environment variable
|
||||
// Modify the path of the cache folder to the one provided in RT_CACHE environment variable. Build the cache folder name in macOS.
|
||||
#ifdef __APPLE__
|
||||
std::string homecache{homebuf};
|
||||
std::strcat(&homecache[0], "/Application Support/RawTherapee/cache");
|
||||
path = homecache.c_str();
|
||||
#else
|
||||
path = g_getenv("RT_CACHE");
|
||||
|
||||
#endif
|
||||
if (path != nullptr) {
|
||||
cacheBaseDir = Glib::ustring(path);
|
||||
|
||||
@@ -2409,6 +2480,7 @@ void Options::load(bool lightweight)
|
||||
throw Error(msg);
|
||||
}
|
||||
}
|
||||
|
||||
// No environment variable provided, so falling back to the multi user mode, if enabled
|
||||
else if (options.multiUser) {
|
||||
#ifdef WIN32
|
||||
|
Reference in New Issue
Block a user