Re: GTK and KDE compatibility




Somebody (was it Ross Burton ?) had a useful little app to help
debugging this kind
of stuff, by listing the targets which are offered/accepted. I don't
have a link though.
If you find it, please post the link so that we can add it to www.gtk.org.


The following pygtk program does the intended task... I dont know who
actually wrote it.. I think I have got it from some mailing lists some
time back...

#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import gtk

def motion_cb(wid, context, x, y, time):
    context.drag_status(gtk.gdk.ACTION_COPY, time)
    return True

def drop_cb(wid, context, x, y, time):
    l.set_text('\n'.join([str(t) for t in context.targets]))
    return True

w = gtk.Window()
w.set_size_request(200, 150)
w.drag_dest_set(0, [], 0)
w.connect('drag_motion', motion_cb)
w.connect('drag_drop', drop_cb)
w.connect('destroy', lambda w: gtk.main_quit())
l = gtk.Label()
w.add(l)
w.show_all()

gtk.main()

Based on this I had developed some application which worked fine in
Linux but not in windows. The drag and drop in a single application
worked but between applications doesn't work...

BTW, does anybody knows that drag and drop works in windows(between apps)?

Regards,
Santhosh.



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