Can I get GTK_RESPONSE_ACCEPT/REJECT from modal dialog by glade.



Hello.
I develop vecterion vector graphics editor in GTK3/cairo.
https://github.com/MichinariNukazawa/vecterion_vge
I try porting the "New Document" dialog to xml file by glade from C code.

```
GtkDialogFlags flags = GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT;

    dialog = gtk_dialog_new_with_buttons ("New Document",
            NULL,
            flags,
            "_OK",
            GTK_RESPONSE_ACCEPT,
            "_Cancel",
            GTK_RESPONSE_REJECT,
            NULL);

~

    gint result = gtk_dialog_run (GTK_DIALOG (dialog));
    switch (result)
    {
        case GTK_RESPONSE_ACCEPT:
~
```
This is good easy way because callback/connect not necessary OK/Cancel.

My modal dialog by glade don't return, when OK/Cancel button clicked.
(I checked General>Window Flags>Destroy with Parent, and Modal.)
I need GTK_RESPONSE_ACCEPT/REJECT.

Can I get the dialog with GTK_RESPONSE_ACCEPT/REJECT, by configuration in glade( or other way)?

Thanks.


--
==========
Michinari.Nukazawa

in the project "daisy bell"
https://daisy-bell.booth.pm/
==========



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]