mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-07 04:46:56 +01:00
Compare commits
8 Commits
shawn/remo
...
niels9001/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09a38e77ca | ||
|
|
3004feb410 | ||
|
|
a9bc2ac527 | ||
|
|
1df47254fc | ||
|
|
6c9498e756 | ||
|
|
aa9da87175 | ||
|
|
e49f6d6927 | ||
|
|
9d4b65e0e6 |
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@@ -315,6 +315,7 @@ debugbreak
|
||||
declatory
|
||||
decryptor
|
||||
Dedup
|
||||
Deeplink
|
||||
DEFAULTBOOTSTRAPPERINSTALLFOLDER
|
||||
DEFAULTCOLOR
|
||||
DEFAULTFLAGS
|
||||
|
||||
@@ -27,12 +27,17 @@
|
||||
Severity="Informational" />
|
||||
|
||||
<controls:SettingsGroup x:Uid="CmdPal_Activation_GroupSettings" IsEnabled="{x:Bind ViewModel.IsEnabled, Mode=OneWay}">
|
||||
|
||||
<tkcontrols:SettingsCard x:Uid="CmdPal_ActivationShortcut" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||
<controls:ShortcutControl
|
||||
MinWidth="{StaticResource SettingActionControlMinWidth}"
|
||||
HotkeySettings="{x:Bind Path=ViewModel.Hotkey, Mode=OneWay}"
|
||||
IsEnabled="False" />
|
||||
<tkcontrols:SettingsCard.Description>
|
||||
<HyperlinkButton
|
||||
x:Name="CmdPalSettingsDeeplink"
|
||||
x:Uid="CmdPal_DeeplinkContent"
|
||||
Click="CmdPalSettingsDeeplink_Click" />
|
||||
</tkcontrols:SettingsCard.Description>
|
||||
</tkcontrols:SettingsCard>
|
||||
</controls:SettingsGroup>
|
||||
</StackPanel>
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using ManagedCommon;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.PowerToys.Settings.UI.Library;
|
||||
using Microsoft.PowerToys.Settings.UI.ViewModels;
|
||||
@@ -29,5 +33,37 @@ namespace Microsoft.PowerToys.Settings.UI.Views
|
||||
{
|
||||
ViewModel.RefreshEnabledState();
|
||||
}
|
||||
|
||||
private void LaunchApp(string appPath)
|
||||
{
|
||||
try
|
||||
{
|
||||
string dir = Path.GetDirectoryName(appPath);
|
||||
|
||||
var processStartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = appPath,
|
||||
Arguments = string.Empty,
|
||||
WorkingDirectory = dir,
|
||||
UseShellExecute = true,
|
||||
Verb = "open",
|
||||
CreateNoWindow = false,
|
||||
};
|
||||
|
||||
Process process = Process.Start(processStartInfo) ?? throw new InvalidOperationException("Failed to start the process.");
|
||||
process.WaitForInputIdle();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new InvalidOperationException($"Failed to launch CmdPal settings: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private void CmdPalSettingsDeeplink_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e)
|
||||
{
|
||||
// Launch CmdPal settings window
|
||||
string launchPath = "x-cmdpal://settings";
|
||||
LaunchApp(launchPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4996,8 +4996,8 @@ To record a specific window, enter the hotkey with the Alt key in the opposite m
|
||||
<data name="CmdPal_ActivationShortcut.Header" xml:space="preserve">
|
||||
<value>Activation shortcut</value>
|
||||
</data>
|
||||
<data name="CmdPal_ActivationShortcut.Description" xml:space="preserve">
|
||||
<value>Go to Command Palette settings to customize the activation shortcut.</value>
|
||||
<data name="CmdPal_DeeplinkContent.Content" xml:space="preserve">
|
||||
<value>Open Command Palette settings to customize the activation shortcut</value>
|
||||
</data>
|
||||
<data name="Help_chromaCIE" xml:space="preserve">
|
||||
<value>chroma (CIE LCh)</value>
|
||||
|
||||
Reference in New Issue
Block a user