mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[QuickAccent] Rename PowerAccent to Quick Accent (#20176)
* Rename PowerAccent to Keyboard Accent * Fix bug report and translation issue templates * Rename to Quick Accent * missing mention
This commit is contained in:
@@ -12,7 +12,7 @@ using System.Text.Json;
|
||||
|
||||
public class SettingsService
|
||||
{
|
||||
private const string PowerAccentModuleName = "PowerAccent";
|
||||
private const string PowerAccentModuleName = "QuickAccent";
|
||||
private readonly ISettingsUtils _settingsUtils;
|
||||
private readonly IFileSystemWatcher _watcher;
|
||||
private readonly object _loadingSettingsLock = new object();
|
||||
@@ -34,7 +34,7 @@ public class SettingsService
|
||||
{
|
||||
if (!_settingsUtils.SettingsExists(PowerAccentModuleName))
|
||||
{
|
||||
Logger.LogInfo("PowerAccent settings.json was missing, creating a new one");
|
||||
Logger.LogInfo("QuickAccent settings.json was missing, creating a new one");
|
||||
var defaultSettings = new PowerAccentSettings();
|
||||
var options = new JsonSerializerOptions
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace PowerAccent.Core.Tools
|
||||
public static class Logger
|
||||
{
|
||||
private static readonly IFileSystem _fileSystem = new FileSystem();
|
||||
private static readonly string ApplicationLogPath = Path.Combine(Constants.AppDataPath(), "PowerAccent\\Logs");
|
||||
private static readonly string ApplicationLogPath = Path.Combine(Constants.AppDataPath(), "QuickAccent\\Logs");
|
||||
|
||||
static Logger()
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PowerAccent.UI
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
const string appName = "PowerAccent";
|
||||
const string appName = "QuickAccent";
|
||||
bool createdNew;
|
||||
|
||||
_mutex = new Mutex(true, appName, out createdNew);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace PowerAccent;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
private const string PROGRAM_NAME = "PowerAccent";
|
||||
private const string PROGRAM_NAME = "QuickAccent";
|
||||
private const string PROGRAM_APP_NAME = "PowerToys.PowerAccent";
|
||||
private static App _application;
|
||||
private static int _powerToysRunnerPid;
|
||||
@@ -40,7 +40,7 @@ internal static class Program
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogWarning("Another running PowerAccent instance was detected. Exiting PowerAccent");
|
||||
Logger.LogWarning("Another running QuickAccent instance was detected. Exiting QuickAccent");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,11 +65,11 @@ internal static class Program
|
||||
{
|
||||
_ = int.TryParse(args[0], out _powerToysRunnerPid);
|
||||
|
||||
Logger.LogInfo($"PowerAccent started from the PowerToys Runner. Runner pid={_powerToysRunnerPid}");
|
||||
Logger.LogInfo($"QuickAccent started from the PowerToys Runner. Runner pid={_powerToysRunnerPid}");
|
||||
|
||||
RunnerHelper.WaitForPowerToysRunner(_powerToysRunnerPid, () =>
|
||||
{
|
||||
Logger.LogInfo("PowerToys Runner exited. Exiting PowerAccent");
|
||||
Logger.LogInfo("PowerToys Runner exited. Exiting QuickAccent");
|
||||
Terminate();
|
||||
});
|
||||
}
|
||||
@@ -80,7 +80,7 @@ internal static class Program
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.LogInfo($"PowerAccent started detached from PowerToys Runner.");
|
||||
Logger.LogInfo($"QuickAccent started detached from PowerToys Runner.");
|
||||
_powerToysRunnerPid = -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
namespace PowerAccentConstants
|
||||
{
|
||||
// Name of the powertoy module.
|
||||
inline const std::wstring ModuleKey = L"PowerAccent";
|
||||
inline const std::wstring ModuleKey = L"QuickAccent";
|
||||
}
|
||||
@@ -88,7 +88,7 @@ END
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_POWERACCENT_NAME "PowerAccent"
|
||||
IDS_POWERACCENT_NAME "QuickAccent"
|
||||
END
|
||||
|
||||
#endif // English (United States) resources
|
||||
|
||||
@@ -35,8 +35,8 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
const static wchar_t* MODULE_NAME = L"PowerAccent";
|
||||
const static wchar_t* MODULE_DESC = L"A module that keeps your computer PowerAccent on-demand.";
|
||||
const static wchar_t* MODULE_NAME = L"QuickAccent";
|
||||
const static wchar_t* MODULE_DESC = L"A module that keeps your computer QuickAccent on-demand.";
|
||||
|
||||
class PowerAccent : public PowertoyModuleIface
|
||||
{
|
||||
@@ -55,20 +55,20 @@ private:
|
||||
|
||||
void launch_process()
|
||||
{
|
||||
Logger::trace(L"Launching PowerToys PowerAccent process");
|
||||
Logger::trace(L"Launching PowerToys QuickAccent process");
|
||||
unsigned long powertoys_pid = GetCurrentProcessId();
|
||||
|
||||
std::wstring executable_args = L"" + std::to_wstring(powertoys_pid);
|
||||
std::wstring application_path = L"modules\\PowerAccent\\PowerToys.PowerAccent.exe";
|
||||
std::wstring full_command_path = application_path + L" " + executable_args.data();
|
||||
Logger::trace(L"PowerToys PowerAccent launching: " + full_command_path);
|
||||
Logger::trace(L"PowerToys QuickAccent launching: " + full_command_path);
|
||||
|
||||
STARTUPINFO info = { sizeof(info) };
|
||||
|
||||
if (!CreateProcess(application_path.c_str(), full_command_path.data(), NULL, NULL, true, NULL, NULL, NULL, &info, &p_info))
|
||||
{
|
||||
DWORD error = GetLastError();
|
||||
std::wstring message = L"PowerToys PowerAccent failed to start with error: ";
|
||||
std::wstring message = L"PowerToys QuickAccent failed to start with error: ";
|
||||
message += std::to_wstring(error);
|
||||
Logger::error(message);
|
||||
}
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
{
|
||||
app_name = MODULE_NAME;
|
||||
app_key = PowerAccentConstants::ModuleKey;
|
||||
LoggerHelpers::init_logger(app_key, L"ModuleInterface", "PowerAccent");
|
||||
LoggerHelpers::init_logger(app_key, L"ModuleInterface", "QuickAccent");
|
||||
Logger::info("Launcher object is constructing");
|
||||
};
|
||||
|
||||
@@ -138,20 +138,20 @@ public:
|
||||
{
|
||||
if (m_enabled)
|
||||
{
|
||||
Logger::trace(L"Disabling PowerAccent... {}", m_enabled);
|
||||
Logger::trace(L"Disabling QuickAccent... {}", m_enabled);
|
||||
ResetEvent(m_hInvokeEvent);
|
||||
|
||||
auto exitEvent = CreateEvent(nullptr, false, false, CommonSharedConstants::POWERACCENT_EXIT_EVENT);
|
||||
if (!exitEvent)
|
||||
{
|
||||
Logger::warn(L"Failed to create exit event for PowerToys PowerAccent. {}", get_last_error_or_default(GetLastError()));
|
||||
Logger::warn(L"Failed to create exit event for PowerToys QuickAccent. {}", get_last_error_or_default(GetLastError()));
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::trace(L"Signaled exit event for PowerToys PowerAccent.");
|
||||
Logger::trace(L"Signaled exit event for PowerToys QuickAccent.");
|
||||
if (!SetEvent(exitEvent))
|
||||
{
|
||||
Logger::warn(L"Failed to signal exit event for PowerToys PowerAccent. {}", get_last_error_or_default(GetLastError()));
|
||||
Logger::warn(L"Failed to signal exit event for PowerToys QuickAccent. {}", get_last_error_or_default(GetLastError()));
|
||||
|
||||
// For some reason, we couldn't process the signal correctly, so we still
|
||||
// need to terminate the PowerAccent process.
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
//////////////////////////////
|
||||
// Non-localizable
|
||||
|
||||
#define FILE_DESCRIPTION "PowerToys PowerAccent Module"
|
||||
#define FILE_DESCRIPTION "PowerToys QuickAccent Module"
|
||||
#define INTERNAL_NAME "PowerToys.PowerAccentModuleInterface"
|
||||
#define ORIGINAL_FILENAME "PowerToys.PowerAccentModuleInterface.dll"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user