[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,20 @@
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.IsEnabledGpoConfigured}"
Severity="Informational" />
<controls:SettingsGroup
x:Uid="FileLocksmith_ShellIntegration"
IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.IsFileLocksmithEnabled}">
<labs:SettingsExpander
x:Uid="FileLocksmith_Toggle_ContextMenu"
IsExpanded="True">
<ComboBox
MinWidth="{StaticResource SettingActionControlMinWidth}"
SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.EnabledOnContextExtendedMenu, Converter={StaticResource BoolToComboBoxIndexConverter}}">
<ComboBoxItem x:Uid="FileLocksmith_Toggle_StandardContextMenu" />
<ComboBoxItem x:Uid="FileLocksmith_Toggle_ExtendedContextMenu" />
</ComboBox>
</labs:SettingsExpander>
</controls:SettingsGroup>
</StackPanel>
</controls:SettingsPageControl.ModuleContent>
<controls:SettingsPageControl.PrimaryLinks>

View File

@@ -16,7 +16,7 @@ namespace Microsoft.PowerToys.Settings.UI.Views
public FileLocksmithPage()
{
var settingsUtils = new SettingsUtils();
ViewModel = new FileLocksmithViewModel(SettingsRepository<GeneralSettings>.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage);
ViewModel = new FileLocksmithViewModel(settingsUtils, SettingsRepository<GeneralSettings>.GetInstance(settingsUtils), ShellPage.SendDefaultIPCMessage);
DataContext = ViewModel;
InitializeComponent();
}