2012-10-14 01:56, Ian Martin skrev:
You look at the wrong class. It's Gtk::Widget, not Gtk::Window. Why not just override signal::hide() instead? - with the proviso that altering expected and reasonable behaviour tends to fail user acceptance testing.Much of the gtkmm documentation is automatically copied from gtk+, and to some extent adjusted to C++. E.g. "gtk_widget_hide_on_delete()" in the gtk+ documentation is translated to "Gtk::Widget::hide_on_delete()" in the gtkmm documentation. This is done by the command gmmproc in glibmm. As you can expect, this kind of automatic translation is not always perfect. In this case it does not take into account that gtk_widget_hide_on_delete() is not wrapped in a gtkmm method. There is a gtk_widget_hide_on_delete() in gtk+, but there is no Gtk::Widget::hide_on_delete() in gtkmm. I don't know if there is a good reason not to include it in gtkmm, or if it's just that no one has taken the time to do it. You can connect the gtk+ function to the signal, and see if it works as you want. The function arguments to the signal handler don't fit gtk_widget_hide_on_delete(). One way to solve this problem is that you write a small signal handler that calls gtk_widget_hide_on_delete(). Alternatively you can solve the problem with sigc::bind and sigc::hide. Kjell |