Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 20ef9380dc34e068c540871734002c65 > files > 1

rhythmbox-0.13.3-5.1.mga1.src.rpm

diff -uNr rhythmbox-0.13.3.tmpfiles/plugins/context/context/AlbumTab.py rhythmbox-0.13.3/plugins/context/context/AlbumTab.py
--- rhythmbox-0.13.3.tmpfiles/plugins/context/context/AlbumTab.py	2011-01-16 04:10:40.000000000 -0500
+++ rhythmbox-0.13.3/plugins/context/context/AlbumTab.py	2012-07-13 11:46:47.152644195 -0400
@@ -120,9 +120,9 @@
         self.path = self.plugin.find_file ('tmpl/album-tmpl.html')
         self.loading_path = self.plugin.find_file ('tmpl/loading.html')
         self.album_template = Template (filename = self.path,
-                                        module_directory = '/tmp/context')
+                                        module_directory = self.plugin.tempdir)
         self.loading_template = Template (filename = self.loading_path, 
-                                          module_directory = '/tmp/context')
+                                          module_directory = self.plugin.tempdir)
         self.styles = self.basepath + '/tmpl/main.css'
 
     def album_list_ready (self, ds):
diff -uNr rhythmbox-0.13.3.tmpfiles/plugins/context/context/ArtistTab.py rhythmbox-0.13.3/plugins/context/context/ArtistTab.py
--- rhythmbox-0.13.3.tmpfiles/plugins/context/context/ArtistTab.py	2011-01-16 04:10:40.000000000 -0500
+++ rhythmbox-0.13.3/plugins/context/context/ArtistTab.py	2012-07-13 11:46:47.152644195 -0400
@@ -116,8 +116,8 @@
     def load_tmpl (self):
         self.path = self.plugin.find_file('tmpl/artist-tmpl.html')
         self.loading_path = self.plugin.find_file ('tmpl/loading.html')
-        self.template = Template (filename = self.path, module_directory = '/tmp/context/')
-        self.loading_template = Template (filename = self.loading_path, module_directory = '/tmp/context')
+        self.template = Template (filename = self.path, module_directory = self.plugin.tempdir)
+        self.loading_template = Template (filename = self.loading_path, module_directory = self.plugin.tempdir)
         self.styles = self.basepath + '/tmpl/main.css'
 
     def connect_signals (self):
diff -uNr rhythmbox-0.13.3.tmpfiles/plugins/context/context/__init__.py rhythmbox-0.13.3/plugins/context/context/__init__.py
--- rhythmbox-0.13.3.tmpfiles/plugins/context/context/__init__.py	2011-01-16 04:10:40.000000000 -0500
+++ rhythmbox-0.13.3/plugins/context/context/__init__.py	2012-07-13 11:46:47.152644195 -0400
@@ -26,16 +26,25 @@
 
 # vim:shiftwidth=4:softtabstop=4:expandtab
 
+from tempfile import mkdtemp
+from os.path import isdir
+from shutil import rmtree
+
 import rb, rhythmdb
 import ContextView as cv
 
 class ContextPlugin(rb.Plugin):
+    tempdir = None
+
     def __init__ (self):
         rb.Plugin.__init__ (self)
 
     def activate (self, shell):
+        self.tempdir = mkdtemp(prefix = 'rb-context')
         self.context_view = cv.ContextView (shell, self)
 
     def deactivate(self, shell):
         self.context_view.deactivate(shell)
         del self.context_view
+        if (isdir(self.tempdir)):
+            rmtree(self.tempdir)
diff -uNr rhythmbox-0.13.3.tmpfiles/plugins/context/context/LinksTab.py rhythmbox-0.13.3/plugins/context/context/LinksTab.py
--- rhythmbox-0.13.3.tmpfiles/plugins/context/context/LinksTab.py	2011-01-16 04:10:40.000000000 -0500
+++ rhythmbox-0.13.3/plugins/context/context/LinksTab.py	2012-07-13 11:46:47.152644195 -0400
@@ -105,7 +105,7 @@
         self.images = self.basepath + '/img/links/'
         self.styles = self.basepath + '/tmpl/main.css'
         self.template = Template (filename = self.path, 
-                                  module_directory = '/tmp/context/')
+                                  module_directory = self.plugin.tempdir)
 
         self.file = self.template.render (error      = ds.get_error (),
                                           artist     = ds.get_artist(),
diff -uNr rhythmbox-0.13.3.tmpfiles/plugins/context/context/LyricsTab.py rhythmbox-0.13.3/plugins/context/context/LyricsTab.py
--- rhythmbox-0.13.3.tmpfiles/plugins/context/context/LyricsTab.py	2011-01-16 04:10:40.000000000 -0500
+++ rhythmbox-0.13.3/plugins/context/context/LyricsTab.py	2012-07-13 11:46:47.152644195 -0400
@@ -106,9 +106,9 @@
         self.path = self.plugin.find_file('tmpl/lyrics-tmpl.html')
         self.loading_path = self.plugin.find_file ('tmpl/loading.html')
         self.template = Template (filename = self.path, 
-                                  module_directory = '/tmp/context/')
+                                  module_directory = self.plugin.tempdir)
         self.loading_template = Template (filename = self.loading_path, 
-                                          module_directory = '/tmp/context')
+                                          module_directory = self.plugin.tempdir)
         self.styles = self.basepath + '/tmpl/main.css'
 
     def lyrics_ready (self, ds, entry, lyrics):