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

gtk::MessageDialog is deprecated in favor of gtk::AlertDialog #615

Open
pieterdd opened this issue Mar 6, 2024 · 2 comments
Open

gtk::MessageDialog is deprecated in favor of gtk::AlertDialog #615

pieterdd opened this issue Mar 6, 2024 · 2 comments

Comments

@pieterdd
Copy link

pieterdd commented Mar 6, 2024

relm4's documentation contains an example that uses gtk::MessageDialog. This is deprecated as of gtk4-rs 4.10 in favor of gtk::AlertDialog. I haven't been able to figure out how to use it within a relm4::view yet, but for now instantiating dialogs from the update method suits my needs.

@simplepad
Copy link

@pieterdd would you mind sharing how you instantiate dialogs from the update method?

@pieterdd
Copy link
Author

I do it like this:

gtk::AlertDialog::builder()
    .modal(true)
    .message("Hello world")
    .detail("This is a test")
    .build()
    .show(Some(root));

where root: &Self::Root.

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

2 participants