From 6f7ca3f5ec4ca89a6c10b03a2256541bf694c447 Mon Sep 17 00:00:00 2001 From: Alberto Griggio Date: Sun, 17 Sep 2017 16:45:54 +0200 Subject: [PATCH] one more fix for locating the lensfun db in bundle mode --- rtgui/main-cli.cc | 7 +++---- rtgui/main.cc | 7 +++---- rtgui/options.cc | 5 +---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/rtgui/main-cli.cc b/rtgui/main-cli.cc index 67ec895aa..54f536f3a 100644 --- a/rtgui/main-cli.cc +++ b/rtgui/main-cli.cc @@ -59,7 +59,6 @@ Glib::ustring argv0; Glib::ustring creditsPath; Glib::ustring licensePath; Glib::ustring argv1; -Glib::ustring lensfunDbPath; //bool simpleEditor; //Glib::Threads::Thread* mainThread; @@ -147,16 +146,16 @@ int main (int argc, char **argv) } if (Glib::path_is_absolute(LENSFUN_DB_PATH)) { - lensfunDbPath = LENSFUN_DB_PATH; + options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; } else { - lensfunDbPath = Glib::build_filename(exePath, LENSFUN_DB_PATH); + options.rtSettings.lensfunDbDirectory = Glib::build_filename(exePath, LENSFUN_DB_PATH); } #else argv0 = DATA_SEARCH_PATH; creditsPath = CREDITS_SEARCH_PATH; licensePath = LICENCE_SEARCH_PATH; - lensfunDbPath = LENSFUN_DB_PATH; + options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; #endif bool quickstart = dontLoadCache (argc, argv); diff --git a/rtgui/main.cc b/rtgui/main.cc index 9adca05d4..ce212daf2 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -60,7 +60,6 @@ extern Options options; Glib::ustring argv0; Glib::ustring creditsPath; Glib::ustring licensePath; -Glib::ustring lensfunDbPath; Glib::ustring argv1; Glib::ustring argv2; bool simpleEditor = false; @@ -531,16 +530,16 @@ int main (int argc, char **argv) } if (Glib::path_is_absolute (LENSFUN_DB_PATH)) { - lensfunDbPath = LENSFUN_DB_PATH; + options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; } else { - lensfunDbPath = Glib::build_filename (exePath, LENSFUN_DB_PATH); + options.rtSettings.lensfunDbDirectory = Glib::build_filename (exePath, LENSFUN_DB_PATH); } #else argv0 = DATA_SEARCH_PATH; creditsPath = CREDITS_SEARCH_PATH; licensePath = LICENCE_SEARCH_PATH; - lensfunDbPath = LENSFUN_DB_PATH; + options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; #endif diff --git a/rtgui/options.cc b/rtgui/options.cc index fb84082f0..38be51931 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -49,8 +49,6 @@ Options options; Glib::ustring versionString = RTVERSION; Glib::ustring paramFileExtension = ".pp3"; -extern Glib::ustring lensfunDbPath; // defined in main - Options::Options () { @@ -729,8 +727,7 @@ void Options::setDefaults () lastLensProfileDir = ""; gimpPluginShowInfoDialog = true; maxRecentFolders = 15; - - rtSettings.lensfunDbDirectory = lensfunDbPath; + rtSettings.lensfunDbDirectory = ""; // set also in main.cc and main-cli.cc } Options* Options::copyFrom (Options* other)