Ah yes, connecting to signals is probably a better idea. I've made it so that the ApplicationGuiManager on instantiation of ImageWindows connects to their signal_hide().
However, the Gtk errors still persist. The new code is at http://rafb.net/paste/results/mFMmE627.html - Martin N. Pavlo Korzhyk skrev: >> I have written a minimal SDI app which you can find at: >> http://rafb.net/paste/results/24o6Dt85.html >> >> Compile it with: >> ~$ gcc sdi-example.cpp -o sdi-example `pkg-config --libs --cflags >> gtkmm-2.4` >> >> If you create a new image with File New, and close Image #1, you'll see >> that Gtk spits out a bunch of errors. From what I can see, the ref >> counting *should* be right, but I might just look through it. > > I didn't analyze your source very careful, but I think I got what you > try to implement. > The easiest solution is to let ApplicationGuiManager handle your close > requests. > The constructor of ImageWindow will connect a proper method of the > _Manager_ to the > proper signal. > If you need to do some processing inside ImageWindow, you could > implement something > like > bool ImageWindow::mayICloseYou() > to ask about saving changes etc. > I think that changing your design will be easier than trying to make > gtkmm fit existing decisions. > > _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
