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

Do not use rfd 0.12.1 #796

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Do not use rfd 0.12.1 #796

merged 2 commits into from
Dec 5, 2023

Conversation

notriddle
Copy link
Contributor

PolyMeilex/rfd#152
conflicts with the way tauri uses it.

Yeah, this is a decent solution, not much else we can do about this global state bs on C side.

This will obviously blow up as soon as someone has other code that also uses GTK, but let's ignore that for now, as I want to get rid of GTK backend one day anyway (#66).

Yes, Tauri is other code that also uses GTK, and it does, indeed, blow up. The best way around this is to stop using rfd entirely (they're planning to drop the GTK backend, which will probably break since the XDG Portal API doesn't cover message dialogs).

@notriddle notriddle requested a review from a team as a code owner December 5, 2023 01:00
@FabianLars
Copy link
Member

Oh damn, good finding! Thank you

@FabianLars
Copy link
Member

(ignore the failed audit check, not your fault)

Just 2 small-ish things before we can merge this:

  1. We require all commits to be signed - here's a guide: https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#ssh-commit-signature-verification - i recommend the ssh approach because i think it's easier. A guide for gpg is right above that though
    1.5) Once you set up the code signing you can do git commit --amend && git push --force to update this PR
  2. Please add a changefile like this one: https://github.com/tauri-apps/plugins-workspace/blob/v2/.changes/dialog-async-message-dialog.md

Thanks again

PolyMeilex/rfd#152
conflicts with the way tauri uses it.

> Yeah, this is a decent solution, not much else we can do about this global state bs on C side.
>
> This will obviously blow up as soon as someone has other code that also uses GTK, but let's ignore that for now, as I want to get rid of GTK backend one day anyway (tauri-apps#66).

Yes, Tauri is other code that also uses GTK, and it does, indeed, blow up. The best way around this is to stop using rfd entirely (they're planning to drop the GTK backend, which will probably break since the XDG Portal API doesn't cover message dialogs).
@notriddle
Copy link
Contributor Author

@FabianLars Okay, that should work.

Copy link
Member

@FabianLars FabianLars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

(as much as i liked the changefile, i had to trim it down because the changelog generator can't handle large changefile that nice imo)

@FabianLars FabianLars merged commit 0e3e3d4 into tauri-apps:v2 Dec 5, 2023
@notriddle notriddle deleted the v2 branch December 5, 2023 21:33
@PolyMeilex
Copy link

PolyMeilex commented Dec 15, 2023

XDG Portal API doesn't cover message dialogs

It does, via zenity. So the same way it used to work before I introduced RFD to Tauri (tinyfiledialogs lib calls zenity internally)

(In future I also want to do a fallback to zenity for file dialogs in cases when xdp is not present.)

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

Successfully merging this pull request may close these issues.

3 participants