mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02: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:
@@ -188,6 +188,16 @@
|
||||
IsOpen="{x:Bind ViewModel.ShowAutoDownloadUpdatesGpoInformation, Mode=OneWay}"
|
||||
IsTabStop="{x:Bind ViewModel.ShowAutoDownloadUpdatesGpoInformation, Mode=OneWay}"
|
||||
Severity="Informational" />
|
||||
|
||||
<tkcontrols:SettingsCard x:Uid="GeneralPage_ToggleSwitch_ShowWhatsNewAfterUpdates" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.ShowWhatsNewAfterUpdatesIsGpoDisabled, Converter={StaticResource BoolNegationConverter}}">
|
||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{Binding Mode=TwoWay, Path=ShowWhatsNewAfterUpdates}" />
|
||||
</tkcontrols:SettingsCard>
|
||||
<InfoBar
|
||||
x:Uid="GPO_IsSettingForced"
|
||||
IsClosable="False"
|
||||
IsOpen="{x:Bind Mode=OneWay, Path=ViewModel.ShowWhatsNewAfterUpdatesIsGpoDisabled}"
|
||||
IsTabStop="{x:Bind Mode=OneWay, Path=ViewModel.ShowWhatsNewAfterUpdatesIsGpoDisabled}"
|
||||
Severity="Informational" />
|
||||
</controls:SettingsGroup>
|
||||
|
||||
<controls:SettingsGroup x:Uid="Admin_Mode">
|
||||
|
||||
@@ -4011,6 +4011,9 @@ Activate by holding the key for the character you want to add an accent to, then
|
||||
<data name="PowerLauncher_TextFontSizeSlider.[using:Microsoft.UI.Xaml.Automation]AutomationProperties.Name" xml:space="preserve">
|
||||
<value>Text size of result titles</value>
|
||||
</data>
|
||||
<data name="GeneralPage_ToggleSwitch_ShowWhatsNewAfterUpdates.Header" xml:space="preserve">
|
||||
<value>Show the release notes after updates</value>
|
||||
</data>
|
||||
<data name="CmdNotFound_Arm64ArchBar.Title" xml:space="preserve">
|
||||
<value>Command Not Found is not supported on the ARM64 architecture currently. We are actively working on a solution.</value>
|
||||
</data>
|
||||
|
||||
@@ -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