diff options
author | Don Ward | 2010-04-30 16:39:07 -0400 |
---|---|---|
committer | Don Ward | 2010-04-30 16:39:07 -0400 |
commit | 04d3f1954b589656b34298b98e36b8667700d89a (patch) | |
tree | 49f39629b24003f3301e38700a48bb499ecd751b /grc/gui | |
parent | 3ff43f7487b43436cd0f49de80ebff2c1ff1a188 (diff) | |
parent | a301c47751cb61116ae8f49f6b693b3ca6fbadc3 (diff) | |
download | gnuradio-04d3f1954b589656b34298b98e36b8667700d89a.tar.gz gnuradio-04d3f1954b589656b34298b98e36b8667700d89a.tar.bz2 gnuradio-04d3f1954b589656b34298b98e36b8667700d89a.zip |
Merge branch 'master' into udp
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/Param.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/grc/gui/Param.py b/grc/gui/Param.py index b3018dab2..7c00c1b67 100644 --- a/grc/gui/Param.py +++ b/grc/gui/Param.py @@ -1,5 +1,5 @@ """ -Copyright 2007, 2008, 2009 Free Software Foundation, Inc. +Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion is free software; you can redistribute it and/or @@ -135,10 +135,21 @@ PARAM_LABEL_MARKUP_TMPL="""\ <span underline="$underline" foreground="$foreground" font_desc="Sans 9">$encode($param.get_name())</span>""" TIP_MARKUP_TMPL="""\ +######################################## +#def truncate(string) + #set $max_len = 100 + #set $string = str($string) + #if len($string) > $max_len +$('%s...%s'%($string[:$max_len/2], $string[-$max_len/2:]))#slurp + #else +$string#slurp + #end if +#end def +######################################## Key: $param.get_key() Type: $param.get_type() #if $param.is_valid() -Value: $param.get_evaluated() +Value: $truncate($param.get_evaluated()) #elif len($param.get_error_messages()) == 1 Error: $(param.get_error_messages()[0]) #else |