lensfun: added possibility to use a private copy of the LF database
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "addsetids.h"
|
||||
#include "guiutils.h"
|
||||
#include "version.h"
|
||||
#include "config.h"
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include <omp.h>
|
||||
@@ -727,6 +728,8 @@ void Options::setDefaults ()
|
||||
lastLensProfileDir = "";
|
||||
gimpPluginShowInfoDialog = true;
|
||||
maxRecentFolders = 15;
|
||||
|
||||
rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH;
|
||||
}
|
||||
|
||||
Options* Options::copyFrom (Options* other)
|
||||
@@ -1868,6 +1871,12 @@ void Options::readFromFile (Glib::ustring fname)
|
||||
}
|
||||
}
|
||||
|
||||
if (keyFile.has_group ("Lensfun")) {
|
||||
if (keyFile.has_key ("Lensfun", "DBDirectory")) {
|
||||
rtSettings.lensfunDbDirectory = keyFile.get_string ("Lensfun", "DBDirectory");
|
||||
}
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------------------
|
||||
|
||||
filterOutParsedExtensions ();
|
||||
@@ -2239,6 +2248,8 @@ void Options::saveToFile (Glib::ustring fname)
|
||||
keyFile.set_string ("Dialogs", "LastLensProfileDir", lastLensProfileDir);
|
||||
keyFile.set_boolean ("Dialogs", "GimpPluginShowInfoDialog", gimpPluginShowInfoDialog);
|
||||
|
||||
keyFile.set_string ("Lensfun", "DBDirectory", rtSettings.lensfunDbDirectory);
|
||||
|
||||
keyData = keyFile.to_data ();
|
||||
|
||||
} catch (Glib::KeyFileError &e) {
|
||||
|
Reference in New Issue
Block a user