From 3228de29fee8c02f81c54b58959948746be461e9 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 23 Jul 2005 08:04:44 +0000 Subject: [PATCH] filter now works with sub-rows --- src/advanced.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/advanced.py b/src/advanced.py index c2778779c..6c081b1c9 100644 --- a/src/advanced.py +++ b/src/advanced.py @@ -132,7 +132,22 @@ class AdvancedConfigurationWindow: if str is None or str == '': return True # show all name = model.get_value(iter, 0) - if name.find(str) != -1: + # If a child of the iter match, we return True + if model.iter_has_child(iter): + iterC = model.iter_children(iter) + while iterC: + nameC = model.get_value(iterC, 0) + if model.iter_has_child(iterC): + iterCC = model.iter_children(iterC) + while iterCC: + nameCC = model.get_value(iterCC, 0) + if nameCC.find(str) != -1: + return True + iterCC = model.iter_next(iterCC) + elif nameC.find(str) != -1: + return True + iterC = model.iter_next(iterC) + elif name.find(str) != -1: return True return False