On Friday 24 March 2006 13:56, Vivia Nikolaidou wrote:
> I tried Drag and Drop on Linux, works fine, other people tried it on
> Windows, works fine too! :) Just you need to have tkdnd installed (Maybe
> add a warning to the user, and a custom path for it in Preferences -
> Others?)
>
> It's just not perfect, as Karel also noticed:
>
> 20:36 < scapor> vivia: I saw for dnd you strip the file:// from the path
> 20:36 < scapor> but in fact you just strpit the 7 first characters
> 20:37 < scapor> is it always likethat ?
> 20:37 < scapor> can't teh fileselector give a smb:// or something ?
> 20:38 <@vivia> scapor: well... find a better idea... strip until indexof
>
> :// or
>
>                something?
> 20:39 < scapor> well .. I dunno :)
> 20:39 < scapor> just cwanted to tell you the idea ;)
> 20:39 <@vivia> scapor: it is an ugly way to do it indeed, but... oh well
>
This indeed is a problem. If you are using the desktop integration plugin with 
KDE (maybe GNOME too), the fileselector can return different protocols 
depending where the file is. Of course Tcl won't be able to open the files. 
So what we could so is check, is the first a /? If yes continue, because this 
was most likely gotten via the tk file selector. Otherwise search for :// and 
see what it is prepended with. If it isn't file://, then print out a error 
that you can only open files from the file system. If it is file://, then get 
rid of it.

This should also probably be done at the level of the plugin.

Btw, what do the file selectors have to do with the drag and drop? Is it that 
different file managers give different paths when using dnd?

-- 
Karol Krizka

Attachment: pgpjn0LFGEksI.pgp
Description: PGP signature

Reply via email to