Re: "drag_begin" signal behavior



Maxim Koshelev <mdem chat ru> writes:

Hi there,
I'was writting some code to implement DnD from one widget to another
but I've found one problem there:
I can't stop DnD when it begun.
Example:
I need to drag some strings from on list to another (all work fine),
but it's invalid to allow dragging when selection in source list is empty!

Any attempts to call gtk_drag_finish(context,...) from "drag_begin"
signal handler caused "Bad atom" error and exiting.

Any ideas to forbid DnD when selection is empty?

Don't use gtk_drag_source_set(), instead call gtk_drag_begin()
yourself. 

Alternatively, you could remove the drag source when there is
nothing to drag with gtk_drag_source_unset().

Regards,
                                        Owen








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