X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=grc%2Fgui%2FParam.py;h=7c00c1b67f04b73cbc109f5ef9882b869d36eb68;hb=125433fe84507cc84e585c1e06bb804fdb2ce043;hp=b3018dab216a59b43b8539b72abb1a35172585bf;hpb=875c588c3b131195f3e029d1396b4531d3cc6f60;p=debian%2Fgnuradio diff --git a/grc/gui/Param.py b/grc/gui/Param.py index b3018dab..7c00c1b6 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="""\ $encode($param.get_name())""" 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