[pitivi/1.0] layer: Show video icon when empty



commit d1a2f07dfa805936166496a42feb68e0544381be
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Dec 18 23:50:40 2018 +0100

    layer: Show video icon when empty

 pitivi/timeline/layer.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index 1a7864eb..e82dd873 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -218,9 +218,11 @@ class LayerControls(Gtk.EventBox, Loggable):
     def update(self, media_types):
         self.props.height_request = self.ges_layer.ui.props.height_request
 
-        if media_types & GES.TrackType.VIDEO:
+        if media_types & GES.TrackType.VIDEO or not media_types:
+            # The layer has video or is empty.
             icon = "video-x-generic"
         else:
+            # The layer has audio and nothing else.
             icon = "audio-x-generic"
 
         if icon != self.__icon:
@@ -228,8 +230,6 @@ class LayerControls(Gtk.EventBox, Loggable):
             self.menubutton.props.image = image
             self.__icon = icon
 
-        # TODO: Use media_types to determine which controls to show.
-
 
 class Layer(Gtk.Layout, Zoomable, Loggable):
     """Container for the clips widgets of a layer."""


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