mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
disable apps for shortcut guide (#10123)
This commit is contained in:
committed by
GitHub
parent
6561290bde
commit
bc28a3f5e3
@@ -13,6 +13,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
OverlayOpacity = new IntProperty(90);
|
||||
PressTime = new IntProperty(900);
|
||||
Theme = new StringProperty("system");
|
||||
DisabledApps = new StringProperty();
|
||||
}
|
||||
|
||||
[JsonPropertyName("overlay_opacity")]
|
||||
@@ -23,5 +24,8 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
||||
|
||||
[JsonPropertyName("theme")]
|
||||
public StringProperty Theme { get; set; }
|
||||
|
||||
[JsonPropertyName("disabled_apps")]
|
||||
public StringProperty DisabledApps { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
private Func<string, int> SendConfigMSG { get; }
|
||||
|
||||
private string _settingsConfigFileFolder = string.Empty;
|
||||
private string _disabledApps;
|
||||
|
||||
public ShortcutGuideViewModel(ISettingsRepository<GeneralSettings> settingsRepository, ISettingsRepository<ShortcutGuideSettings> moduleSettingsRepository, Func<string, int> ipcMSGCallBackFunc, string configFileSubfolder = "")
|
||||
{
|
||||
@@ -49,6 +50,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
_isEnabled = GeneralSettingsConfig.Enabled.ShortcutGuide;
|
||||
_pressTime = Settings.Properties.PressTime.Value;
|
||||
_opacity = Settings.Properties.OverlayOpacity.Value;
|
||||
_disabledApps = Settings.Properties.DisabledApps.Value;
|
||||
|
||||
string theme = Settings.Properties.Theme.Value;
|
||||
|
||||
@@ -170,6 +172,24 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public string DisabledApps
|
||||
{
|
||||
get
|
||||
{
|
||||
return _disabledApps;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _disabledApps)
|
||||
{
|
||||
_disabledApps = value;
|
||||
Settings.Properties.DisabledApps.Value = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string GetSettingsSubPath()
|
||||
{
|
||||
return _settingsConfigFileFolder + "\\" + ModuleName;
|
||||
|
||||
Reference in New Issue
Block a user