[pitivi] layer: Show video icon when empty
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] layer: Show video icon when empty
- Date: Wed, 19 Dec 2018 06:03:47 +0000 (UTC)
commit 7e6690e7b0f0158d58bb68d6d5a0eb50145a30a0
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 ef06d2b0..9e0b7a43 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]