[pitivi/ges: 276/287] Set a default timeout value in the seeker



commit a28fabf51cfccf6b810c42fb072ae1ea4ec0c45e
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Mon Feb 13 16:25:51 2012 -0500

    Set a default timeout value in the seeker

 pitivi/clipproperties.py |    4 ++--
 pitivi/effects.py        |    2 +-
 pitivi/project.py        |    2 +-
 pitivi/render.py         |    2 +-
 pitivi/timeline/ruler.py |    2 +-
 pitivi/utils/playback.py |    5 ++++-
 pitivi/viewer.py         |    2 +-
 7 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 48f24e9..79e55c7 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -167,7 +167,7 @@ class EffectProperties(gtk.Expander, gtk.HBox):
         self._config_ui_h_pos = None
         self._timeline = None
         # We use the seeker to flush the pipeline when needed
-        self._seeker = Seeker(80)
+        self._seeker = Seeker()
 
         self._vcontent = gtk.VPaned()
         self.add(self._vcontent)
@@ -513,7 +513,7 @@ class TransformationProperties(gtk.Expander):
         self.default_values = {}
         self.set_label(_("Transformation"))
         self.set_sensitive(False)
-        self._seeker = Seeker(80)
+        self._seeker = Seeker()
 
         if not "Frei0r" in soft_deps:
             self.builder = gtk.Builder()
diff --git a/pitivi/effects.py b/pitivi/effects.py
index 4b75a88..d2f5cb0 100644
--- a/pitivi/effects.py
+++ b/pitivi/effects.py
@@ -775,7 +775,7 @@ class EffectsPropertiesManager:
         self._current_effect_setting_ui = None
         self._current_element_values = {}
         self.action_log = action_log
-        self._seeker = Seeker(80)
+        self._seeker = Seeker()
 
     def getEffectConfigurationUI(self, effect):
         """
diff --git a/pitivi/project.py b/pitivi/project.py
index acc39de..af381a5 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -462,7 +462,7 @@ class Project(Signallable, Loggable):
 
         self.pipeline = ges.TimelinePipeline()
         self.pipeline.add_timeline(self.timeline)
-        self.seeker = Seeker(80)
+        self.seeker = Seeker()
 
         self.settings = MultimediaSettings()
 
diff --git a/pitivi/render.py b/pitivi/render.py
index 0dce67b..f5c0ec5 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -384,7 +384,7 @@ class RenderDialog(Loggable):
         self.app = app
         self.project = project
         self.system = app.system
-        self._seeker = Seeker(80)
+        self._seeker = Seeker()
         if pipeline != None:
             self._pipeline = pipeline
         else:
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index 092338e..49b6849 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -82,7 +82,7 @@ class ScaleRuler(gtk.DrawingArea, Zoomable, Loggable):
         self.app = instance
         self.need_update = True
 
-        self._seeker = Seeker(80)
+        self._seeker = Seeker()
 
     def _hadjValueChangedCb(self, hadj):
         self.pixmap_offset = self.hadj.get_value()
diff --git a/pitivi/utils/playback.py b/pitivi/utils/playback.py
index 3cf9a33..8ec429f 100644
--- a/pitivi/utils/playback.py
+++ b/pitivi/utils/playback.py
@@ -54,7 +54,10 @@ class Seeker(Signallable):
             cls._instance = super(Seeker, cls).__new__(cls, *args, **kwargs)
         return cls._instance
 
-    def __init__(self, timeout):
+    def __init__(self, timeout=80):
+        """
+        @param timeout (optional): the amount of miliseconds for a seek attempt
+        """
         self.timeout = timeout
         self.pending_seek_id = None
         self.position = None
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index da78e22..733c513 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -860,7 +860,7 @@ class ViewerWidget(gtk.DrawingArea, Loggable):
     def __init__(self, settings=None):
         gtk.DrawingArea.__init__(self)
         Loggable.__init__(self)
-        self.seeker = Seeker(80)
+        self.seeker = Seeker()
         self.settings = settings
         self.box = None
         self.stored = False



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