diff --git a/desktop/src/gui/dialogs/bookmarks_dialog.rs b/desktop/src/gui/dialogs/bookmarks_dialog.rs index e56e6a49454e..d24d5c9bbfb7 100644 --- a/desktop/src/gui/dialogs/bookmarks_dialog.rs +++ b/desktop/src/gui/dialogs/bookmarks_dialog.rs @@ -32,7 +32,7 @@ impl BookmarkAddDialog { } fn is_valid(&self) -> bool { - self.url.value().is_some() && !self.name.is_empty() + self.url.result().is_some() && !self.name.is_empty() } pub fn show(&mut self, locale: &LanguageIdentifier, egui_ctx: &egui::Context) -> bool { @@ -71,7 +71,7 @@ impl BookmarkAddDialog { name: self.name.clone(), url: self .url - .value() + .result() .cloned() .expect("is_valid() ensured value exists"), }) @@ -248,10 +248,10 @@ impl BookmarksDialog { } ui.end_row(); - let previous_url = bookmark.url.value().cloned(); + let previous_url = bookmark.url.result().cloned(); ui.label(text(locale, "bookmarks-dialog-location")); - let current_url = bookmark.url.ui(locale, ui).value(); + let current_url = bookmark.url.ui(locale, ui).result(); // TODO: Change the UrlOrPathField widget to return a response instead, so we can update when we lose the focus, removes the need to clone every redraw. if previous_url.as_ref() != current_url { diff --git a/desktop/src/gui/dialogs/open_dialog.rs b/desktop/src/gui/dialogs/open_dialog.rs index 19d884aed124..4510ccb4e0eb 100644 --- a/desktop/src/gui/dialogs/open_dialog.rs +++ b/desktop/src/gui/dialogs/open_dialog.rs @@ -288,7 +288,7 @@ impl OpenDialog { } else { self.options.player.frame_rate = None; } - if let Some(url) = self.path.value() { + if let Some(url) = self.path.result() { if self .event_loop .send_event(RuffleEvent::OpenURL( @@ -321,7 +321,7 @@ impl OpenDialog { .striped(true) .show(ui, |ui| { ui.label(text(locale, "open-dialog-path")); - is_valid &= self.path.ui(locale, ui).value().is_some(); + is_valid &= self.path.ui(locale, ui).result().is_some(); ui.end_row(); }); }); diff --git a/desktop/src/gui/widgets.rs b/desktop/src/gui/widgets.rs index 6fb147f78716..7c74f3695d64 100644 --- a/desktop/src/gui/widgets.rs +++ b/desktop/src/gui/widgets.rs @@ -86,7 +86,7 @@ impl PathOrUrlField { self } - pub fn value(&self) -> Option<&Url> { + pub fn result(&self) -> Option<&Url> { self.result.as_ref() } }