Skip to content

Commit 6d1f533

Browse files
committed
merge
2 parents 6dd9617 + d1564b0 commit 6d1f533

File tree

14 files changed

+38
-516
lines changed

14 files changed

+38
-516
lines changed

PowerToys.sln

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -404,8 +404,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageResizerLib", "src\modu
404404
EndProject
405405
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PowerAccent", "PowerAccent", "{0F14491C-6369-4C45-AAA8-135814E66E6B}"
406406
EndProject
407-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerAccentModuleInterface", "src\modules\poweraccent\PowerAccentModuleInterface\PowerAccentModuleInterface.vcxproj", "{34A354C5-23C7-4343-916C-C52DAF4FC39D}"
408-
EndProject
409407
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerAccent.Core", "src\modules\poweraccent\PowerAccent.Core\PowerAccent.Core.csproj", "{3264DF53-C805-4B0C-867C-FCEAF7AEF762}"
410408
EndProject
411409
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerAccent.UI", "src\modules\poweraccent\PowerAccent.UI\PowerAccent.UI.csproj", "{31CAD28E-778A-441C-85BC-40AB3EAA2A10}"
@@ -1722,14 +1720,6 @@ Global
17221720
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|ARM64.Build.0 = Release|ARM64
17231721
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|x64.ActiveCfg = Release|x64
17241722
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853}.Release|x64.Build.0 = Release|x64
1725-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|ARM64.ActiveCfg = Debug|ARM64
1726-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|ARM64.Build.0 = Debug|ARM64
1727-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|x64.ActiveCfg = Debug|x64
1728-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Debug|x64.Build.0 = Debug|x64
1729-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|ARM64.ActiveCfg = Release|ARM64
1730-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|ARM64.Build.0 = Release|ARM64
1731-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|x64.ActiveCfg = Release|x64
1732-
{34A354C5-23C7-4343-916C-C52DAF4FC39D}.Release|x64.Build.0 = Release|x64
17331723
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|ARM64.ActiveCfg = Debug|ARM64
17341724
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|ARM64.Build.0 = Debug|ARM64
17351725
{3264DF53-C805-4B0C-867C-FCEAF7AEF762}.Debug|x64.ActiveCfg = Debug|x64
@@ -3165,7 +3155,6 @@ Global
31653155
{93B72A06-C8BD-484F-A6F7-C9F280B150BF} = {6C7F47CC-2151-44A3-A546-41C70025132C}
31663156
{18B3DB45-4FFE-4D01-97D6-5223FEEE1853} = {6C7F47CC-2151-44A3-A546-41C70025132C}
31673157
{0F14491C-6369-4C45-AAA8-135814E66E6B} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
3168-
{34A354C5-23C7-4343-916C-C52DAF4FC39D} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
31693158
{3264DF53-C805-4B0C-867C-FCEAF7AEF762} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
31703159
{31CAD28E-778A-441C-85BC-40AB3EAA2A10} = {0F14491C-6369-4C45-AAA8-135814E66E6B}
31713160
{A50C70A6-2DA0-4027-B90E-B1A40755A8A5} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Microsoft Corporation
2+
// The Microsoft Corporation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System.Diagnostics;
6+
using System.Globalization;
7+
using ManagedCommon;
8+
using Microsoft.PowerToys.Settings.UI.Library;
9+
using PowerToys.GPOWrapper;
10+
11+
namespace PowerAccent.Core
12+
{
13+
internal sealed class ModuleInterface : IPowerToysModule
14+
{
15+
public string Name => "PowerAccent";
16+
17+
public bool Enabled => new SettingsUtils().GetSettingsOrDefault<GeneralSettings>().Enabled.PowerAccent;
18+
19+
public GpoRuleConfigured GpoRuleConfigured => GPOWrapper.GetConfiguredQuickAccentEnabledValue();
20+
21+
public void Disable()
22+
{
23+
foreach (var process in Process.GetProcessesByName("PowerToys.PowerAccent.exe"))
24+
{
25+
process.Kill();
26+
}
27+
}
28+
29+
public void Enable()
30+
{
31+
Disable();
32+
33+
Process.Start("PowerToys.PowerAccent.exe", Environment.ProcessId.ToString(CultureInfo.InvariantCulture));
34+
}
35+
}
36+
}

src/modules/poweraccent/PowerAccent.Core/PowerAccent.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414

1515
<PropertyGroup>
16-
<CsWinRTIncludes>PowerToys.GPOWrapper;PowerToys.PowerAccentKeyboardService</CsWinRTIncludes>
16+
<CsWinRTIncludes>PowerToys.PowerAccentKeyboardService</CsWinRTIncludes>
1717
<CsWinRTGeneratedFilesDir>$(OutDir)</CsWinRTGeneratedFilesDir>
1818
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
1919
</PropertyGroup>
@@ -28,7 +28,7 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<ProjectReference Include="..\..\..\common\GPOWrapper\GPOWrapper.vcxproj" />
31+
<ProjectReference Include="..\..\..\common\GPOWrapperProjection\GPOWrapperProjection.csproj" />
3232
<ProjectReference Include="..\..\..\common\interop\PowerToys.Interop.vcxproj" />
3333
<ProjectReference Include="..\..\..\settings-ui\Settings.UI.Library\Settings.UI.Library.csproj" />
3434
<ProjectReference Include="..\PowerAccentKeyboardService\PowerAccentKeyboardService.vcxproj" />

src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentConstants.h

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.rc

Lines changed: 0 additions & 108 deletions
This file was deleted.

src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.vcxproj

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/modules/poweraccent/PowerAccentModuleInterface/PowerAccentModuleInterface.vcxproj.filters

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)