mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-10-06 16:09:19 +00:00
Search repositories ignoring case
This commit is contained in:
parent
7e17015566
commit
1c3a2c82e6
|
@ -392,9 +392,14 @@ namespace Gitg
|
|||
row.set_header(before != null ? new Gtk.Separator(Gtk.Orientation.HORIZONTAL) : null);
|
||||
}
|
||||
|
||||
private string normalize(string s)
|
||||
{
|
||||
return s.normalize(-1, NormalizeMode.ALL).casefold();
|
||||
}
|
||||
|
||||
private bool filter(Gtk.ListBoxRow row)
|
||||
{
|
||||
return d_filter_text != null ? ((Row)row).repository_name.contains(d_filter_text) : true;
|
||||
return d_filter_text != null ? normalize(((Row)row).repository_name).contains(normalize(d_filter_text)) : true;
|
||||
}
|
||||
|
||||
private int compare_widgets(Gtk.ListBoxRow a, Gtk.ListBoxRow b)
|
||||
|
|
Loading…
Reference in a new issue