mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Add delete confirmation when deleting quick access links & index search excluded paths
This commit is contained in:
parent
b924a79ccb
commit
3b3fe5201b
2 changed files with 16 additions and 0 deletions
|
|
@ -7,6 +7,8 @@
|
|||
<system:String x:Key="plugin_explorer_make_selection_warning">Please make a selection first</system:String>
|
||||
<system:String x:Key="plugin_explorer_quick_access_link_no_folder_selected">Please select a folder path.</system:String>
|
||||
<system:String x:Key="plugin_explorer_quick_access_link_path_already_exists">Please choose a different name or folder path.</system:String>
|
||||
<system:String x:Key="plugin_explorer_delete_quick_access_link">Are you sure you want to delete this quick access link?</system:String>
|
||||
<system:String x:Key="plugin_explorer_delete_index_search_excluded_path">Are you sure you want to delete this index search excluded path?</system:String>
|
||||
<system:String x:Key="plugin_explorer_select_folder_link_warning">Please select a folder link</system:String>
|
||||
<system:String x:Key="plugin_explorer_delete_folder_link">Are you sure you want to delete {0}?</system:String>
|
||||
<system:String x:Key="plugin_explorer_deletefileconfirm">Are you sure you want to permanently delete this file?</system:String>
|
||||
|
|
|
|||
|
|
@ -431,10 +431,24 @@ namespace Flow.Launcher.Plugin.Explorer.ViewModels
|
|||
{
|
||||
case "QuickAccessLink":
|
||||
if (SelectedQuickAccessLink == null) return;
|
||||
if (Context.API.ShowMsgBox(
|
||||
Context.API.GetTranslation("plugin_explorer_delete_quick_access_link"),
|
||||
Context.API.GetTranslation("plugin_explorer_delete"),
|
||||
MessageBoxButton.OKCancel,
|
||||
MessageBoxImage.Warning)
|
||||
== MessageBoxResult.Cancel)
|
||||
return;
|
||||
Settings.QuickAccessLinks.Remove(SelectedQuickAccessLink);
|
||||
break;
|
||||
case "IndexSearchExcludedPaths":
|
||||
if (SelectedIndexSearchExcludedPath == null) return;
|
||||
if (Context.API.ShowMsgBox(
|
||||
Context.API.GetTranslation("plugin_explorer_delete_index_search_excluded_path"),
|
||||
Context.API.GetTranslation("plugin_explorer_delete"),
|
||||
MessageBoxButton.OKCancel,
|
||||
MessageBoxImage.Warning)
|
||||
== MessageBoxResult.Cancel)
|
||||
return;
|
||||
Settings.IndexSearchExcludedSubdirectoryPaths.Remove(SelectedIndexSearchExcludedPath);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue