Skip to content

Commit c1b776d

Browse files
Improve hotkey registration failure popup (#2343)
* Add title text and more text in "hotkey register failed" popup * adjust string key * Formatting HotKeyMapper.cs --------- Co-authored-by: VictoriousRaptor <[email protected]>
1 parent ef84b2b commit c1b776d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Flow.Launcher/Helper/HotKeyMapper.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ internal static void SetHotkey(HotkeyModel hotkey, EventHandler<HotkeyEventArgs>
4444
}
4545
catch (Exception)
4646
{
47-
string errorMsg =
48-
string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"),
49-
hotkeyStr);
50-
MessageBox.Show(errorMsg);
47+
string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"), hotkeyStr);
48+
string errorMsgTitle = InternationalizationManager.Instance.GetTranslation("MessageBoxTitle");
49+
MessageBox.Show(errorMsg,errorMsgTitle);
5150
}
5251
}
5352

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:system="clr-namespace:System;assembly=mscorlib">
55
<!-- MainWindow -->
6-
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey: {0}</system:String>
6+
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey "{0}". The hotkey may be in use by another program. Change to a different hotkey, or exit another program.</system:String>
7+
<system:String x:Key="MessageBoxTitle">Flow Launcher</system:String>
78
<system:String x:Key="couldnotStartCmd">Could not start {0}</system:String>
89
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Invalid Flow Launcher plugin file format</system:String>
910
<system:String x:Key="setAsTopMostInThisQuery">Set as topmost in this query</system:String>

0 commit comments

Comments
 (0)