Merge pull request #6536 from Bezierr/ha-profilepath-dev

Relative pathnames to .dcp and .lcp files in .pp3 for interchangeability between Windows and Linux
This commit is contained in:
Lawrence37 2023-04-03 18:38:58 -07:00 committed by GitHub
commit f018d1fec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 161 additions and 19 deletions

View File

@ -5,6 +5,7 @@ Project initiator:
Development contributors, in last name alphabetical order:
Harald Aust
Roel Baars
Richard E Barber
Martin Burri

View File

@ -1824,6 +1824,7 @@ PREFERENCES_CACHECLEAR_SAFETY;Only files in the cache are cleared. Processing pr
PREFERENCES_CACHEMAXENTRIES;Maximum number of cache entries
PREFERENCES_CACHEOPTS;Cache Options
PREFERENCES_CACHETHUMBHEIGHT;Maximum thumbnail height
PREFERENCES_CAMERAPROFILESDIR;Camera profiles directory
PREFERENCES_CHUNKSIZES;Tiles per thread
PREFERENCES_CHUNKSIZE_RAW_AMAZE;AMaZE demosaic
PREFERENCES_CHUNKSIZE_RAW_CA;Raw CA correction
@ -1911,6 +1912,7 @@ PREFERENCES_INTENT_SATURATION;Saturation
PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited
PREFERENCES_LANG;Language
PREFERENCES_LANGAUTODETECT;Use system language
PREFERENCES_LENSPROFILESDIR;Lens profiles directory
PREFERENCES_MAXRECENTFOLDERS;Maximum number of recent folders
PREFERENCES_MENUGROUPEXTPROGS;Group 'Open with'
PREFERENCES_MENUGROUPFILEOPERATIONS;Group 'File operations'

View File

@ -21,6 +21,7 @@
#include <stdlib.h>
#include <glibmm/regex.h>
#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
#include <glibmm/keyfile.h>
@ -220,6 +221,22 @@ bool DynamicProfileRules::loadRules()
try {
rule.profilepath = kf.get_string (group, "profilepath");
#if defined (WIN32)
// if this is Windows, replace any "/" in the path with "\\"
size_t pos = rule.profilepath.find("/");
while (pos != Glib::ustring::npos) {
rule.profilepath.replace(pos, 1, "\\");
pos = rule.profilepath.find("/", pos);
}
#endif
#if !defined (WIN32)
// if this is not Windows, replace any "\\" in the path with "/"
size_t pos = rule.profilepath.find("\\");
while (pos != Glib::ustring::npos) {
rule.profilepath.replace(pos, 1, "/");
pos = rule.profilepath.find("\\", pos);
}
#endif
} catch (Glib::KeyFileError &) {
dynamicRules.pop_back();
}
@ -254,7 +271,14 @@ bool DynamicProfileRules::storeRules()
kf.set_string (group, "profilepath", rule.profilepath);
}
return kf.save_to_file (Glib::build_filename (Options::rtdir, "dynamicprofile.cfg"));
std::string fn = Glib::build_filename (Options::rtdir, "dynamicprofile.cfg");
if (Glib::file_test(fn, Glib::FILE_TEST_IS_SYMLINK)) {
// file is symlink; use target instead
// symlinks apparently are not recognízed on Windows
return kf.save_to_file (g_file_read_link (fn.c_str(), NULL));
} else {
return kf.save_to_file (fn);
}
}
const std::vector<DynamicProfileRule> &DynamicProfileRules::getRules()

View File

