summarylogtreecommitdiffstats
path: root/drop-gnomevfs.patch
blob: 99c0b09d9bb022c275be07ce499748fe9248ee70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
diff -Naur indiv-screenlets-0.1.6.orig/src/Lyrics/LyricsPanel.py indiv-screenlets-0.1.6/src/Lyrics/LyricsPanel.py
--- indiv-screenlets-0.1.6.orig/src/Lyrics/LyricsPanel.py	2011-08-22 08:54:04.000000000 +0200
+++ indiv-screenlets-0.1.6/src/Lyrics/LyricsPanel.py	2012-04-30 18:24:17.030184345 +0200
@@ -942,9 +942,10 @@
 		content = sel_data.get_text()
 		print content
 		if content.startswith("file:///"):
-			import gnomevfs
+			import gio
 			print content
-			path = gnomevfs.get_local_path_from_uri(content)
+			giof = gio.File(content)
+			path = giof.get_path()
 			print path
 			f = open(path.strip(), "r")
 			lyrics = f.read()
diff -Naur indiv-screenlets-0.1.6.orig/src/Lyrics/players/RhythmboxPlayer.py indiv-screenlets-0.1.6/src/Lyrics/players/RhythmboxPlayer.py
--- indiv-screenlets-0.1.6.orig/src/Lyrics/players/RhythmboxPlayer.py	2011-08-22 08:54:04.000000000 +0200
+++ indiv-screenlets-0.1.6/src/Lyrics/players/RhythmboxPlayer.py	2012-04-30 18:02:39.264279698 +0200
@@ -16,7 +16,6 @@
 
 
 import screenlets
-#import gnomevfs
 import utils
 from screenlets.plugins import Rhythmbox
 from player import PlayerEvents
diff -Naur indiv-screenlets-0.1.6.orig/src/Lyrics/players/utils.py indiv-screenlets-0.1.6/src/Lyrics/players/utils.py
--- indiv-screenlets-0.1.6.orig/src/Lyrics/players/utils.py	2011-08-22 08:54:04.000000000 +0200
+++ indiv-screenlets-0.1.6/src/Lyrics/players/utils.py	2012-04-30 18:25:15.818682939 +0200
@@ -15,12 +15,13 @@
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
-import gnomevfs
+import gio
 
 def get_local_path_from_uri(uri):
 	if uri != None and uri != "":
 		try:			
-			local_path = gnomevfs.get_local_path_from_uri(uri)
+			f = gio.File(uri)
+			local_path = f.get_path()
 			#print "converting URI to local_path"
 			return local_path
 		except Exception, e:
@@ -29,7 +30,8 @@
 			print "URI calss: %s" % uri.__class__
 			try:
 				unicodeUri = unicode(str(uri), 'utf-8')
-				local_path = gnomevfs.get_local_path_from_uri(uri)
+				f = gio.File(uri)
+				local_path = f.get_path()
 				return local_path
 			except Exception, e:
 				print e