Improve message noticification

This commit is contained in:
Jack251970 2025-05-13 13:01:24 +08:00
parent e0ac6d5fee
commit 284729afb5
2 changed files with 9 additions and 1 deletions

View file

@ -48,7 +48,8 @@
<system:String x:Key="flowlauncher_plugin_program_pls_select_program_source">Please select a program source</system:String>
<system:String x:Key="flowlauncher_plugin_program_delete_program_source">Are you sure you want to delete the selected program sources?</system:String>
<system:String x:Key="flowlauncher_plugin_program_delete_program_source_not_user_added">Please select program sources that you added</system:String>
<system:String x:Key="flowlauncher_plugin_program_delete_program_source_user_added">Please select program sources that are not added by you</system:String>
<system:String x:Key="flowlauncher_plugin_program_delete_program_source_not_user_added">Please select program sources that are added by you</system:String>
<system:String x:Key="flowlauncher_plugin_program_duplicate_program_source">Another program source with the same location already exists.</system:String>
<system:String x:Key="flowlauncher_plugin_program_edit_program_source_title">Program Source</system:String>

View file

@ -303,6 +303,13 @@ namespace Flow.Launcher.Plugin.Program.Views
return;
}
if (IsAllItemsUserAdded(selectedItems))
{
var msg1 = context.API.GetTranslation("flowlauncher_plugin_program_delete_program_source_not_user_added");
context.API.ShowMsgBox(msg1);
return;
}
if (HasMoreOrEqualEnabledItems(selectedItems))
{
await ProgramSettingDisplay.SetProgramSourcesStatusAsync(selectedItems, false);