I am trying to add a response to a button in a Gtk::Dialog but I don't know why it does not work I try to type this :
button_quit(Gtk::Stock::QUIT, Gtk::RESPONSE_CLOSE)
but it does not work. Also, I tried to do with an other way like this :
button_quit.signal_clicked().connect([]() {Gtk::Main::quit();});
but when I clicked on the button I have this error :
(code:7199): Gtk-CRITICAL **: gtk_main_quit: assertion 'main_loops != NULL' failed
So if you know how to solve this it will be very helpful for me.
Thank you.
Use add_button.