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:
parent
c457fba947
commit
c34a4adb71
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue