mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Warn if trying to add existing shortcut
1. Warn if trying to add existing shortcut
This commit is contained in:
parent
a0c70a3432
commit
c2b14815e3
2 changed files with 6 additions and 1 deletions
|
|
@ -175,6 +175,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
|
||||
|
||||
public ObservableCollection<CustomPluginHotkey> CustomPluginHotkeys { get; set; } = new ObservableCollection<CustomPluginHotkey>();
|
||||
public ObservableCollection<CustomShortcutModel> CustomShortcuts { get; set; } = new ObservableCollection<CustomShortcutModel>();
|
||||
|
||||
public bool DontPromptUpdateMsg { get; set; }
|
||||
public bool EnableUpdateLog { get; set; }
|
||||
|
|
@ -204,7 +205,6 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
|
||||
// This needs to be loaded last by staying at the bottom
|
||||
public PluginsSettings PluginSettings { get; set; } = new PluginsSettings();
|
||||
internal ObservableCollection<CustomShortcutModel> CustomShortcuts { get; set; } = new();
|
||||
}
|
||||
|
||||
public enum LastQueryMode
|
||||
|
|
|
|||
|
|
@ -415,6 +415,11 @@ namespace Flow.Launcher
|
|||
var shortcutSettingWindow = new CustomShortcutSetting();
|
||||
if (shortcutSettingWindow.ShowDialog() == true)
|
||||
{
|
||||
if (settings.CustomShortcuts.Contains(shortcutSettingWindow.ShortCut))
|
||||
{
|
||||
MessageBox.Show("Dulplicate shortcut");
|
||||
return;
|
||||
}
|
||||
settings.CustomShortcuts.Add(shortcutSettingWindow.ShortCut);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue