[pitivi/ges] track: Properly use GES enums instead of hacking around



commit 6ee60049be4076fae71a1b709c3e66295bbf0b45
Author: Thibault Saunier <thibault saunier collabora com>
Date:   Sat Apr 21 13:39:07 2012 -0400

    track: Properly use GES enums instead of hacking around

 pitivi/timeline/track.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index a1d6172..dc5ecbd 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -661,12 +661,11 @@ class TrackControls(gtk.Label, Loggable):
     @staticmethod
     def _getTrackName(track):
         track_name = ""
-        #FIXME check that it is the best way to check the type
-        if track.props.track_type.first_value_name == 'GES_TRACK_TYPE_AUDIO':
+        if track.props.track_type == ges.TRACK_TYPE_AUDIO:
             track_name = _("Audio:")
-        elif track.props.track_type.first_value_name == 'GES_TRACK_TYPE_VIDEO':
+        elif track.props.track_type == ges.TRACK_TYPE_VIDEO:
             track_name = _("Video:")
-        elif track.props.track_type.first_value_name == 'GES_TRACK_TYPE_TEXT':
+        elif track.props.track_type == ges.TRACK_TYPE_TEXT:
             track_name = _("Text:")
         return "<b>%s</b>" % track_name
 



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