mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-22 22:50:03 +01:00
[Settings]Add setting and policy to disable Whats new after updates (#30609)
* add scoobe setting * update comment * fix spelling * fix settings layout * fix xaml formatting * fix viewModel * fix settings page * fix general_settings.cpp * Update policy name and description * Update the settings name
This commit is contained in:
@@ -122,6 +122,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
_startup = GeneralSettingsConfig.Startup;
|
||||
_autoDownloadUpdates = GeneralSettingsConfig.AutoDownloadUpdates;
|
||||
_showWhatsNewAfterUpdates = GeneralSettingsConfig.ShowWhatsNewAfterUpdates;
|
||||
_enableExperimentation = GeneralSettingsConfig.EnableExperimentation;
|
||||
|
||||
_isElevated = isElevated;
|
||||
@@ -140,6 +141,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
_experimentationIsGpoDisallowed = GPOWrapper.GetAllowExperimentationValue() == GpoRuleConfigured.Disabled;
|
||||
_autoDownloadUpdatesIsGpoDisabled = GPOWrapper.GetDisableAutomaticUpdateDownloadValue() == GpoRuleConfigured.Enabled;
|
||||
_showWhatsNewAfterUpdatesIsGpoDisabled = GPOWrapper.GetDisableShowWhatsNewAfterUpdatesValue() == GpoRuleConfigured.Enabled;
|
||||
|
||||
if (dispatcherAction != null)
|
||||
{
|
||||
@@ -156,6 +158,8 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
private bool _autoDownloadUpdates;
|
||||
private bool _autoDownloadUpdatesIsGpoDisabled;
|
||||
private bool _showWhatsNewAfterUpdates;
|
||||
private bool _showWhatsNewAfterUpdatesIsGpoDisabled;
|
||||
private bool _enableExperimentation;
|
||||
private bool _experimentationIsGpoDisallowed;
|
||||
|
||||
@@ -329,6 +333,29 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
get => _isAdmin && _autoDownloadUpdatesIsGpoDisabled;
|
||||
}
|
||||
|
||||
public bool ShowWhatsNewAfterUpdates
|
||||
{
|
||||
get
|
||||
{
|
||||
return _showWhatsNewAfterUpdates && !_showWhatsNewAfterUpdatesIsGpoDisabled;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (_showWhatsNewAfterUpdates != value)
|
||||
{
|
||||
_showWhatsNewAfterUpdates = value;
|
||||
GeneralSettingsConfig.ShowWhatsNewAfterUpdates = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShowWhatsNewAfterUpdatesIsGpoDisabled
|
||||
{
|
||||
get => _showWhatsNewAfterUpdatesIsGpoDisabled;
|
||||
}
|
||||
|
||||
public bool EnableExperimentation
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user