Add option to disable LibRaw in preferences

This commit is contained in:
Lawrence Lee
2023-12-17 15:34:12 -08:00
parent f296991419
commit 2b7889b645
6 changed files with 38 additions and 2 deletions

View File

@@ -591,6 +591,7 @@ void Options::setDefaults()
#else
rtSettings.iccDirectory = "/usr/share/color/icc";
#endif
rtSettings.enableLibRaw = true;
// rtSettings.viewingdevice = 0;
// rtSettings.viewingdevicegrey = 3;
// rtSettings.viewinggreySc = 1;
@@ -1745,6 +1746,14 @@ void Options::readFromFile(Glib::ustring fname)
}
}
const Glib::ustring groupRawDecoder = "Raw Decoder";
if (keyFile.has_group(groupRawDecoder)) {
const Glib::ustring keyEnableLibRaw = "EnableLibRaw";
if (keyFile.has_key(groupRawDecoder, keyEnableLibRaw)) {
rtSettings.enableLibRaw = keyFile.get_boolean(groupRawDecoder, keyEnableLibRaw);
}
}
if (keyFile.has_group("Color Management")) {
if (keyFile.has_key("Color Management", "ICCDirectory")) {
rtSettings.iccDirectory = keyFile.get_string("Color Management", "ICCDirectory");
@@ -2590,6 +2599,8 @@ void Options::saveToFile(Glib::ustring fname)
keyFile.set_integer("Crop Settings", "GuidesMode", cropGuides);
keyFile.set_boolean("Crop Settings", "AutoFit", cropAutoFit);
keyFile.set_boolean("Raw Decoder", "EnableLibRaw", rtSettings.enableLibRaw);
keyFile.set_string("Color Management", "PrinterProfile", rtSettings.printerProfile);
keyFile.set_integer("Color Management", "PrinterIntent", rtSettings.printerIntent);
keyFile.set_boolean("Color Management", "PrinterBPC", rtSettings.printerBPC);