[File locksmith]Add setting to show only in extended context menu (#26711)

* [File Locksmith] Move File Locksmith "What's using this file?" into the extended context menu

* [File Locksmith] Add FileLocksmithExt to directory background context menu

* [File Locksmith]
* Directory background right click crash fixed.
*Settings added.

* [File Locksmith] Remove uncessary things.

* [File Locksmith] Spell check correction
This commit is contained in:
gokcekantarci
2023-06-14 12:06:44 +03:00
committed by GitHub
parent a780e6ae72
commit 293b06d083
13 changed files with 273 additions and 11 deletions

View File

@@ -30,6 +30,7 @@ void FileLocksmithSettings::Save()
json::JsonObject jsonData;
jsonData.SetNamedValue(constants::nonlocalizable::JsonKeyEnabled, json::value(settings.enabled));
jsonData.SetNamedValue(constants::nonlocalizable::JsonKeyShowInExtendedContextMenu, json::value(settings.showInExtendedContextMenu));
json::to_file(jsonFilePath, jsonData);
GetSystemTimeAsFileTime(&lastLoadedTime);
@@ -70,6 +71,11 @@ void FileLocksmithSettings::ParseJson()
{
settings.enabled = jsonSettings.GetNamedBoolean(constants::nonlocalizable::JsonKeyEnabled);
}
if (json::has(jsonSettings, constants::nonlocalizable::JsonKeyShowInExtendedContextMenu, json::JsonValueType::Boolean))
{
settings.showInExtendedContextMenu = jsonSettings.GetNamedBoolean(constants::nonlocalizable::JsonKeyShowInExtendedContextMenu);
}
}
catch (const winrt::hresult_error&)
{