Skip to content

Commit

Permalink
[QuickAccent] Rename PowerAccent to Quick Accent (#20176)
Browse files Browse the repository at this point in the history
* Rename PowerAccent to Keyboard Accent

* Fix bug report and translation issue templates

* Rename to Quick Accent

* missing mention
  • Loading branch information
jaimecbernardo committed Aug 31, 2022
1 parent 7e291fb commit 9b3e850
Show file tree
Hide file tree
Showing 24 changed files with 97 additions and 97 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Expand Up @@ -46,16 +46,16 @@ body:
- PDF Thumbnail
- G-code Preview
- G-code Thumbnail
- PowerAccent
- TextExtractor
- PowerRename
- PowerToys Run
- Quick Accent
- Screen ruler
- Shortcut Guide
- STL Thumbnail
- SVG Preview
- SVG Thumbnail
- Settings
- TextExtractor
- Video Conference Mute
- Welcome / PowerToys Tour window
- System tray interaction
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/translation_issue.yml
Expand Up @@ -37,7 +37,7 @@ body:
- PDF Thumbnail
- G-code Preview
- G-code Thumbnail
- PowerAccent
- Quick Accent
- PowerRename
- PowerToys Run
- Screen Ruler
Expand Down
2 changes: 1 addition & 1 deletion COMMUNITY.md
Expand Up @@ -13,7 +13,7 @@ Aaron has helped triaging, discussing, and creating a substantial number of issu
CleanCodeDeveloper helped do massive amounts of code stability and image resizer work.

### [@damienleroy](https://github.com/damienleroy) - [Damien Leroy](https://www.linkedin.com/in/Damien-Leroy-b2734416a/)
Damien has helped out by developing and contributing the Keyboard Accent utility.
Damien has helped out by developing and contributing the Quick Accent utility.

### [@davidegiacometti](https://github.com/davidegiacometti) - [Davide Giacometti](https://www.linkedin.com/in/davidegiacometti/)
Davide has helped fix multiple bugs, added new features, as well as help us with the ARM64 effort by porting applications to .NET Core.
Expand Down
2 changes: 1 addition & 1 deletion src/common/logger/logger_settings.h
Expand Up @@ -18,7 +18,7 @@ struct LogSettings
inline const static std::string launcherLoggerName = "launcher";
inline const static std::wstring launcherLogPath = L"LogsModuleInterface\\launcher-log.txt";
inline const static std::wstring awakeLogPath = L"Logs\\awake-log.txt";
inline const static std::wstring powerAccentLogPath = L"poweraccent.log";
inline const static std::wstring powerAccentLogPath = L"quick-accent-log.txt";
inline const static std::string fancyZonesLoggerName = "fancyzones";
inline const static std::wstring fancyZonesLogPath = L"fancyzones-log.txt";
inline const static std::wstring fancyZonesOldLogPath = L"FancyZonesLogs\\"; // needed to clean up old logs
Expand Down
Expand Up @@ -12,7 +12,7 @@ namespace PowerAccent.Core.Services;

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();
Expand All @@ -34,7 +34,7 @@ private void ReadSettings()
{
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
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/poweraccent/PowerAccent.Core/Tools/Logger.cs
Expand Up @@ -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()
{
Expand Down
2 changes: 1 addition & 1 deletion src/modules/poweraccent/PowerAccent.UI/App.xaml.cs
Expand Up @@ -16,7 +16,7 @@ public partial class App : Application

protected override void OnStartup(StartupEventArgs e)
{
const string appName = "PowerAccent";
const string appName = "QuickAccent";
bool createdNew;

_mutex = new Mutex(true, appName, out createdNew);
Expand Down
10 changes: 5 additions & 5 deletions src/modules/poweraccent/PowerAccent/Program.cs
Expand Up @@ -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;
Expand All @@ -40,7 +40,7 @@ public static void Main(string[] args)
}
else
{
Logger.LogWarning("Another running PowerAccent instance was detected. Exiting PowerAccent");
Logger.LogWarning("Another running QuickAccent instance was detected. Exiting QuickAccent");
}
}

Expand All @@ -65,11 +65,11 @@ private static void Arguments(string[] args)
{
_ = 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();
});
}
Expand All @@ -80,7 +80,7 @@ private static void Arguments(string[] args)
}
else
{
Logger.LogInfo($"PowerAccent started detached from PowerToys Runner.");
Logger.LogInfo($"QuickAccent started detached from PowerToys Runner.");
_powerToysRunnerPid = -1;
}
}
Expand Down
Expand Up @@ -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";
}
Expand Up @@ -88,7 +88,7 @@ END

