[pitivi] track: deactivate priority synchronization for now. ui.timelinecontrols: deactivate track expander.



commit 1f838a94141ee35f75c7edbed068746e7d9624bf
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Sun Mar 15 01:43:27 2009 -0700

    track: deactivate priority synchronization for now. ui.timelinecontrols: deactivate track expander.
---
 pitivi/timeline/timeline.py   |    4 ++--
 pitivi/timeline/track.py      |    9 +++++----
 pitivi/ui/timelinecontrols.py |    7 +++++++
 3 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 0ff1fa2..3ba6d3e 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -171,8 +171,8 @@ class TimelineObject(object, Signallable):
         if not self.track_objects:
             raise TimelineError()
 
-        for track_object in self.track_objects:
-            track_object.setObjectPriority(priority)
+        #for track_object in self.track_objects:
+        #    track_object.setObjectPriority(priority)
 
         self.emit('priority-changed', priority)
 
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 52d59cb..2c27272 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -168,10 +168,11 @@ class TrackObject(object, Signallable):
         return self.gnl_object.props.priority
 
     def setPriority(self, priority):
-        if self.timeline_object is not None:
-            self.timeline_object.setPriority(priority)
-        else:
-            self.setObjectPriority(priority)
+        #if self.timeline_object is not None:
+        #    self.timeline_object.setPriority(priority)
+        #else:
+        #    self.setObjectPriority(priority)
+        self.setObjectPriority(priority)
 
     def setObjectPriority(self, priority):
         self.gnl_object.props.priority = priority
diff --git a/pitivi/ui/timelinecontrols.py b/pitivi/ui/timelinecontrols.py
index f1bc8ee..70a4c37 100644
--- a/pitivi/ui/timelinecontrols.py
+++ b/pitivi/ui/timelinecontrols.py
@@ -27,6 +27,7 @@ class TrackControls(gtk.Expander):
         gtk.Expander.__init__(self, track_name(track))
         self.props.use_markup = True
         self.set_expanded(track.expanded)
+        self.set_sensitive(False)
         self.track = track
         self.set_size_request(TRACK_CONTROL_WIDTH, LAYER_HEIGHT_EXPANDED)
 
@@ -35,6 +36,12 @@ class TrackControls(gtk.Expander):
 
     track = receiver()
 
+    @handler(track, "max-priority-changed")
+    def _maxPriorityChanged(self, track):
+        self.set_size_request(TRACK_CONTROL_WIDTH, (1 +
+            self.track.max_priority) * (LAYER_HEIGHT_EXPANDED +
+            LAYER_SPACING))
+
     @handler(track, "expanded-changed")
     def _expandedChanged(self, track):
         if self.track.expanded:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]