Skip to content

Commit

Permalink
chore: Follow rfd API change (set_description)
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 authored and adrian17 committed Sep 17, 2023
1 parent b819066 commit d7d5928
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions desktop/src/backends/navigator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl NavigatorBackend for ExternalNavigatorBackend {
let confirm = MessageDialog::new()
.set_title("Open website?")
.set_level(MessageLevel::Info)
.set_description(&message)
.set_description(message)
.set_buttons(MessageButtons::OkCancel)
.show()
== MessageDialogResult::Ok;
Expand Down Expand Up @@ -209,7 +209,7 @@ impl NavigatorBackend for ExternalNavigatorBackend {
if e.kind() == ErrorKind::PermissionDenied {
let attempt_sandbox_open = MessageDialog::new()
.set_level(MessageLevel::Warning)
.set_description(&format!("The current movie is attempting to read files stored in {}.\n\nTo allow it to do so, click Yes, and then Open to grant read access to that directory.\n\nOtherwise, click No to deny access.", path.parent().unwrap_or(&path).to_string_lossy()))
.set_description(format!("The current movie is attempting to read files stored in {}.\n\nTo allow it to do so, click Yes, and then Open to grant read access to that directory.\n\nOtherwise, click No to deny access.", path.parent().unwrap_or(&path).to_string_lossy()))
.set_buttons(MessageButtons::YesNo)
.show() == MessageDialogResult::Yes;

Expand Down Expand Up @@ -359,7 +359,7 @@ impl NavigatorBackend for ExternalNavigatorBackend {
return Ok(());
}
(false, SocketMode::Ask) => {
let attempt_sandbox_connect = AsyncMessageDialog::new().set_level(MessageLevel::Warning).set_description(&format!("The current movie is attempting to connect to {:?} (port {}).\n\nTo allow it to do so, click Yes to grant network access to that host.\n\nOtherwise, click No to deny access.", host, port)).set_buttons(MessageButtons::YesNo)
let attempt_sandbox_connect = AsyncMessageDialog::new().set_level(MessageLevel::Warning).set_description(format!("The current movie is attempting to connect to {:?} (port {}).\n\nTo allow it to do so, click Yes to grant network access to that host.\n\nOtherwise, click No to deny access.", host, port)).set_buttons(MessageButtons::YesNo)
.show()
.await == MessageDialogResult::Yes;

Expand Down
2 changes: 1 addition & 1 deletion desktop/src/backends/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl UiBackend for DesktopUiBackend {
let confirm = MessageDialog::new()
.set_title("Open website?")
.set_level(MessageLevel::Info)
.set_description(&message)
.set_description(message)
.set_buttons(MessageButtons::OkCancel)
.show()
== MessageDialogResult::Ok;
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fn panic_hook(info: &PanicInfo) {
if rfd::MessageDialog::new()
.set_level(rfd::MessageLevel::Error)
.set_title("Ruffle")
.set_description(&format!(
.set_description(format!(
"Ruffle has encountered a fatal error, this is a bug.\n\n\
{message}\n\n\
Please report this to us so that we can fix it. Thank you!\n\
Expand Down

0 comments on commit d7d5928

Please sign in to comment.