STRINGTABLE
BEGIN
IDS_POWERACCENT_NAME "PowerAccent"
IDS_POWERACCENT_NAME "QuickAccent"
END

#endif // English (United States) resources
Expand Down
20 changes: 10 additions & 10 deletions src/modules/poweraccent/PowerAccentModuleInterface/dllmain.cpp
Expand Up @@ -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
{
Expand All @@ -55,20 +55,20 @@ class PowerAccent : public PowertoyModuleIface

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);
}
Expand All @@ -79,7 +79,7 @@ class PowerAccent : public PowertoyModuleIface
{
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");
};

Expand Down Expand Up @@ -138,20 +138,20 @@ class PowerAccent : public PowertoyModuleIface
{
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.
Expand Down
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion src/settings-ui/Settings.UI.Library/EnabledModules.cs
Expand Up @@ -241,7 +241,7 @@ public bool MousePointerCrosshairs

private bool powerAccent;

[JsonPropertyName("PowerAccent")]
[JsonPropertyName("QuickAccent")]
public bool PowerAccent
{
get => powerAccent;
Expand Down
2 changes: 1 addition & 1 deletion src/settings-ui/Settings.UI.Library/PowerAccentSettings.cs
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
{
public class PowerAccentSettings : BasePTModuleSettings, ISettingsConfig
{
public const string ModuleName = "PowerAccent";
public const string ModuleName = "QuickAccent";
public const string ModuleVersion = "0.0.1";

[JsonPropertyName("properties")]
Expand Down
Expand Up @@ -9,7 +9,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
{
public class SndPowerAccentSettings
{
[JsonPropertyName("PowerAccent")]
[JsonPropertyName("QuickAccent")]
public PowerAccentSettings PowerAccentSettings { get; set; }

public SndPowerAccentSettings()
Expand Down
2 changes: 1 addition & 1 deletion src/settings-ui/Settings.UI/App.xaml.cs
Expand Up @@ -122,7 +122,7 @@ protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs ar
case "ImageResizer": StartupPage = typeof(Views.ImageResizerPage); break;
case "KBM": StartupPage = typeof(Views.KeyboardManagerPage); break;
case "MouseUtils": StartupPage = typeof(Views.MouseUtilsPage); break;
case "PowerAccent": StartupPage = typeof(Views.PowerAccentPage); break;
case "QuickAccent": StartupPage = typeof(Views.PowerAccentPage); break;
case "TextExtractor": StartupPage = typeof(Views.PowerOcrPage); break;
case "PowerRename": StartupPage = typeof(Views.PowerRenamePage); break;
case "FileExplorer": StartupPage = typeof(Views.PowerPreviewPage); break;
Expand Down
2 changes: 1 addition & 1 deletion src/settings-ui/Settings.UI/OOBE/Enums/PowerToysModules.cs
Expand Up @@ -15,7 +15,7 @@ public enum PowerToysModules
ImageResizer,
KBM,
MouseUtils,
PowerAccent,
QuickAccent,
TextExtractor,
PowerRename,
Run,
Expand Down
8 changes: 4 additions & 4 deletions src/settings-ui/Settings.UI/OOBE/Views/OobePowerAccent.xaml
Expand Up @@ -8,22 +8,22 @@
xmlns:controls="using:Microsoft.PowerToys.Settings.UI.Controls"
xmlns:toolkitcontrols="using:CommunityToolkit.WinUI.UI.Controls">

<controls:OOBEPageControl x:Uid="Oobe_PowerAccent"
<controls:OOBEPageControl x:Uid="Oobe_QuickAccent"
HeroImage="ms-appx:///Assets/Modules/OOBE/PowerAccent.gif">

<controls:OOBEPageControl.PageContent>
<StackPanel Orientation="Vertical">
<TextBlock x:Uid="Oobe_HowToUse"
Style="{ThemeResource OobeSubtitleStyle}" />

<toolkitcontrols:MarkdownTextBlock Background="Transparent" x:Uid="Oobe_PowerAccent_HowToUse" />
<toolkitcontrols:MarkdownTextBlock Background="Transparent" x:Uid="Oobe_QuickAccent_HowToUse" />

<StackPanel Orientation="Horizontal" Spacing="12" Margin="0,24,0,0">
<Button x:Uid="OOBE_Settings"
Click="SettingsLaunchButton_Click"/>
<HyperlinkButton NavigateUri="https://github.com/damienleroy/PowerAccent/"
<HyperlinkButton NavigateUri="https://aka.ms/PowerToysOverview_QuickAccent"
Style="{StaticResource TextButtonStyle}">
<TextBlock x:Uid="LearnMore_PowerAccent"
<TextBlock x:Uid="LearnMore_QuickAccent"
TextWrapping="Wrap" />
</HyperlinkButton>
</StackPanel>
Expand Down
Expand Up @@ -17,7 +17,7 @@ public sealed partial class OobePowerAccent : Page
public OobePowerAccent()
{
InitializeComponent();
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModules.PowerAccent]);
ViewModel = new OobePowerToysModule(OobeShellPage.OobeShellHandler.Modules[(int)PowerToysModules.QuickAccent]);
DataContext = ViewModel;
}

Expand Down
2 changes: 1 addition & 1 deletion src/settings-ui/Settings.UI/OOBE/Views/OobeShellPage.xaml
Expand Up @@ -97,7 +97,7 @@
ShowAsMonochrome="False" />
</muxc:NavigationViewItem.Icon>
</muxc:NavigationViewItem>
<muxc:NavigationViewItem x:Uid="Shell_PowerAccent" Tag="PowerAccent">
<muxc:NavigationViewItem x:Uid="Shell_QuickAccent" Tag="QuickAccent">
<muxc:NavigationViewItem.Icon>
<BitmapIcon
UriSource="ms-appx:///Assets/FluentIcons/FluentIconsPowerAccent.png"
Expand Down
6 changes: 3 additions & 3 deletions src/settings-ui/Settings.UI/OOBE/Views/OobeShellPage.xaml.cs
Expand Up @@ -103,9 +103,9 @@ public OobeShellPage()
IsNew = true,
});

Modules.Insert((int)PowerToysModules.PowerAccent, new OobePowerToysModule()
Modules.Insert((int)PowerToysModules.QuickAccent, new OobePowerToysModule()
{
ModuleName = "PowerAccent",
ModuleName = "QuickAccent",
IsNew = true,
});

Expand Down Expand Up @@ -189,7 +189,7 @@ private void NavigationView_SelectionChanged(Microsoft.UI.Xaml.Controls.Navigati
case "Run": NavigationFrame.Navigate(typeof(OobeRun)); break;
case "ImageResizer": NavigationFrame.Navigate(typeof(OobeImageResizer)); break;
case "KBM": NavigationFrame.Navigate(typeof(OobeKBM)); break;
case "PowerAccent": NavigationFrame.Navigate(typeof(OobePowerAccent)); break;
case "QuickAccent": NavigationFrame.Navigate(typeof(OobePowerAccent)); break;
case "PowerRename": NavigationFrame.Navigate(typeof(OobePowerRename)); break;
case "TextExtractor": NavigationFrame.Navigate(typeof(OobePowerOCR)); break;
case "FileExplorer": NavigationFrame.Navigate(typeof(OobeFileExplorer)); break;
Expand Down

0 comments on commit 9b3e850

Please sign in to comment.