slint-ui / cargo-ui

GUI for Cargo
Apache License 2.0
271 stars 23 forks source link

use rfd for every OS #13

Closed Be-ing closed 2 years ago

Be-ing commented 2 years ago

rfd 0.7 can now use the XDG Desktop Portal D-Bus API instead of depending on GTK. The D-Bus API is handled by ashpd which uses zbus, so this does not bring in any new C or C++ dependencies.

ogoffart commented 2 years ago

Thanks!

I just tested and the window now appear under all the other window, so we don't see it. And if we press several time on the button, it will mess things up as only one dialog opens and it re-opens once it is closed.

ogoffart commented 2 years ago

And if we press several time on the button, it will mess things up as only one dialog opens and it re-opens once it is closed.

That bug was already there before, it was just not so visible if the dialog pops up in front. We should ideally disable the UI when the dialog is shown...

the [dialog] window now appear under all the other window, so we don't see it.

I guess we need to pass a window handle. We should add API in SixtyFPS to get that handle.

ogoffart commented 2 years ago

Also, dialog.set_directory(directory); doesn't seem to have an effect :-/

ogoffart commented 2 years ago

Thanks for the patch!

Be-ing commented 2 years ago

I just tested and the window now appear under all the other window, so we don't see it.

Does SixtyFPS have an API to get a raw_window_handle?

Be-ing commented 2 years ago

Also, dialog.set_directory(directory); doesn't seem to have an effect :-/

https://github.com/PolyMeilex/rfd/issues/42

tronical commented 2 years ago

I just tested and the window now appear under all the other window, so we don't see it.

Does SixtyFPS have an API to get a raw_window_handle?

Not yet, but I think that can be added. We've discussed this before and raw-window-handle seems like it offers a stable API, so it might be okay to re-export it.

Be-ing commented 2 years ago

https://github.com/sixtyfpsui/sixtyfps/issues/877

Be-ing commented 2 years ago

That bug was already there before, it was just not so visible if the dialog pops up in front. We should ideally disable the UI when the dialog is shown...

Do you think this should be addressed in rfd, in SixtyFPS, or in the SixtyFPS application?