DEV Community

Eliott Takvorian
Eliott Takvorian

Posted on

Gotk4 NewMessageDialog doesn't take the message_format argument

I use github.com/diamondburned/gotk4/pkg/gtk/v4. I'd like to create a modal dialog, like this:

dialog := gtk.NewMessageDialog(
    &window.Window
    gtk.DialogModal|gtk.DialogDestroyWithParent,
    gtk.MessageInfo,
    gtk.ButtonsOK,
    "Some info I want to let the user know",
)
dialog.SetTitle("Information")
dialog.SetVisible(true)

Only, NewMessageDialog() is declared like this:

func gtk.NewMessageDialog(parent *gtk.Window, flags gtk.DialogFlags, typ gtk.MessageType, buttons gtk.ButtonsType) *gtk.MessageDialog

Unkike the…

Top comments (0)