[pitivi: 5/16] Add track-object-added and track-object-removed signals to TimelineObject.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 5/16] Add track-object-added and track-object-removed signals to TimelineObject.
- Date: Wed, 8 Jul 2009 14:37:21 +0000 (UTC)
commit ffd72a236b9ec503d477d4d5cc38810c3c177487
Author: Alessandro Decina <alessandro d gmail com>
Date: Fri Jul 3 17:58:31 2009 +0200
Add track-object-added and track-object-removed signals to TimelineObject.
pitivi/timeline/timeline.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 2adb1c0..5550955 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -81,7 +81,9 @@ class TimelineObject(Signallable, Loggable):
'out-point-changed': ['in-point'],
'media-duration-changed': ['media-duration'],
'priority-changed': ['priority'],
- 'selected-changed' : ['state']
+ 'selected-changed' : ['state'],
+ 'track-object-added': ["track_object"],
+ 'track-object-removed': ["track_object"],
}
DEFAULT_START = 0
@@ -413,6 +415,8 @@ class TimelineObject(Signallable, Loggable):
obj.timeline_object = self
self.track_objects.append(obj)
+ self.emit("track-object-added", obj)
+
def removeTrackObject(self, obj):
"""
Remove the given object from the list of controlled C{TrackObject}.
@@ -430,6 +434,8 @@ class TimelineObject(Signallable, Loggable):
except ValueError:
raise TimelineError()
+ self.emit("track-object-removed", obj)
+
class Selection(Signallable):
"""
A collection of L{TimelineObject}.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]