[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Default icon in treeview DnD



Kristian Rietveld wrote:

> On Tue, Aug 26, 2008 at 10:55 PM, Jeffrey Barish
> <jeff_barish earthlink net> wrote:
>> Until this morning, whenever I dragged a row to a new location in the
>> same
>> treeview, the drag icon would look like the original row.  I still get
>> that
>> icon when I drag from another treeview to the one in question.  Is that
>> icon considered to be the default?  Now the icon that I get looks like a
>> page of text with the top right corner dog-eared.  I'm not aware of
>> making any changes to the code that would account for the change in
>> appearance. Any suggestion how to get back the original behavior?
> 
> Did you override the drag-begin signal or stop using
> gtk_tree_view_enable_model_drag_source()?  These are both possible
> causes for not getting an image of the row as drag icon.

I call gtk_drag_begin for a drag from tv2 to itself.  However, I do not
handle the signal.  I call gtk_tree_view_enable_model_drag_source for a
drag from tv1 to tv2 (the drag that works correctly).  I tried changing the
code for the drag from tv1 to tv2 so that it also uses
gtk_tree_view_enable_model_drag_source (which defeats some of the
functionality I need) instead of gtk_drag_begin.  I still get the wrong
icon for that drag.


In examining my code, I noticed that I am specifying targets like this:

('tv1_row', GTK_TARGET_SAME_APP, 1)

I have the identical specification for source and destination.  However,
every example I see has targets that look like this:

('tv1_row', 0, 1)

Sometimes the source target looks the same and sometimes it looks like my
first example (in which case the source and destination targets do not
match).  Moreover, 0 isn't even a valid value for the second parameter.  It
seems as if the second parameter doesn't matter.  Is that conclusion
correct?
-- 
Jeffrey Barish



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]