Re: Again the dnd from netscape to panel/applets.

>  I didn't fix this before because when I have GTK_DEST_DEFAULT_DROP on the
>  gtm application it works but on the applet it doesn't work. But when I had
>  started to work.
>  So can anyone tell me why this happens? I looked on the source and I don't
>  understand the GTK_DEST_DEFAULT_MOTION.

If you specify GTK_DEST_DEFAULT_MOTION when you call
gtk_drag_dest_set(), it specifies that Gtk+ will use its default drag
motion handlers.  This means that cursor feedback will be presented in
the default way according to the allowed destination actions and the
keyboard modifiers.

If you want to override this behavior by not specifying
GTK_DEST_DEFAULT_MOTION, then you must implement your own drag_motion
handler and you *must* call gdk_drag_status() on your drag context to
tell it which actions are valid at a particular point.

The GNU Midnight Commander uses this technique to do "smart"
validation of drops and present the correct feedback to the user ---
it must present different feedback depending on whether the user is
trying to drop files on a directory or on an executable, for example.
You can look at gscreen.c in mc/gnome to see how this is done.


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