Skip to content

Commit

Permalink
Improve Addon Manager search
Browse files Browse the repository at this point in the history
This is now a case insensitive search of the name, description
and id fields.

Fixes #12955.
  • Loading branch information
Nick-Hall committed Aug 11, 2023
1 parent 52e43fa commit 1e49f9d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gramps/gui/plug/_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,14 @@ def __filter_func(self, row):
value = model.get_value(status_iter, 0)
if value != -1 and row.addon["s"] != value:
return False
if search_text and search_text not in row.addon["d"]:
return False
if search_text:
search_text = search_text.lower()
if (
search_text not in row.addon["n"].lower()
and search_text not in row.addon["d"].lower()
and search_text not in row.addon["i"].lower()
):
return False
return True

def __on_dialog_button(self, dialog, response_id):
Expand Down

0 comments on commit 1e49f9d

Please sign in to comment.