Skip to content

Commit

Permalink
Merge pull request #917 from onesounds/DisplayHotkeyInTray
Browse files Browse the repository at this point in the history
Display hotkey in tray context menu
  • Loading branch information
jjw24 authored Jan 5, 2022
2 parents f5a73dc + 45858c8 commit bdf81d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Flow.Launcher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ private void OnLoaded(object sender, RoutedEventArgs _)
case nameof(Settings.Language):
UpdateNotifyIconText();
break;
case nameof(Settings.Hotkey):
UpdateNotifyIconText();
break;
}
};
}
Expand All @@ -180,7 +183,7 @@ private void InitializePosition()
private void UpdateNotifyIconText()
{
var menu = contextMenu;
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen");
((MenuItem)menu.Items[1]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" + _settings.Hotkey + ")";
((MenuItem)menu.Items[2]).Header = InternationalizationManager.Instance.GetTranslation("GameMode");
((MenuItem)menu.Items[3]).Header = InternationalizationManager.Instance.GetTranslation("iconTraySettings");
((MenuItem)menu.Items[4]).Header = InternationalizationManager.Instance.GetTranslation("iconTrayExit");
Expand All @@ -203,7 +206,7 @@ private void InitializeNotifyIcon()
};
var open = new MenuItem
{
Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen")
Header = InternationalizationManager.Instance.GetTranslation("iconTrayOpen") + " (" +_settings.Hotkey + ")"
};
var gamemode = new MenuItem
{
Expand Down

0 comments on commit bdf81d6

Please sign in to comment.