summaryrefslogtreecommitdiff
path: root/grc/src/platforms/base
diff options
context:
space:
mode:
Diffstat (limited to 'grc/src/platforms/base')
-rw-r--r--grc/src/platforms/base/Param.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/grc/src/platforms/base/Param.py b/grc/src/platforms/base/Param.py
index 6f512cb87..ebc9977fc 100644
--- a/grc/src/platforms/base/Param.py
+++ b/grc/src/platforms/base/Param.py
@@ -228,6 +228,16 @@ class Param(Element):
def get_type(self): return self.get_parent().resolve_dependencies(self._type)
def is_enum(self): return bool(self.get_options())
+ def __repr__(self):
+ """
+ Get the repr (nice string format) for this param.
+ Just return the value (special case enum).
+ Derived classes can handle complex formatting.
+ @return the string representation
+ """
+ if self.is_enum(): return self.get_option(self.get_value()).get_name()
+ return self.get_value()
+
def get_input_class(self):
"""
Get the graphical gtk class to represent this parameter.