[pitivi] timeline: Use proper value in debug statement



commit d858e19d2dbb6fa5d43fb09299374fca9e7c2e66
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Dec 17 17:26:58 2013 +0100

    timeline: Use proper value in debug statement

 pitivi/timeline/timeline.py |    8 ++++----
 pitivi/utils/timeline.py    |    7 +------
 2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 05fb855..38f1206 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1086,15 +1086,15 @@ class Timeline(Gtk.VBox, Zoomable, Loggable):
         Set the zoom level so that the entire timeline is in view.
         """
         ruler_width = self.ruler.get_allocation().width
-        # Add Gst.SECOND - 1 to the timeline duration to make sure the
-        # last second of the timeline will be in view.
         duration = 0 if not self.bTimeline else self.bTimeline.get_duration()
-        if duration == 0:
+        if not duration:
             return
 
+        # Add Gst.SECOND - 1 to the timeline duration to make sure the
+        # last second of the timeline will be in view.
         timeline_duration = duration + Gst.SECOND - 1
         timeline_duration_s = int(timeline_duration / Gst.SECOND)
-        self.debug("Adjusting zoom to a timeline duration of %s secs", duration)
+        self.debug("Adjusting zoom to a timeline duration of %s secs", timeline_duration_s)
 
         ideal_zoom_ratio = float(ruler_width) / timeline_duration_s
         nearest_zoom_level = Zoomable.computeZoomLevel(ideal_zoom_ratio)
diff --git a/pitivi/utils/timeline.py b/pitivi/utils/timeline.py
index 623c26e..c612760 100644
--- a/pitivi/utils/timeline.py
+++ b/pitivi/utils/timeline.py
@@ -24,14 +24,9 @@ from gi.repository import GES
 from gi.repository import Gdk
 from gi.repository import Gst
 
-from pitivi.utils.loggable import Loggable
-from pitivi.utils.signal import Signallable
-from pitivi.utils.receiver import receiver, handler
-from pitivi.utils.ui import Point
-
 from pitivi.undo.undo import UndoableAction
+from pitivi.utils.signal import Signallable
 
-#from pitivi.utils.align import AutoAligner
 
 # Selection modes
 SELECT = 0


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