зеркало из https://github.com/mono/mail-archives.git
97 строки
3.1 KiB
HTML
97 строки
3.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Drag and drop path
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:Mike%20Rhodes%20%3Cmike.rhodes%40gmail.com%3E">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="005157.html">
|
|
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Drag and drop path
|
|
</H1>
|
|
<B>Mike Rhodes
|
|
</B>
|
|
<A HREF="mailto:Mike%20Rhodes%20%3Cmike.rhodes%40gmail.com%3E"
|
|
TITLE="[Gtk-sharp-list] Drag and drop path">Mike Rhodes <mike.rhodes@gmail.com>
|
|
</A><BR>
|
|
<I>Mon, 29 Nov 2004 22:01:45 +0000</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="005157.html">[Gtk-sharp-list] Drag and drop path
|
|
</A></li>
|
|
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5159">[ date ]</a>
|
|
<a href="thread.html#5159">[ thread ]</a>
|
|
<a href="subject.html#5159">[ subject ]</a>
|
|
<a href="author.html#5159">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>I use this code:
|
|
|
|
[DllImport ("libgnomevfs-2.dll")]
|
|
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 null;
|
|
else
|
|
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.
|
|
|
|
Mike.
|
|
|
|
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
|
|
<<A HREF="mailto:lists-christian@rudh.se">lists-christian@rudh.se</A>> wrote:
|
|
><i> Hi
|
|
</I>><i>
|
|
</I>><i> When drop a file on my application i get the URL in the following
|
|
</I>><i> format:
|
|
</I>><i>
|
|
</I>><i> <A HREF="file:///home/user/song%20X.mp3">file:///home/user/song%20X.mp3</A>
|
|
</I>><i>
|
|
</I>><i> To be able to pass it on to Gst# (for example) I have to remove the
|
|
</I>><i> file:// part and replace %20 with spaces (that goes for other special
|
|
</I>><i> characters to). Is there any simple way to decode the string to a normal
|
|
</I>><i> Unix path? Like the System.Web.HttpUtility.HTMLDecode that MS .NET has?
|
|
</I>
|
|
|
|
--
|
|
"One should not aim at being possible to
|
|
understand but at being impossible to
|
|
misunderstand." - Quintilian
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="005157.html">[Gtk-sharp-list] Drag and drop path
|
|
</A></li>
|
|
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#5159">[ date ]</a>
|
|
<a href="thread.html#5159">[ thread ]</a>
|
|
<a href="subject.html#5159">[ subject ]</a>
|
|
<a href="author.html#5159">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|