Torsten Schoenfeld <kaffeetisch gmx de> writes:
The pre-2.10 branch would need to use GTK_OBJECT_FLOATING and GTK_OBJECT_FLAGS, I think.
Maybe something like below. I think it compiles, but does someone have an old enough gtk setup to try the test program?
A unit test would be great.
Unit testing means it compiles doesn't it? Integration testing is if it links too. :) Actually I don't know really how to programmatically make TreeView or IconView start editing then stop editing, as normally done by mouse clicks of course. A forced focus change to stop editing might be ok, or maybe running $entry->activate, but I don't have a good idea for a realistic start editing. What about the newSVGtkCellEditable macro? Since a GtkCellEditable interface requires GtkWidget I'd think maybe it should wrap the same as other widgets, ie. it should be gtk2perl_new_gtkobject() instead of the current gperl_new_object(...,FALSE), the difference of course being the latter doesn't sink a floating ref. Something like $renderer->start_editing from say an ordinary Gtk2::CellRendererText comes back with a floating ref to be taken over. I don't think there's any outright bug, since any viewer widget will add it as a container child, sinking the ref at that point. But leaving a floating ref kicking around is not normal is it?
Attachment:
GtkCellRenderer.xs.start-editing-float-2.diff
Description: Text Data
-- The most important thing when cooking with fish is freshness, so I always make sure to use seafood extender within an hour of thawing it.