Skip to content

Commit 314eb23

Browse files
committed
Update dialog button configurations for macOS
Swapped the order of `trueLabel` and `falseLabel` buttons in the `ConfirmationDialog` class. Updated the `MessageDialog` class to include an "OK" button in the dialog instead of using the default button configuration.
1 parent bb0f63d commit 314eb23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

AssetRipper.NativeDialogs/ConfirmationDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static class ConfirmationDialog
7171
string escapedTrueLabel = ProcessExecutor.EscapeString(trueLabel);
7272
string escapedFalseLabel = ProcessExecutor.EscapeString(falseLabel);
7373
string? result = await ProcessExecutor.TryRun("osascript",
74-
"-e", $"display dialog \"{escapedMessage}\" buttons {{\"{escapedTrueLabel}\", \"{escapedFalseLabel}\"}} default button \"{escapedTrueLabel}\"",
74+
"-e", $"display dialog \"{escapedMessage}\" buttons {{\"{escapedFalseLabel}\", \"{escapedTrueLabel}\"}} default button \"{escapedTrueLabel}\"",
7575
"-e", "button returned of result");
7676
if (result == trueLabel)
7777
{

AssetRipper.NativeDialogs/MessageDialog.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private unsafe static Task MessageWindows(string message)
5757
private static Task MessageMacOS(string message)
5858
{
5959
string escapedMessage = ProcessExecutor.EscapeString(message);
60-
return ProcessExecutor.TryRun("osascript", "-e", $"display dialog \"{escapedMessage}\"");
60+
return ProcessExecutor.TryRun("osascript", "-e", $"display dialog \"{escapedMessage}\" buttons {{\"OK\"}}");
6161
}
6262

6363
[SupportedOSPlatform("linux")]

0 commit comments

Comments
 (0)