[pitivi/ges] timeline: Quote the URIs being compared when purging objects



commit 7ee4908d2b4ac0d6a28afb0ee477953fdf80d024
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Tue Apr 24 20:24:31 2012 -0400

    timeline: Quote the URIs being compared when purging objects
    
    This ensures that files with complex paths/URIs get removed
    from the timeline when removing them from the media library.

 pitivi/timeline/timeline.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index e442406..a8ace4a 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -37,7 +37,7 @@ from os.path import join
 from pitivi.check import soft_deps
 from pitivi.effects import AUDIO_EFFECT, VIDEO_EFFECT
 from pitivi.autoaligner import AlignmentProgressDialog
-
+from pitivi.utils.misc import quote_uri
 from pitivi.settings import GlobalSettings
 
 from curve import KW_LABEL_Y_OVERFLOW
@@ -952,11 +952,12 @@ class Timeline(gtk.Table, Loggable, Zoomable):
 
     def purgeObject(self, uri):
         """Remove all instances of a clip from the timeline."""
+        quoted_uri = quote_uri(uri)
         layers = self.timeline.get_layers()
         for layer in layers:
             for tlobj in layer.get_objects():
                 if hasattr(tlobj, "get_uri"):
-                    if tlobj.get_uri() == uri:
+                    if quote_uri(tlobj.get_uri()) == quoted_uri:
                         layer.remove_object(tlobj)
                 else:
                     # TimelineStandardTransition and the like don't have URIs



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