How to bind action for GtkDialog?

I create a GtkDaialog child to embed other widgets in it, then load context menu via GtkBuilder, all menu item bind its action, it seems that the menu action not be called.

I have tried two ways to do it:
First insert the action group in the main window(GtkApplicationWindow), then failed.
Second insert the action group in the dialog window, failed too.

Is there a way to bind action for GtkDialog?
Thanks in advanced.

Sorry guys, it’s my fault:
the action name used in GtkBuilder file is not same as its definition.

make them same will fix this trouble.

1 Like