[pitivi] Add the active property to TrackObject
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Add the active property to TrackObject
- Date: Wed, 22 Sep 2010 13:43:22 +0000 (UTC)
commit 061358737f18b7f9490437c4f9151f90b1d5958c
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Jul 23 23:29:19 2010 -0400
Add the active property to TrackObject
pitivi/timeline/track.py | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index ec696a4..b9fa3de 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -302,6 +302,7 @@ class TrackObject(Signallable, Loggable):
'priority-changed': ['priority'],
'selected-changed' : ['state'],
'stagger-changed' : ['stagger'],
+ 'active-changed' : ['active'],
}
def __init__(self, factory, stream, start=0,
@@ -453,6 +454,14 @@ class TrackObject(Signallable, Loggable):
start = property(_getStart, setStart)
+ def _getActive(self):
+ return self.gnl_object.props.active
+
+ def setActive(self, active):
+ self.gnl_object.props.active = active
+
+ active = property(_getActive, setActive)
+
def _getDuration(self):
return self.gnl_object.props.duration
@@ -675,6 +684,9 @@ class TrackObject(Signallable, Loggable):
self._public_priority = public_priority
self.emit('priority-changed', public_priority)
+ def _notifyActiveCb(self, obj, pspec):
+ self.emit('active-changed', obj.props.active)
+
def _connectToSignals(self, gnl_object):
gnl_object.connect('notify::start', self._notifyStartCb)
gnl_object.connect('notify::duration', self._notifyDurationCb)
@@ -685,6 +697,8 @@ class TrackObject(Signallable, Loggable):
self._notifyMediaStopCb)
gnl_object.connect('notify::priority',
self._notifyPriorityCb)
+ gnl_object.connect('notify::active',
+ self._notifyActiveCb)
def _disconnectFromSignals(self):
if self.gnl_object:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]