summaryrefslogtreecommitdiff
path: root/gr-wxgui
diff options
context:
space:
mode:
authorJohnathan Corgan2009-09-15 08:41:21 -0700
committerJohnathan Corgan2009-09-15 08:41:21 -0700
commit9d2c4b0625dac26c86974453518aa5b034fc849e (patch)
treebfed69062238116588c5160e4a3a98959302f311 /gr-wxgui
parent2f663bacb14822efc95da006da26fa67f63ab315 (diff)
parent3fb876217316bb8ac9a59fffc75bb3c523ae1704 (diff)
downloadgnuradio-9d2c4b0625dac26c86974453518aa5b034fc849e.tar.gz
gnuradio-9d2c4b0625dac26c86974453518aa5b034fc849e.tar.bz2
gnuradio-9d2c4b0625dac26c86974453518aa5b034fc849e.zip
Merge branch 'grc' of http://gnuradio.org/git/jblum into master
* 'grc' of http://gnuradio.org/git/jblum: fixed issue where entry boxes lost focus (mishandling of hide changing) fixed bool converter in forms to work with non bool options tweaked key handling callbacks fix for uniformity convention with gtk signal name strings Simply Actions module imports, using module prefix. Reworked actions api and actions objects: Move key press extraction logic into actions module. rename variable, use keysyms in props dialog use the keymap's translate_keyboard_state, use the key value rather than name ignore irrelevant modifiers and events pending properties dialog with ok/cancel buttons
Diffstat (limited to 'gr-wxgui')
-rw-r--r--gr-wxgui/src/python/forms/converters.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gr-wxgui/src/python/forms/converters.py b/gr-wxgui/src/python/forms/converters.py
index 3cc13466a..db14d2752 100644
--- a/gr-wxgui/src/python/forms/converters.py
+++ b/gr-wxgui/src/python/forms/converters.py
@@ -72,12 +72,14 @@ class bool_converter(abstract_converter):
self._true = true
self._false = false
def external_to_internal(self, v):
- return bool(v)
+ if v == self._true: return True
+ if v == self._false: return False
+ raise Exception, 'Value "%s" is not a possible option.'%v
def internal_to_external(self, v):
if v: return self._true
else: return self._false
def help(self):
- return "Value must be cast-able to type bool."
+ return "Value must be in (%s, %s)."%(self._true, self._false)
class eval_converter(abstract_converter):
"""