Relm4 icon indicating copy to clipboard operation
Relm4 copied to clipboard

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

Open pieterdd opened this issue 1 year ago • 2 comments

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 avatar Mar 06 '24 20:03 pieterdd

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

simplepad avatar Apr 22 '24 16:04 simplepad

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.

pieterdd avatar Apr 22 '24 18:04 pieterdd