[pitivi] Make TimelineControls a public member of Timeline
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Make TimelineControls a public member of Timeline
- Date: Sat, 21 Jul 2012 20:00:07 +0000 (UTC)
commit c3b9629ac0fce60496236baf7a46e97740dc7847
Author: Paul Lange <palango gmx de>
Date: Sun Jul 1 13:38:17 2012 +0200
Make TimelineControls a public member of Timeline
pitivi/timeline/layer.py | 4 ++--
pitivi/timeline/timeline.py | 14 +++++++-------
pitivi/timeline/track.py | 10 +++++-----
3 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index 0b425f5..5f143c7 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -131,10 +131,10 @@ class BaseLayerControl(gtk.Table, Loggable):
def _soloToggledCb(self, button):
if button.get_active():
# Disable all other layers
- self._app.gui.timeline_ui._controls.soloLayer(self._layer)
+ self._app.gui.timeline_ui.controls.soloLayer(self._layer)
else:
# Enable all layers
- self._app.gui.timeline_ui._controls.soloLayer(None)
+ self._app.gui.timeline_ui.controls.soloLayer(None)
def getHeight(self):
return self.get_allocation().height
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 22fdd21..1a6dbf7 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -748,9 +748,9 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.attach(zoom_controls_hbox, 0, 1, 0, 1, yoptions=0, xoptions=gtk.FILL)
# controls for tracks and layers
- self._controls = TimelineControls(self.app)
+ self.controls = TimelineControls(self.app)
controlwindow = gtk.Viewport(None, self.vadj)
- controlwindow.add(self._controls)
+ controlwindow.add(self.controls)
controlwindow.set_size_request(-1, 1)
controlwindow.set_shadow_type(gtk.SHADOW_OUT)
self.attach(controlwindow, 0, 1, 1, 2, xoptions=gtk.FILL)
@@ -1157,7 +1157,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
x = self.hadj.props.value + x
y = self.vadj.props.value + y
- priority = self._controls.getPriorityForY(y)
+ priority = self.controls.getPriorityForY(y)
delta = Zoomable.pixelToNs(x)
obj = self._temp_objects[0]
@@ -1375,7 +1375,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.debug("Setting timeline %s", timeline)
self.delTimeline()
- self._controls.timeline = timeline
+ self.controls.timeline = timeline
self._timeline = timeline
if timeline:
@@ -1414,7 +1414,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
#Remove references to the ges timeline
self._timeline = None
- self._controls.timeline = None
+ self.controls.timeline = None
timeline = property(getTimeline, setTimeline, delTimeline, "The GESTimeline")
@@ -1436,14 +1436,14 @@ class Timeline(gtk.Table, Loggable, Zoomable):
Recalculate the vertical scrollbar depending on the number of layer in
the timeline.
"""
- self.vadj.props.upper = self._controls.get_allocation().height + 50
+ self.vadj.props.upper = self.controls.get_allocation().height + 50
def updateHScrollAdjustments(self):
"""
Recalculate the horizontal scrollbar depending on the timeline duration.
"""
timeline_ui_width = self.get_allocation().width
- controls_width = self._controls.get_allocation().width
+ controls_width = self.controls.get_allocation().width
scrollbar_width = self._vscrollbar.get_allocation().width
contents_size = Zoomable.nsToPixel(self.app.current.timeline.props.duration)
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 58dfe2e..d5d555e 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -209,7 +209,7 @@ class TrackObjectController(Controller):
x = x + self._hadj.get_value()
position = Zoomable.pixelToNs(x)
- priority = self.app.gui.timeline_ui._controls.getPriorityForY(
+ priority = self.app.gui.timeline_ui.controls.getPriorityForY(
y - self._y_offset + self._vadj.get_value())
self._context.setMode(self._getMode())
@@ -600,17 +600,17 @@ class TrackObject(View, goocanvas.Group, Zoomable, Loggable):
track_type = self.element.get_track().props.track_type
# update height, compare with current height to not run into recursion
- new_height = self.app.gui.timeline_ui._controls.getHeightOfLayer(track_type, layer)
+ new_height = self.app.gui.timeline_ui.controls.getHeightOfLayer(track_type, layer)
if self.height != new_height:
self.height = new_height
# get y position for layer
- y = self.app.gui.timeline_ui._controls.getYOfLayer(track_type, layer)
+ y = self.app.gui.timeline_ui.controls.getYOfLayer(track_type, layer)
#priority = self.element.get_timeline_object().get_layer().get_priority()
#y = (self.height + LAYER_SPACING) * priority
# get relative y for audio
if track_type == ges.TRACK_TYPE_AUDIO:
- y -= self.app.gui.timeline_ui._controls.getHeightOfTrack(ges.TRACK_TYPE_VIDEO)
+ y -= self.app.gui.timeline_ui.controls.getHeightOfTrack(ges.TRACK_TYPE_VIDEO)
# Setting new position
self.set_simple_transform(x, y, 1, 0)
@@ -726,7 +726,7 @@ class Track(goocanvas.Group, Zoomable, Loggable):
def getHeight(self):
track_type = self.track.props.track_type
- return self.app.gui.timeline_ui._controls.getHeightOfTrack(track_type)
+ return self.app.gui.timeline_ui.controls.getHeightOfTrack(track_type)
height = property(getHeight)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]