From da550a4a6744e0f197fdc88cb96d47205c1855e0 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Sun, 3 May 2020 15:54:23 -0700 Subject: [PATCH] Moving launcher save settings under AppData/Local/Microsoft/PowerToys/Run --- .../PowerLauncherSettings.cs | 2 +- .../Microsoft.Launcher/Microsoft.Launcher.rc | 23 ++++++++++--------- .../launcher/PowerLauncher/SettingsWatcher.cs | 4 ++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/PowerLauncherSettings.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/PowerLauncherSettings.cs index fc841e928..8fe0e4cf1 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/PowerLauncherSettings.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/PowerLauncherSettings.cs @@ -8,7 +8,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib { public class PowerLauncherSettings : BasePTModuleSettings { - public const string POWERTOYNAME = "Launcher"; + public const string POWERTOYNAME = "Run"; public PowerLauncherProperties properties { get; set; } diff --git a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.rc b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.rc index ceb12a24d..7e9f4c4be 100644 --- a/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.rc +++ b/src/modules/launcher/Microsoft.Launcher/Microsoft.Launcher.rc @@ -1,14 +1,15 @@ ÿþ#include "resource.h" +#include "../../../common/version.h" STRINGTABLE BEGIN - IDS_LAUNCHER_NAME L"Launcher" + IDS_LAUNCHER_NAME L"Run" IDS_LAUNCHER_SETTINGS_DESC L"<No description>" END 1 VERSIONINFO - FILEVERSION 0,1,0,0 - PRODUCTVERSION 0,1,0,0 + FILEVERSION FILE_VERSION + PRODUCTVERSION PRODUCT_VERSION FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -23,14 +24,14 @@ BEGIN BLOCK "040904b0" BEGIN - VALUE "CompanyName", "Company Name" - VALUE "FileDescription", "Wox.Launcher Module" - VALUE "FileVersion", "0.1.0.0" - VALUE "InternalName", "Wox.Launcher" - VALUE "LegalCopyright", "Copyright (C) 2019 Company Name" - VALUE "OriginalFilename", "Wox.Launcher.dll" - VALUE "ProductName", "Wox.Launcher" - VALUE "ProductVersion", "0.1.0.0" + VALUE "CompanyName", COMPANY_NAME + VALUE "FileDescription", "Microsoft.Launcher Module" + VALUE "FileVersion", FILE_VERSION_STRING + VALUE "InternalName", "Microsoft.Launcher" + VALUE "LegalCopyright", COPYRIGHT_NOTE + VALUE "OriginalFilename", "Microsoft.Launcher.dll" + VALUE "ProductName", "Microsoft.Launcher" + VALUE "ProductVersion", PRODUCT_VERSION_STRING END END BLOCK "VarFileInfo" diff --git a/src/modules/launcher/PowerLauncher/SettingsWatcher.cs b/src/modules/launcher/PowerLauncher/SettingsWatcher.cs index 11f1c8a5c..a583fffe1 100644 --- a/src/modules/launcher/PowerLauncher/SettingsWatcher.cs +++ b/src/modules/launcher/PowerLauncher/SettingsWatcher.cs @@ -27,7 +27,7 @@ namespace PowerLauncher // Set up watcher try { - _watcher = Helper.GetFileWatcher("Launcher", "settings.json", OverloadSettings); + _watcher = Helper.GetFileWatcher(PowerLauncherSettings.POWERTOYNAME, "settings.json", OverloadSettings); } catch (Exception e) { @@ -47,7 +47,7 @@ namespace PowerLauncher retry = false; try { - var overloadSettings = SettingsUtils.GetSettings("Launcher"); + var overloadSettings = SettingsUtils.GetSettings(PowerLauncherSettings.POWERTOYNAME); var openPowerlauncher = ConvertHotkey(overloadSettings.properties.open_powerlauncher); if (_settings.Hotkey != openPowerlauncher)