Skip to content

Commit

Permalink
Improve hotkey registration failure popup (#2343)
Browse files Browse the repository at this point in the history
* Add title text and more text in "hotkey register failed" popup

* adjust string key

* Formatting HotKeyMapper.cs

---------

Co-authored-by: VictoriousRaptor <[email protected]>
  • Loading branch information
onesounds and VictoriousRaptor authored Sep 17, 2023
1 parent ef84b2b commit c1b776d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Flow.Launcher/Helper/HotKeyMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ internal static void SetHotkey(HotkeyModel hotkey, EventHandler<HotkeyEventArgs>
}
catch (Exception)
{
string errorMsg =
string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"),
hotkeyStr);
MessageBox.Show(errorMsg);
string errorMsg = string.Format(InternationalizationManager.Instance.GetTranslation("registerHotkeyFailed"), hotkeyStr);
string errorMsgTitle = InternationalizationManager.Instance.GetTranslation("MessageBoxTitle");
MessageBox.Show(errorMsg,errorMsgTitle);
}
}

Expand Down
3 changes: 2 additions & 1 deletion Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">
<!-- MainWindow -->
<system:String x:Key="registerHotkeyFailed">Failed to register hotkey: {0}</system:String>
<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>
<system:String x:Key="MessageBoxTitle">Flow Launcher</system:String>
<system:String x:Key="couldnotStartCmd">Could not start {0}</system:String>
<system:String x:Key="invalidFlowLauncherPluginFileFormat">Invalid Flow Launcher plugin file format</system:String>
<system:String x:Key="setAsTopMostInThisQuery">Set as topmost in this query</system:String>
Expand Down

0 comments on commit c1b776d

Please sign in to comment.