[pitivi] timeline: Use of the new set_snapping_distance method of GESTimeline
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Use of the new set_snapping_distance method of GESTimeline
- Date: Thu, 25 Jul 2013 02:41:35 +0000 (UTC)
commit 0f17f4d59e883e3f6837b8837428686f762342fb
Author: Thibault Saunier <thibault saunier collabora com>
Date: Wed Jul 24 22:40:20 2013 -0400
timeline: Use of the new set_snapping_distance method of GESTimeline
pitivi/timeline/timeline.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 7a2f700..ceba5c3 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1012,8 +1012,7 @@ class Timeline(Gtk.VBox, Zoomable):
ideal_zoom_ratio = float(ruler_width) / timeline_duration_s
nearest_zoom_level = Zoomable.computeZoomLevel(ideal_zoom_ratio)
Zoomable.setZoomLevel(nearest_zoom_level)
- self.bTimeline.props.snapping_distance = \
- Zoomable.pixelToNs(self.app.settings.edgeSnapDeadband)
+ self.bTimeline.set_snapping_distance(Zoomable.pixelToNs(self._settings.edgeSnapDeadband))
# Only do this at the very end, after updating the other widgets.
self.zoomed_fitted = True
@@ -1190,8 +1189,7 @@ class Timeline(Gtk.VBox, Zoomable):
def zoomChanged(self):
if self._settings and self.bTimeline:
# zoomChanged might be called various times before the UI is ready
- self.bTimeline.props.snapping_distance = \
- Zoomable.pixelToNs(self._settings.edgeSnapDeadband)
+ self.bTimeline.set_snapping_distance(Zoomable.pixelToNs(self._settings.edgeSnapDeadband))
self.updateHScrollAdjustments()
@@ -1239,8 +1237,7 @@ class Timeline(Gtk.VBox, Zoomable):
def _snapDistanceChangedCb(self, settings):
if self.bTimeline:
- self.bTimeline.props.snapping_distance = \
- Zoomable.pixelToNs(settings.edgeSnapDeadband)
+ self.bTimeline.set_snapping_distance(Zoomable.pixelToNs(self._settings.edgeSnapDeadband))
def _projectChangedCb(self, app, project, unused_fully_loaded):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]