Hi again,
I've made a simple example which shows the unwanted behaviour mentioned
earlier ... could someone test it and post his/her results ? For me
when dragging something to the list it returns (0,0) for the label,
(1,0) for "First" and None for "Last"
thanks,
Martin
--
Martin Preishuber - Student, ECLiPt Core Member, SysAdmin
http://eclipt.uni-klu.ac.at,
mailto:[EMAIL PROTECTED]
As for the women, though we scorn and flout 'em,
We may live with, but cannot live without 'em.
-- Frederic Reynolds
#!/usr/bin/python
from gtk import *
class clisttest:
def destroy(self, args):
self.win.destroy()
mainquit()
def __init__(self):
self.win = GtkWindow()
self.win.show()
self.win.connect("destroy", self.destroy)
targets = [('text/plain', 0, -1)]
list = GtkCList(1, ["Label"])
list.append(["first"])
list.append(["second"])
list.append(["last"])
list.connect("drag_data_received", self.dragreceivelist)
list.drag_dest_set(DEST_DEFAULT_ALL, targets, GDK.ACTION_COPY)
list.show()
swin = GtkScrolledWindow()
swin.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
swin.add(list)
swin.show()
self.win.add(swin)
self.win.show()
def dragreceivelist(self, clist, context, x, y, data, info, time):
selection = clist.get_selection_info(x, y)
print selection
def main(self):
mainloop()
app = clisttest()
app.main()