From 31c3e27bf5076ddcd5ce319f6ec06538eb9e1658 Mon Sep 17 00:00:00 2001 From: Alex Ibraimov <59023460+alexibraimov@users.noreply.github.com> Date: Fri, 28 Jul 2023 13:47:31 +0600 Subject: [PATCH] Fixed tweak to hide "Learn about this picture" icon on Desktop --- src/SophiApp/Customisations/CustomisationConstants.cs | 2 +- src/SophiApp/Customisations/CustomisationOs.cs | 4 ++-- src/SophiApp/Customisations/CustomisationStatus.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SophiApp/Customisations/CustomisationConstants.cs b/src/SophiApp/Customisations/CustomisationConstants.cs index 81e5e0c4..4ba9536e 100644 --- a/src/SophiApp/Customisations/CustomisationConstants.cs +++ b/src/SophiApp/Customisations/CustomisationConstants.cs @@ -591,7 +591,7 @@ public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow) internal const string DELEGATION_CONSOLE_VALUE = "{00000000-0000-0000-0000-000000000000}"; internal const string DELEGATION_TERMINAL = "DelegationTerminal"; internal const string DESKTOP_ICON_THIS_COMPUTER = "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"; - internal const string LEARN_ABOUT_THIS_PICTURE = "{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"; + internal const string DESKTOP_ICON_LEARN_ABOUT_THIS_PICTURE = "{2cc5ca98-6485-489a-920e-b3e88a6ccce3}"; internal const string DIAG_TRACK_PATH = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Diagnostics\DiagTrack"; internal const byte DIALOG_COMPACT_VALUE = 0; internal const byte DIALOG_DETAILED_VALUE = 1; diff --git a/src/SophiApp/Customisations/CustomisationOs.cs b/src/SophiApp/Customisations/CustomisationOs.cs index e3914e5c..25e618e6 100644 --- a/src/SophiApp/Customisations/CustomisationOs.cs +++ b/src/SophiApp/Customisations/CustomisationOs.cs @@ -573,11 +573,11 @@ public static void _270(bool IsChecked) { if (IsChecked) { - RegHelper.SetValue(RegistryHive.CurrentUser, START_PANEL_EXPLORER_PATH, LEARN_ABOUT_THIS_PICTURE, ENABLED_VALUE, RegistryValueKind.DWord); + RegHelper.DeleteKey(RegistryHive.CurrentUser, START_PANEL_EXPLORER_PATH, DESKTOP_ICON_LEARN_ABOUT_THIS_PICTURE, false); return; } - RegHelper.DeleteKey(RegistryHive.CurrentUser, START_PANEL_EXPLORER_PATH, LEARN_ABOUT_THIS_PICTURE, false); + RegHelper.SetValue(RegistryHive.CurrentUser, START_PANEL_EXPLORER_PATH, DESKTOP_ICON_LEARN_ABOUT_THIS_PICTURE, ENABLED_VALUE, RegistryValueKind.DWord); } public static void _300(bool IsChecked) => RegHelper.SetValue(RegistryHive.CurrentUser, diff --git a/src/SophiApp/Customisations/CustomisationStatus.cs b/src/SophiApp/Customisations/CustomisationStatus.cs index a72cc1ae..f9f902da 100644 --- a/src/SophiApp/Customisations/CustomisationStatus.cs +++ b/src/SophiApp/Customisations/CustomisationStatus.cs @@ -271,7 +271,7 @@ public static bool _269() return showDynamicContent && dynamicSearchBox; } - public static bool _270() => RegHelper.GetNullableIntValue(RegistryHive.CurrentUser, START_PANEL_EXPLORER_PATH, LEARN_ABOUT_THIS_PICTURE) != ENABLED_VALUE; + public static bool _270() => RegHelper.GetNullableIntValue(RegistryHive.CurrentUser, START_PANEL_EXPLORER_PATH, DESKTOP_ICON_LEARN_ABOUT_THIS_PICTURE) != ENABLED_VALUE; public static bool _300() => RegHelper.GetNullableIntValue(RegistryHive.CurrentUser, STORAGE_POLICY_PATH, STORAGE_POLICY_01) .HasNullOrValue(DISABLED_VALUE)