[pitivi] Reorder LayerControls by type



commit 8f0e080b131674ddd451a4c6f3c275ef29e80c9b
Author: Paul Lange <palango gmx de>
Date:   Tue May 15 13:54:20 2012 -0500

    Reorder LayerControls by type
    
    VideoControls are shown before AudioControls

 pitivi/timeline/timeline.py |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 26dea73..a397647 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -522,6 +522,19 @@ class TimelineControls(gtk.VBox, Loggable):
         audio_control.show()
         video_control.show()
 
+        self._orderControls()
+
+    def _orderControls(self):
+        i = 0
+        j = len(self.get_children()) / 2
+        for child in self.get_children():
+            if isinstance(child, VideoLayerControl):
+                self.reorder_child(child, i)
+                i += 1
+            elif isinstance(child, AudioLayerControl):
+                self.reorder_child(child, j)
+                j += 1
+
     def _layerRemovedCb(self, timeline, layer):
         audio_control = self._track_controls[layer]["audio"]
         video_control = self._track_controls[layer]["video"]



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