From: Ken H. <ke...@ha...> - 2005-05-29 00:32:45
|
Bungee wrote: >Can anyone give me a nudge in the right direction for being able to drag&drop >fileNAMES (not their contents) in to a list using python. I seem to be going >round in circles trying to work this out, and find trying to learn about gtk >*and* python at the same time an extreme uphill struggle :( > > > This should be most of what you need. def __init__(self): ... loading.XDSLoader.__init__(self, ['text/uri-list']) ... def xds_drag_drop(self, widget, context, data, info, time): """Check if the Shift key is pressed or not when Dropping files""" #if context.actions & gtk.gdk.ACTION_COPY: do something return loading.XDSLoader.xds_drag_drop(self, widget, context, data, info, time) def xds_load_uris(self, uris): """Accept files and folders dropped on us""" print >>sys.stderr, uris |