[Gtk-sharp-list] Drag and drop path
Mike Rhodes <firstname.lastname@example.org>
Mon, 29 Nov 2004 22:01:45 +0000
I use this code:
private static extern IntPtr gnome_vfs_get_local_path_from_uri (string str);
public static string LocalPathFromUri (string uri)
IntPtr p = gnome_vfs_get_local_path_from_uri (uri);
if (p == IntPtr.Zero)
return GLib.Marshaller.PtrToStringGFree (p);
(All credit goes to the Muine code where I found it =) ) I believe
gnome-vfs isn't part of gtk-sharp as of yet, so I'm not sure of
another way to do it.
p.s. btw, if you are thinking of writing a C# music player, I'm also
writing one; perhaps we could team up -- or at least solve some of the
issues that come up -- drop me a line off-list if you are interested!
On Mon, 29 Nov 2004 19:08:26 +0100, Christian Rudh
> When drop a file on my application i get the URL in the following
> To be able to pass it on to Gst# (for example) I have to remove the
> file:// part and replace %20 with spaces (that goes for other special
> characters to). Is there any simple way to decode the string to a normal
> Unix path? Like the System.Web.HttpUtility.HTMLDecode that MS .NET has?
"One should not aim at being possible to
understand but at being impossible to
misunderstand." - Quintilian