Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File dialog issues on Linux desktop #3439

Open
dgulotta opened this issue Dec 22, 2024 · 2 comments
Open

File dialog issues on Linux desktop #3439

dgulotta opened this issue Dec 22, 2024 · 2 comments

Comments

@dgulotta
Copy link

Problem
I encountered two issues with the file dialog in the desktop platform on Linux:

  1. When I first open the dialog, I can see folders but not files. Files only appear after I have gone back and forth a few times between different folders. It seems like navigating from a folder to its parent is what finally causes files to appear.
  2. After I select a file, the text next to the "Choose File" button still says "no file selected".

Steps To Reproduce

Steps to reproduce the behavior:

  • Create an app that has an input { type: "file" }.
  • Enable the "desktop" feature of dioxus.
  • cargo run on Linux.
  • Click the Choose File button.
  • After moving back and forth between folders until files appear, select a file and click OK.

Environment:

  • Dioxus version: 0.6.1
  • Rust version: 1.83.0
  • OS info: Void Linux with Xfce 4.20
  • App platform: desktop
@dgulotta
Copy link
Author

I think the first issue arises because zenity is run with the option "--file-filter name", which means that it is being asked to show only files named "name". I have not yet figured out how Dioxus calls zenity.

@dgulotta
Copy link
Author

Actually, what is happening is this line is being called with file_extensions being empty:

dialog = dialog.add_filter("name", file_extensions.as_slice());

rfd interprets this as "don't match any files".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant