Skip to content

Commit 4a0f126

Browse files
committed
Use ShowMsgError instead of ShowMsgBox
1 parent f244812 commit 4a0f126

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -382,21 +382,17 @@ public void OpenDirectory(string directoryPath, string fileNameOrFilePath = null
382382
catch (Win32Exception ex) when (ex.NativeErrorCode == 2)
383383
{
384384
LogError(ClassName, "File Manager not found");
385-
ShowMsgBox(
385+
ShowMsgError(
386386
string.Format(GetTranslation("fileManagerNotFound"), ex.Message),
387-
GetTranslation("fileManagerNotFoundTitle"),
388-
MessageBoxButton.OK,
389-
MessageBoxImage.Error
387+
GetTranslation("fileManagerNotFoundTitle")
390388
);
391389
}
392390
catch (Exception ex)
393391
{
394392
LogException(ClassName, "Failed to open folder", ex);
395-
ShowMsgBox(
393+
ShowMsgError(
396394
string.Format(GetTranslation("folderOpenError"), ex.Message),
397-
GetTranslation("errorTitle"),
398-
MessageBoxButton.OK,
399-
MessageBoxImage.Error
395+
GetTranslation("errorTitle")
400396
);
401397
}
402398
}
@@ -424,11 +420,9 @@ private void OpenUri(Uri uri, bool? inPrivate = null, bool forceBrowser = false)
424420
{
425421
var tabOrWindow = browserInfo.OpenInTab ? "tab" : "window";
426422
LogException(ClassName, $"Failed to open URL in browser {tabOrWindow}: {path}, {inPrivate ?? browserInfo.EnablePrivate}, {browserInfo.PrivateArg}", e);
427-
ShowMsgBox(
423+
ShowMsgError(
428424
GetTranslation("browserOpenError"),
429-
GetTranslation("errorTitle"),
430-
MessageBoxButton.OK,
431-
MessageBoxImage.Error
425+
GetTranslation("errorTitle")
432426
);
433427
}
434428
}

0 commit comments

Comments
 (0)