[pitivi] timeline: Properly update horizontal schrollbar when timeline duration changes
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Properly update horizontal schrollbar when timeline duration changes
- Date: Sat, 19 May 2012 18:04:32 +0000 (UTC)
commit a6c53bab95d7ea2fcb15112455ea1e3ac22949cd
Author: Thibault Saunier <thibault saunier collabora com>
Date: Fri May 18 15:11:34 2012 -0400
timeline: Properly update horizontal schrollbar when timeline duration changes
pitivi/timeline/timeline.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 797a4b6..271c28e 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1290,6 +1290,8 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self._layerRemovedCb))
self._layer_sig_ids.append(timeline.connect("notify::update",
self._timelineUpdateChangedCb))
+ self._layer_sig_ids.append(timeline.connect("notify::duration",
+ self._timelineDurationChangedCb))
# Make sure to set the current layer in use
self._layerAddedCb(None, None)
@@ -1307,7 +1309,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
for sigid in self._layer_sig_ids:
self._timeline.disconnect(sigid)
- # clear dictionaries
+ # clear list
self._layer_sig_ids = []
#Remove references to the ges timeline
@@ -1316,6 +1318,9 @@ class Timeline(gtk.Table, Loggable, Zoomable):
timeline = property(getTimeline, setTimeline, delTimeline, "The GESTimeline")
+ def _timelineDurationChangedCb(self, timeline, unused_duration):
+ self.updateHScrollAdjustments()
+
def _timelineUpdateChangedCb(self, unused, unsued2=None):
if self.zoomed_fitted is True:
self._setBestZoomRatio()
@@ -1561,6 +1566,4 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.app.current.seeker.seek(timeline.props.duration)
if self.zoomed_fitted is True:
self._setBestZoomRatio()
- else:
- self.updateHScrollAdjustments()
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]