UI: Split global config into app and user config
This introduces a split of the current single ConfigFile instance for all configuration into two separate instances. The app config instance contains system-wide settings that mainly concern the working of the app itself, whereas the user config instance contains settings actually exposed to the user for the configuration.
This commit is contained in:
parent
26d275223a
commit
2635cf3a2a
35 changed files with 1135 additions and 912 deletions
|
|
@ -147,8 +147,8 @@ std::string GetProgramGUID()
|
|||
/* NOTE: this is an arbitrary random number that we use to count the
|
||||
* number of unique OBS installations and is not associated with any
|
||||
* kind of identifiable information */
|
||||
const char *pguid =
|
||||
config_get_string(GetGlobalConfig(), "General", "InstallGUID");
|
||||
const char *pguid = config_get_string(App()->GetAppConfig(), "General",
|
||||
"InstallGUID");
|
||||
std::string guid;
|
||||
if (pguid)
|
||||
guid = pguid;
|
||||
|
|
@ -157,7 +157,7 @@ std::string GetProgramGUID()
|
|||
GenerateGUID(guid);
|
||||
|
||||
if (!guid.empty())
|
||||
config_set_string(GetGlobalConfig(), "General",
|
||||
config_set_string(App()->GetAppConfig(), "General",
|
||||
"InstallGUID", guid.c_str());
|
||||
}
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ bool FetchAndVerifyFile(const char *name, const char *file, const char *url,
|
|||
uint8_t fileHash[BLAKE2_HASH_LENGTH];
|
||||
bool success;
|
||||
|
||||
BPtr<char> filePath = GetConfigPathPtr(file);
|
||||
BPtr<char> filePath = GetAppConfigPathPtr(file);
|
||||
|
||||
if (!extraHeaders.empty()) {
|
||||
headers.insert(headers.end(), extraHeaders.begin(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue