Permalink
Browse files

Minor fixes

  • Loading branch information...
1 parent d4a9daa commit 17f0b7304aafc9ace4e206da9c608f2905844b8a @kyotobay committed Feb 28, 2012
Showing with 17 additions and 16 deletions.
  1. +1 −1 pitivi/application.py
  2. +5 −4 pitivi/clipproperties.py
  3. +1 −1 pitivi/timeline/timeline.py
  4. +1 −2 pitivi/undo/effect.py
  5. +9 −8 pitivi/undo/timeline.py
View
@@ -199,7 +199,7 @@ def _projectManagerClosingProject(self, projectManager, project):
return self.emit("closing-project", project)
def _projectManagerProjectClosed(self, projectManager, project):
- #self.timelineLogObserver.stopObserving(project.timeline)
+ self.timelineLogObserver.stopObserving(project.timeline)
self.projectLogObserver.stopObserving(project)
self.current = None
self.emit("project-closed", project)
View
@@ -350,7 +350,6 @@ def _cleanCache(self, effect):
def addEffectToCurrentSelection(self, bin_desc):
if self.timeline_objects:
- media_type = self.app.effects.getFactoryFromName(bin_desc).media_type
# Trying to apply effect only on the first object of the selection
tlobj = self.timeline_objects[0]
@@ -370,7 +369,9 @@ def _dragDataReceivedCb(self, unused_layout, context, unused_x, unused_y,
def _dragDropCb(self, unused, context, unused_x, unused_y,
unused_timestamp):
if self._factory:
+ self.app.action_log.begin("add effect")
self.addEffectToCurrentSelection(self._factory.effectname)
+ self.app.action_log.commit()
self._factory = None
def _dragLeaveCb(self, unused_layout, unused_context, unused_tstamp):
@@ -654,9 +655,9 @@ def _selectionChangedCb(self, timeline):
self._current_tl_obj = None
self.zoom_scale.set_value(1.0)
self._seeker.flush()
- self.effect = None
- self.set_sensitive(False)
- self._updateBoxVisibility()
+ self.effect = None
+ self.set_sensitive(False)
+ self._updateBoxVisibility()
def _updateBoxVisibility(self):
if self.get_expanded() and self._current_tl_obj:
@@ -1262,7 +1262,7 @@ def keyframe(self, action):
selected = self.timeline.selection.getSelectedTrackObjs()
for obj in selected:
keyframe_exists = False
- position_in_obj = (self._position - obj.start) + obj.in_point
+ position_in_obj = (self._position - obj.get_start()) + obj.get_in_point()
interpolators = obj.getInterpolators()
for value in interpolators:
interpolator = obj.getInterpolator(value)
View
@@ -82,7 +82,7 @@ def getPropChangedFromTrackObj(self, track_effect):
return prop_changed
- def _propertyChangedCb(self, tckobj, gst_element, pspec, unused):
+ def _propertyChangedCb(self, gst_element, pspec, unused):
old_value = self._tracked_effects[tckobj][pspec.name]
new_value = gst_element.get_property(pspec.name)
action = EffectPropertyChanged(tckobj, pspec.name, old_value,
@@ -154,7 +154,6 @@ class TrackEffectRemoved(UndoableAction):
def __init__(self, timeline_object, track_object, properties_watcher):
self.track_object = track_object
self.timeline_object = timeline_object
- self.factory = track_object.factory
self.effect_props = []
self.gnl_obj_props = []
self._properties_watcher = properties_watcher
View
@@ -117,7 +117,7 @@ def __init__(self, layer, timeline_object):
def do(self):
for track_object, track in self.tracks.iteritems():
- track.addTrackObject(track_object)
+ track.add_object(track_object)
self.layer.add_object(self.timeline_object)
self._done()
@@ -135,14 +135,14 @@ def __init__(self, timeline, timeline_object):
for track_object in timeline_object.get_track_objects())
def do(self):
- self.timeline.removeTimelineObject(self.timeline_object, deep=True)
+ self.timeline.remove_object(self.timeline_object)
self._done()
def undo(self):
for track_object, track in self.tracks.iteritems():
- track.addTrackObject(track_object)
+ track.add_object(track_object)
- self.timeline.addTimelineObject(self.timeline_object)
+ self.timeline.add_object(self.timeline_object)
self._undone()
@@ -243,10 +243,11 @@ def startObserving(self, timeline):
def stopObserving(self, timeline):
self._disconnectFromTimeline(timeline)
- for timeline_object in timeline.timeline_objects:
- self._disconnectFromTimelineObject(timeline_object)
- for track_object in timeline_object.track_objects:
- self._disconnectFromTrackObject(track_object)
+ for layer in timeline.get_layers():
+ for timeline_object in layer.get_objects():
+ self._disconnectFromTimelineObject(timeline_object)
+ for track_object in timeline_object.get_track_objects():
+ self._disconnectFromTrackObject(track_object)
def _connectToTimeline(self, timeline):
for layer in timeline.get_layers():

0 comments on commit 17f0b73

Please sign in to comment.