2014-06-11 12:58, Murray Cumming skrev:
Done!On Mon, 2014-06-09 at 10:12 +0200, Kjell Ahlstedt wrote:Commit https://git.gnome.org/browse/gtkmm/commit/?id=a502d27364572430c2deb3f0a56cbfb0e5c48a19 adds //TODO: Maybe keep this or implement it ourselves, //because the C API now requires manual ref/unrefing to stop remove() and add() from breaking things. I didn't think of that complication when I deprecated Widget::reparent(). It's an issue only for managed widgets, such as Gtk::Button* button1 = Gtk::manage(new Gtk::Button()); Other widgets have a reference count > 0 even when they are not inserted in a Gtk::Container. How about just adding to the deprecation message that the Container::remove()/Container::add() combination can't be used with managed widgets? Would that be an acceptable restriction?I'd prefer to just undeprecate it, and reimplement it using a simple ref/remove/add/unref. I think maybe we even had it like that in gtkmm before it was in GTK+. https://git.gnome.org/browse/gtkmm/commit/?id=ba040cf19ed78a6125b64417073dff76a7683ef9 I've tested it by adding a Reparent button in my local copy of gtkmm-documentation/examples/book/range_widgets. Kjell |