desktop: Rename pick_file to pick_ruffle_file

This change emphasizes that we want to pick a file to open by Ruffle
contrary to picking files e.g. from ActionScript.
This commit is contained in:
Kamil Jarosz 2024-09-11 21:28:00 +02:00 committed by Nathan Adams
parent c457fba947
commit c34a4adb71
3 changed files with 3 additions and 3 deletions

View File

@ -492,7 +492,7 @@ impl App {
let picker = self.gui.borrow().file_picker();
tokio::spawn(async move {
if let Some(url) = picker
.pick_file(None)
.pick_ruffle_file(None)
.await
.and_then(|p| Url::from_file_path(p).ok())
{

View File

@ -32,7 +32,7 @@ impl FilePicker {
}
}
pub async fn pick_file(&self, dir: Option<PathBuf>) -> Option<PathBuf> {
pub async fn pick_ruffle_file(&self, dir: Option<PathBuf>) -> Option<PathBuf> {
if self.data.picking.swap(true, Ordering::SeqCst) {
// Already picking
return None;

View File

@ -64,7 +64,7 @@ impl PathOrUrlField {
let value = self.value.clone();
let picker = self.picker.clone();
tokio::spawn(async move {
if let Some(path) = picker.pick_file(dir).await {
if let Some(path) = picker.pick_ruffle_file(dir).await {
let mut value_lock = Self::lock_value(&value);
*value_lock = path.to_string_lossy().to_string();
}