[punchagan] search in option name and description in ACE. Fixes #4727
This commit is contained in:
parent
6ce94752d4
commit
0e76e17bcb
|
@ -267,9 +267,19 @@ class AdvancedConfigurationWindow(object):
|
||||||
self.model.append(parent, [name, value, type_])
|
self.model.append(parent, [name, value, type_])
|
||||||
|
|
||||||
def visible_func(self, model, treeiter):
|
def visible_func(self, model, treeiter):
|
||||||
search_string = self.entry.get_text()
|
search_string = self.entry.get_text().lower()
|
||||||
return any(search_string in model[it][C_PREFNAME] for it in
|
for it in tree_model_pre_order(model,treeiter):
|
||||||
tree_model_pre_order(model, treeiter) if model[it][C_TYPE] != '')
|
if model[it][C_TYPE] != '':
|
||||||
|
opt_path = self.get_option_path(model, it)
|
||||||
|
if len(opt_path) == 3:
|
||||||
|
desc = gajim.config.get_desc_per(opt_path[2], opt_path[1],
|
||||||
|
opt_path[0])
|
||||||
|
elif len(opt_path) == 1:
|
||||||
|
desc = gajim.config.get_desc(opt_path[0])
|
||||||
|
if search_string in model[it][C_PREFNAME] or (desc and \
|
||||||
|
search_string in desc.lower()):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
@rate_limit(3)
|
@rate_limit(3)
|
||||||
def on_advanced_entry_changed(self, widget):
|
def on_advanced_entry_changed(self, widget):
|
||||||
|
|
Loading…
Reference in New Issue