add possibility to use ValueRange as ValueEqual Converter
[enigma2.git] / lib / python / Components / Converter / EventName.py
index 919dd3b..b1ec62d 100644 (file)
@@ -5,13 +5,16 @@ class EventName(Converter, object):
        NAME = 0
        SHORT_DESCRIPTION = 1
        EXTENDED_DESCRIPTION = 2
-
+       ID = 3
+       
        def __init__(self, type):
                Converter.__init__(self, type)
                if type == "Description":
                        self.type = self.SHORT_DESCRIPTION
                elif type == "ExtendedDescription":
                        self.type = self.EXTENDED_DESCRIPTION
+               elif type == "ID":
+                       self.type = self.ID
                else:
                        self.type = self.NAME
 
@@ -19,7 +22,7 @@ class EventName(Converter, object):
        def getText(self):
                event = self.source.event
                if event is None:
-                       return "N/A"
+                       return ""
                        
                if self.type == self.NAME:
                        return event.getEventName()
@@ -27,5 +30,7 @@ class EventName(Converter, object):
                        return event.getShortDescription()
                elif self.type == self.EXTENDED_DESCRIPTION:
                        return event.getExtendedDescription()
-                       
+               elif self.type == self.ID:
+                       return str(event.getEventId())
+               
        text = property(getText)