@ -65,6 +65,40 @@ Glib::ustring expandRelativePath(const Glib::ustring &procparams_fname, const Gl
return absPath;
}
Glib::ustring expandRelativePath2(const Glib::ustring &procparams_fname, const Glib::ustring &procparams_fname2, const Glib::ustring &prefix, Glib::ustring embedded_fname)
{
#if defined (WIN32)
// if this is Windows, replace any "/" in the filename with "\\"
size_t pos = embedded_fname.find("/");
while (pos != string::npos) {
embedded_fname.replace(pos, 1, "\\");
pos = embedded_fname.find("/", pos);
}
#endif
#if !defined (WIN32)
// if this is not Windows, replace any "\\" in the filename with "/"
size_t pos = embedded_fname.find("\\");
while (pos != string::npos) {
embedded_fname.replace(pos, 1, "/");
pos = embedded_fname.find("\\", pos);
}
#endif
// if embedded_fname is not already an absolute path,
// try to convert it using procparams_fname (the directory of the raw file) as prefix
Glib::ustring rPath = expandRelativePath(procparams_fname, prefix, embedded_fname);
if (rPath.length() >= prefix.length()
&& !Glib::file_test(rPath.substr(prefix.length()), Glib::FILE_TEST_IS_REGULAR)
&& !procparams_fname2.empty()
&& Glib::path_is_absolute(procparams_fname2)) {
// embedded_fname is not a valid path;
// try with procparams_fname2 (the path defined in Preferences) as a prefix
rPath = expandRelativePath(procparams_fname2 + G_DIR_SEPARATOR_S, prefix, embedded_fname);
}
return(rPath);
}
Glib::ustring relativePathIfInside(const Glib::ustring &procparams_fname, bool fnameAbsolute, Glib::ustring embedded_fname)
{
if (fnameAbsolute || embedded_fname.empty() || !Glib::path_is_absolute(procparams_fname)) {
@ -93,6 +127,25 @@ Glib::ustring relativePathIfInside(const Glib::ustring &procparams_fname, bool f
return prefix + embedded_fname.substr(dir1.length());
}
Glib::ustring relativePathIfInside2(const Glib::ustring &procparams_fname, const Glib::ustring &procparams_fname2, bool fnameAbsolute, Glib::ustring embedded_fname)
{
// try to convert embedded_fname to a path relative to procparams_fname
// (the directory of the raw file)
// (note: fnameAbsolute seems to be always true, so this will never return a relative path)
Glib::ustring rPath = relativePathIfInside(procparams_fname, fnameAbsolute, embedded_fname);
if ((Glib::path_is_absolute(rPath)
|| (rPath.length() >= 5 && rPath.substr(0, 5) == "file:" && Glib::path_is_absolute(rPath.substr(5))))
&& !procparams_fname2.empty()
&& Glib::path_is_absolute(procparams_fname2)) {
// if path is not relative to the directory of the raw file,
// try to convert embedded_fname to a path relative to procparams_fname2
// (the path defined in Preferences)
rPath = relativePathIfInside(procparams_fname2 + G_DIR_SEPARATOR_S, false, embedded_fname);
}
return(rPath);
}
void getFromKeyfile(
const Glib::KeyFile& keyfile,
const Glib::ustring& group_name,
@ -6327,7 +6380,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
// Lens profile
saveToKeyfile(!pedited || pedited->lensProf.lcMode, "LensProfile", "LcMode", lensProf.getMethodString(lensProf.lcMode), keyFile);
saveToKeyfile(!pedited || pedited->lensProf.lcpFile, "LensProfile", "LCPFile", relativePathIfInside(fname, fnameAbsolute, lensProf.lcpFile), keyFile);
saveToKeyfile(!pedited || pedited->lensProf.lcpFile, "LensProfile", "LCPFile", relativePathIfInside2(fname, options.rtSettings.lensProfilesPath, fnameAbsolute, lensProf.lcpFile), keyFile);
saveToKeyfile(!pedited || pedited->lensProf.useDist, "LensProfile", "UseDistortion", lensProf.useDist, keyFile);
saveToKeyfile(!pedited || pedited->lensProf.useVign, "LensProfile", "UseVignette", lensProf.useVign, keyFile);
saveToKeyfile(!pedited || pedited->lensProf.useCA, "LensProfile", "UseCA", lensProf.useCA, keyFile);
@ -7147,7 +7200,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->prsharpening.deconviter, "PostResizeSharpening", "DeconvIterations", prsharpening.deconviter, keyFile);
// Color management
saveToKeyfile(!pedited || pedited->icm.inputProfile, "Color Management", "InputProfile", relativePathIfInside(fname, fnameAbsolute, icm.inputProfile), keyFile);
saveToKeyfile(!pedited || pedited->icm.inputProfile, "Color Management", "InputProfile", relativePathIfInside2(fname, options.rtSettings.cameraProfilesPath, fnameAbsolute, icm.inputProfile), keyFile);
saveToKeyfile(!pedited || pedited->icm.toneCurve, "Color Management", "ToneCurve", icm.toneCurve, keyFile);
saveToKeyfile(!pedited || pedited->icm.applyLookTable, "Color Management", "ApplyLookTable", icm.applyLookTable, keyFile);
saveToKeyfile(!pedited || pedited->icm.applyBaselineExposureOffset, "Color Management", "ApplyBaselineExposureOffset", icm.applyBaselineExposureOffset, keyFile);
@ -7520,9 +7573,9 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->colorToning.labregionsShowMask, "ColorToning", "LabRegionsShowMask", colorToning.labregionsShowMask, keyFile);
// Raw
saveToKeyfile(!pedited || pedited->raw.darkFrame, "RAW", "DarkFrame", relativePathIfInside(fname, fnameAbsolute, raw.dark_frame), keyFile);
saveToKeyfile(!pedited || pedited->raw.darkFrame, "RAW", "DarkFrame", relativePathIfInside2(fname, options.rtSettings.darkFramesPath, fnameAbsolute, raw.dark_frame), keyFile);
saveToKeyfile(!pedited || pedited->raw.df_autoselect, "RAW", "DarkFrameAuto", raw.df_autoselect, keyFile);
saveToKeyfile(!pedited || pedited->raw.ff_file, "RAW", "FlatFieldFile", relativePathIfInside(fname, fnameAbsolute, raw.ff_file), keyFile);
saveToKeyfile(!pedited || pedited->raw.ff_file, "RAW", "FlatFieldFile", relativePathIfInside2(fname, options.rtSettings.flatFieldsPath, fnameAbsolute, raw.ff_file), keyFile);
saveToKeyfile(!pedited || pedited->raw.ff_AutoSelect, "RAW", "FlatFieldAutoSelect", raw.ff_AutoSelect, keyFile);
saveToKeyfile(!pedited || pedited->raw.ff_FromMetaData, "RAW", "FlatFieldFromMetaData", raw.ff_FromMetaData, keyFile);
saveToKeyfile(!pedited || pedited->raw.ff_BlurRadius, "RAW", "FlatFieldBlurRadius", raw.ff_BlurRadius, keyFile);
@ -8413,7 +8466,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
}
if (keyFile.has_key("LensProfile", "LCPFile")) {
lensProf.lcpFile = expandRelativePath(fname, "", keyFile.get_string("LensProfile", "LCPFile"));
lensProf.lcpFile = expandRelativePath2(fname, options.rtSettings.lensProfilesPath, "", keyFile.get_string("LensProfile", "LCPFile"));
if (pedited) {
pedited->lensProf.lcpFile = true;
@ -9451,13 +9504,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
if (keyFile.has_group("Color Management")) {
if (keyFile.has_key("Color Management", "InputProfile")) {
icm.inputProfile = expandRelativePath(fname, "file:", keyFile.get_string("Color Management", "InputProfile"));
icm.inputProfile = expandRelativePath2(fname, options.rtSettings.cameraProfilesPath, "file:", keyFile.get_string("Color Management", "InputProfile"));
if (pedited) {
pedited->icm.inputProfile = true;
}
}
}
assignFromKeyfile(keyFile, "Color Management", "ToneCurve", pedited, icm.toneCurve, pedited->icm.toneCurve);
assignFromKeyfile(keyFile, "Color Management", "ApplyLookTable", pedited, icm.applyLookTable, pedited->icm.applyLookTable);
assignFromKeyfile(keyFile, "Color Management", "ApplyBaselineExposureOffset", pedited, icm.applyBaselineExposureOffset, pedited->icm.applyBaselineExposureOffset);
@ -10039,7 +10091,23 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
if (keyFile.has_group("Film Simulation")) {
assignFromKeyfile(keyFile, "Film Simulation", "Enabled", pedited, filmSimulation.enabled, pedited->filmSimulation.enabled);
assignFromKeyfile(keyFile, "Film Simulation", "ClutFilename", pedited, filmSimulation.clutFilename, pedited->filmSimulation.clutFilename);
assignFromKeyfile(keyFile, "Film Simulation", "ClutFilename", pedited, filmSimulation.clutFilename, pedited->filmSimulation.clutFilename);
#if defined (WIN32)
// if this is Windows, replace any "/" in the filename with "\\"
size_t pos = filmSimulation.clutFilename.find("/");
while (pos != string::npos) {
filmSimulation.clutFilename.replace(pos, 1, "\\");
pos = filmSimulation.clutFilename.find("/", pos);
}
#endif
#if !defined (WIN32)
// if this is not Windows, replace any "\\" in the filename with "/"
size_t pos = filmSimulation.clutFilename.find("\\");
while (pos != string::npos) {
filmSimulation.clutFilename.replace(pos, 1, "/");
pos = filmSimulation.clutFilename.find("\\", pos);
}
#endif
if (keyFile.has_key("Film Simulation", "Strength")) {
if (ppVersion < 321) {
@ -10214,23 +10282,20 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
if (keyFile.has_group("RAW")) {
if (keyFile.has_key("RAW", "DarkFrame")) {
raw.dark_frame = expandRelativePath(fname, "", keyFile.get_string("RAW", "DarkFrame"));
raw.dark_frame = expandRelativePath2(fname, options.rtSettings.darkFramesPath, "", keyFile.get_string("RAW", "DarkFrame"));
if (pedited) {
pedited->raw.darkFrame = true;
}
}
assignFromKeyfile(keyFile, "RAW", "DarkFrameAuto", pedited, raw.df_autoselect, pedited->raw.df_autoselect);
if (keyFile.has_key("RAW", "FlatFieldFile")) {
raw.ff_file = expandRelativePath(fname, "", keyFile.get_string("RAW", "FlatFieldFile"));
raw.ff_file = expandRelativePath2(fname, options.rtSettings.flatFieldsPath, "", keyFile.get_string("RAW", "FlatFieldFile"));
if (pedited) {
pedited->raw.ff_file = true;
}
}
assignFromKeyfile(keyFile, "RAW", "FlatFieldAutoSelect", pedited, raw.ff_AutoSelect, pedited->raw.ff_AutoSelect);
assignFromKeyfile(keyFile, "RAW", "FlatFieldFromMetaData", pedited, raw.ff_FromMetaData, pedited->raw.ff_FromMetaData);
assignFromKeyfile(keyFile, "RAW", "FlatFieldBlurRadius", pedited, raw.ff_BlurRadius, pedited->raw.ff_BlurRadius);

View File

@ -48,6 +48,8 @@ public:
bool verbose;
Glib::ustring darkFramesPath; ///< The default directory for dark frames
Glib::ustring flatFieldsPath; ///< The default directory for flat fields
Glib::ustring cameraProfilesPath; ///< The default directory for camera profiles
Glib::ustring lensProfilesPath; ///< The default directory for lens profiles
Glib::ustring adobe; // filename of AdobeRGB1998 profile (default to the bundled one)
Glib::ustring prophoto; // filename of Prophoto profile (default to the bundled one)

View File

@ -570,6 +570,9 @@ void Options::setDefaults()
rtSettings.darkFramesPath = "";
rtSettings.flatFieldsPath = "";
rtSettings.cameraProfilesPath = "";
rtSettings.lensProfilesPath = "";
#ifdef WIN32
const gchar* sysRoot = g_getenv("SystemRoot"); // Returns e.g. "c:\Windows"
@ -651,13 +654,15 @@ void Options::setDefaults()
rtSettings.leveldnliss = 0;
rtSettings.leveldnautsimpl = 0;
// rtSettings.colortoningab =0.7;
//rtSettings.decaction =0.3;
// rtSettings.colortoningab =0.7;
// rtSettings.decaction =0.3;
// rtSettings.ciebadpixgauss=false;
rtSettings.rgbcurveslumamode_gamut = true;
lastIccDir = rtSettings.iccDirectory;
lastDarkframeDir = rtSettings.darkFramesPath;
lastFlatfieldDir = rtSettings.flatFieldsPath;
lastCameraProfilesDir = rtSettings.cameraProfilesPath;
lastLensProfilesDir = rtSettings.lensProfilesPath;
// rtSettings.bw_complementary = true;
// There is no reasonable default for curves. We can still suppose that they will take place
// in a subdirectory of the user's own ProcParams presets, i.e. in a subdirectory
@ -791,6 +796,14 @@ void Options::readFromFile(Glib::ustring fname)
rtSettings.flatFieldsPath = keyFile.get_string("General", "FlatFieldsPath");
}
if (keyFile.has_key("General", "CameraProfilesPath")) {
rtSettings.cameraProfilesPath = keyFile.get_string("General", "CameraProfilesPath");
}
if (keyFile.has_key("General", "LensProfilesPath")) {
rtSettings.lensProfilesPath = keyFile.get_string("General", "LensProfilesPath");
}
if (keyFile.has_key("General", "Verbose")) {
rtSettings.verbose = keyFile.get_boolean("General", "Verbose");
}
@ -2188,6 +2201,8 @@ void Options::readFromFile(Glib::ustring fname)
safeDirGet(keyFile, "Dialogs", "LastIccDir", lastIccDir);
safeDirGet(keyFile, "Dialogs", "LastDarkframeDir", lastDarkframeDir);
safeDirGet(keyFile, "Dialogs", "LastFlatfieldDir", lastFlatfieldDir);
safeDirGet(keyFile, "Dialogs", "LastCameraProfilesDir", lastCameraProfilesDir);
safeDirGet(keyFile, "Dialogs", "LastLensProfilesDir", lastLensProfilesDir);
safeDirGet(keyFile, "Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir);
safeDirGet(keyFile, "Dialogs", "LastLabCurvesDir", lastLabCurvesDir);
safeDirGet(keyFile, "Dialogs", "LastRetinexDir", lastRetinexDir);
@ -2291,6 +2306,8 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_string("General", "Version", RTVERSION);
keyFile.set_string("General", "DarkFramesPath", rtSettings.darkFramesPath);
keyFile.set_string("General", "FlatFieldsPath", rtSettings.flatFieldsPath);
keyFile.set_string("General", "CameraProfilesPath", rtSettings.cameraProfilesPath);
keyFile.set_string("General", "LensProfilesPath", rtSettings.lensProfilesPath);
keyFile.set_boolean("General", "Verbose", rtSettings.verbose);
keyFile.set_integer("General", "Cropsleep", rtSettings.cropsleep);
keyFile.set_double("General", "Reduchigh", rtSettings.reduchigh);
@ -2640,6 +2657,8 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_string("Dialogs", "LastIccDir", lastIccDir);
keyFile.set_string("Dialogs", "LastDarkframeDir", lastDarkframeDir);
keyFile.set_string("Dialogs", "LastFlatfieldDir", lastFlatfieldDir);
keyFile.set_string("Dialogs", "LastCameraProfilesDir", lastCameraProfilesDir);
keyFile.set_string("Dialogs", "LastLensProfilesDir", lastLensProfilesDir);
keyFile.set_string("Dialogs", "LastRgbCurvesDir", lastRgbCurvesDir);
keyFile.set_string("Dialogs", "LastLabCurvesDir", lastLabCurvesDir);
keyFile.set_string("Dialogs", "LastRetinexDir", lastRetinexDir);

View File

@ -450,6 +450,8 @@ public:
Glib::ustring lastIccDir;
Glib::ustring lastDarkframeDir;
Glib::ustring lastFlatfieldDir;
Glib::ustring lastCameraProfilesDir;
Glib::ustring lastLensProfilesDir;
Glib::ustring lastRgbCurvesDir;
Glib::ustring lastLabCurvesDir;
Glib::ustring lastRetinexDir;

View File

@ -609,6 +609,7 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
Gtk::Grid* dirgrid = Gtk::manage(new Gtk::Grid());
setExpandAlignProperties(dirgrid, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
// Dark Frames Dir
Gtk::Label *dfLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_DIRDARKFRAMES") + ":"));
setExpandAlignProperties(dfLab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
darkFrameDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_DIRDARKFRAMES"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
@ -622,7 +623,7 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
dfconn = darkFrameDir->signal_selection_changed().connect ( sigc::mem_fun (*this, &Preferences::darkFrameChanged));
// FLATFIELD
// Flatfield Dir
Gtk::Label *ffLab = Gtk::manage(new Gtk::Label(M("PREFERENCES_FLATFIELDSDIR") + ":"));
setExpandAlignProperties(ffLab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
flatFieldDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_FLATFIELDSDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
@ -648,6 +649,25 @@ Gtk::Widget* Preferences::getImageProcessingPanel ()
dirgrid->attach_next_to(*clutsDir, *clutsDirLabel, Gtk::POS_RIGHT, 1, 1);
dirgrid->attach_next_to(*clutsRestartNeeded, *clutsDir, Gtk::POS_RIGHT, 1, 1);
//Camera Profiles Dir
Gtk::Label *cameraProfilesDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_CAMERAPROFILESDIR") + ":"));
setExpandAlignProperties(cameraProfilesDirLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
cameraProfilesDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_CAMERAPROFILESDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
setExpandAlignProperties(cameraProfilesDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dirgrid->attach_next_to(*cameraProfilesDirLabel, *clutsDirLabel, Gtk::POS_BOTTOM, 1, 1);
dirgrid->attach_next_to(*cameraProfilesDir, *cameraProfilesDirLabel, Gtk::POS_RIGHT, 1, 1);
//Lens Profiles Dir
Gtk::Label *lensProfilesDirLabel = Gtk::manage(new Gtk::Label(M("PREFERENCES_LENSPROFILESDIR") + ":"));
setExpandAlignProperties(lensProfilesDirLabel, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER);
lensProfilesDir = Gtk::manage(new MyFileChooserButton(M("PREFERENCES_LENSPROFILESDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
setExpandAlignProperties(lensProfilesDir, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER);
dirgrid->attach_next_to(*lensProfilesDirLabel, *cameraProfilesDirLabel, Gtk::POS_BOTTOM, 1, 1);
dirgrid->attach_next_to(*lensProfilesDir, *lensProfilesDirLabel, Gtk::POS_RIGHT, 1, 1);
//Pack directories to Image Processing panel
cdf->add(*dirgrid);
vbImageProcessing->pack_start (*cdf, Gtk::PACK_SHRINK, 4 );
@ -1847,8 +1867,9 @@ void Preferences::storePreferences()
moptions.rtSettings.darkFramesPath = darkFrameDir->get_filename();
moptions.rtSettings.flatFieldsPath = flatFieldDir->get_filename();
moptions.clutsDir = clutsDir->get_filename();
moptions.rtSettings.cameraProfilesPath = cameraProfilesDir->get_filename();
moptions.rtSettings.lensProfilesPath = lensProfilesDir->get_filename();
moptions.baBehav.resize(ADDSET_PARAM_NUM);
@ -2105,6 +2126,10 @@ void Preferences::fillPreferences()
flatFieldChanged();
clutsDir->set_current_folder(moptions.clutsDir);
cameraProfilesDir->set_current_folder(moptions.rtSettings.cameraProfilesPath);
lensProfilesDir->set_current_folder(moptions.rtSettings.lensProfilesPath);
addc.block(true);
setc.block(true);

View File

@ -115,6 +115,8 @@ class Preferences final :
MyFileChooserButton* darkFrameDir;
MyFileChooserButton* flatFieldDir;
MyFileChooserButton* clutsDir;
MyFileChooserButton* cameraProfilesDir;
MyFileChooserButton* lensProfilesDir;
Gtk::Label *dfLabel;
Gtk::Label *ffLabel;