[gnoduino] use urllib to handle file uri in recent items



commit 70374d42cdeb128351203fe6eb698c119e9bdf9f
Author: Lucian Langa <lucilanga gnome org>
Date:   Sun Mar 4 23:24:30 2012 +0100

    use urllib to handle file uri in recent items

 src/ui.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/ui.py b/src/ui.py
index 8939dea..bb1b0b6 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -26,6 +26,7 @@ import select
 import shutil
 import signal
 import urlparse
+import urllib
 
 import locale
 import gettext
@@ -483,7 +484,7 @@ def stopSpinner():
 
 
 def addRecentItem(manager, f):
-	uri = gnomevfs.get_uri_from_local_path(f)
+	uri = "file://" + urllib.pathname2url(f)
 	mime = misc.get_mime_type(file(f).read())
 	if mime:
 		data = { 'mime_type': mime, 'app_name' : "gnoduino", 'app_exec' : "gnoduino" }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]