From 4a0f126c34b16ee6aa478faa4cdea98eea72c7a3 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Thu, 14 Aug 2025 14:39:41 +0800 Subject: [PATCH] Use ShowMsgError instead of ShowMsgBox --- Flow.Launcher/PublicAPIInstance.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Flow.Launcher/PublicAPIInstance.cs b/Flow.Launcher/PublicAPIInstance.cs index e0ed105cf..37bc16d58 100644 --- a/Flow.Launcher/PublicAPIInstance.cs +++ b/Flow.Launcher/PublicAPIInstance.cs @@ -382,21 +382,17 @@ namespace Flow.Launcher catch (Win32Exception ex) when (ex.NativeErrorCode == 2) { LogError(ClassName, "File Manager not found"); - ShowMsgBox( + ShowMsgError( string.Format(GetTranslation("fileManagerNotFound"), ex.Message), - GetTranslation("fileManagerNotFoundTitle"), - MessageBoxButton.OK, - MessageBoxImage.Error + GetTranslation("fileManagerNotFoundTitle") ); } catch (Exception ex) { LogException(ClassName, "Failed to open folder", ex); - ShowMsgBox( + ShowMsgError( string.Format(GetTranslation("folderOpenError"), ex.Message), - GetTranslation("errorTitle"), - MessageBoxButton.OK, - MessageBoxImage.Error + GetTranslation("errorTitle") ); } } @@ -424,11 +420,9 @@ namespace Flow.Launcher { var tabOrWindow = browserInfo.OpenInTab ? "tab" : "window"; LogException(ClassName, $"Failed to open URL in browser {tabOrWindow}: {path}, {inPrivate ?? browserInfo.EnablePrivate}, {browserInfo.PrivateArg}", e); - ShowMsgBox( + ShowMsgError( GetTranslation("browserOpenError"), - GetTranslation("errorTitle"), - MessageBoxButton.OK, - MessageBoxImage.Error + GetTranslation("errorTitle") ); } }