Manually refuse/accept notebook tab drop



Hi, I'm having some problems with the notebook set_tab_detachable from gtk 2.10.

If I set
book.drag_dest_set(gtk.DEST_DEFAULT_MOTION, [("GTK_NOTEBOOK_TAB", gtk.TARGET_SAME_APP, 0xbadbeef)], 
gtk.gdk.ACTION_MOVE)
on my notebook, I don't recieve any "drag-drop" events.

If I set the same group_id on the two notebooks, I do get "drag-drop" events,
but the tab is also moved from the first book the seccond.

I don't want this to happen autoamtically, as I some times need to refuse the
tab drop, or do other things, like but it in a new notebook besides the one
dropped upon.

Even if I connect to drag-drop and drag-data-received and try to stop them with
drag_context.finish, the tab still gets moved.


Do anybody know if such manually decicion making is possible with the current API,
or I have to write my own detaching code? (which then probably isn't going to look
as good, with a drag icon of the tab, as the built in code)

-- 
Best Regards,
Med Venlig Hilsen,
Thomas




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