Does anyone have a clue how to use DND with a TreeModelFilter, and what I'm doing wrong? I'm about ready to give up. /Staffan On Wed, 2010-07-07 at 18:49 +0200, Staffan Gimåker wrote: > On Wed, 2010-07-07 at 10:23 +0200, Murray Cumming wrote: > > On Tue, 2010-07-06 at 02:08 +0200, Staffan Gimåker wrote: > > > I tried deriving a new model from TreeModelFilter, TreeDragDest and > > > TreeDragSource, implementing the virtual functions in the latter two, > > > but that did not work -- the virtual functions were never called and I > > > got the GTK assertion below: > > > > > > "Gtk-WARNING **:You must override the default 'drag_data_received' > > > handler on GtkTreeView when using models that don't support the > > > GtkTreeDragDest interface and enabling drag-and-drop. > > [snip] > > > > > Connecting to the signal_drag_data_received() did not make a > > > difference. > > [snip] > > > > It's asking you to override on_drag_data_received() (the default signal > > handler), not just connect to signal_drag_data_received(). Of course, > > that's not obvious. > > > > If that doesn't help, please try to create a simple test case. This > > sounds rather awkward but that might let us help. > > I attached a stripped down test case. It consists of a derived TreeModel > that overrides the row_draggable_vfunc() etc. methods and a class > derived from TreeView, overriding on_drag_data_received(). > > Each of the overridden methods basically just print out the function > name and does little else. > > The good news is that the Gtk-WARNING disappears. The bad news is that > none of the overridden methods in my tree model are called. And even > worse, it also hangs my system. Not in a everything freezes way, but it > messes up the input system, the mouse in particular is left totally > unusable. The "hang" can only be cured with a restart or by killing the > application. To be on the safe side I recommend that you test run it by > doing: > > ./dndtest & sleep 15 && killall dndtest > > /Staffan
Attachment:
signature.asc
Description: This is a digitally signed message part