Relm4
Relm4 copied to clipboard
gtk::MessageDialog is deprecated in favor of gtk::AlertDialog
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.
@pieterdd would you mind sharing how you instantiate dialogs from the update method?
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.