diff options
author | Vincent Vinet <vince.vinet@gmail.com> | 2009-03-25 17:51:58 (GMT) |
---|---|---|
committer | Vincent Vinet <vince.vinet@gmail.com> | 2009-03-25 17:51:58 (GMT) |
commit | 0b7e950b799b6904e4656fe756776ace36a2cf1a (patch) | |
tree | 77334d3056555c7cf14d4c4997333593512c0c6f /src/sugar/tutorius/gtkutils.py | |
parent | 3b8b8f8b45bbb599253f6229ca924d35103e82bc (diff) |
Fix max_depth recursion limit in gtkutils register_signals and add test cases corresponding to the bug
Diffstat (limited to 'src/sugar/tutorius/gtkutils.py')
-rw-r--r-- | src/sugar/tutorius/gtkutils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sugar/tutorius/gtkutils.py b/src/sugar/tutorius/gtkutils.py index c5c1e12..1870dc4 100644 --- a/src/sugar/tutorius/gtkutils.py +++ b/src/sugar/tutorius/gtkutils.py @@ -158,7 +158,11 @@ def register_signals(target, handler, prefix=None, max_depth=None): [p for p in (prefix, target.get_name()) \ if not (p is None or p in IGNORED_WIDGETS)] \ ) - ret += register_signals(child, handler, pre, max_depth-1) + if max_depth is None: + dep = None + else: + dep = max_depth - 1 + ret += register_signals(child, handler, pre, dep) name = ".".join( \ [p for p in (prefix, target.get_name()) \ if not (p is None or p in IGNORED_WIDGETS)] \ |