[longomatch] Ignore case in the projects filter
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Ignore case in the projects filter
- Date: Tue, 28 Oct 2014 09:50:37 +0000 (UTC)
commit 9064569877728d6bd3d7daced117fb38e525e7b2
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Oct 21 17:54:25 2014 +0200
Ignore case in the projects filter
LongoMatch.GUI/Gui/Component/ProjectListWidget.cs | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
index 998857c..0cb4dc3 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectListWidget.cs
@@ -156,6 +156,7 @@ namespace LongoMatch.Gui.Component
private bool FilterTree (Gtk.TreeModel model, Gtk.TreeIter iter)
{
+ StringComparison sc = StringComparison.InvariantCultureIgnoreCase;
ProjectDescription project = (ProjectDescription)model.GetValue (iter,
COL_PROJECT_DESCRIPTION);
if (project == null)
@@ -164,15 +165,15 @@ namespace LongoMatch.Gui.Component
if (filterEntry.Text == "")
return true;
- if (project.Title.IndexOf (filterEntry.Text) > -1)
+ if (project.Title.IndexOf (filterEntry.Text, sc) > -1)
return true;
- else if (project.Season.IndexOf (filterEntry.Text) > -1)
+ else if (project.Season.IndexOf (filterEntry.Text, sc) > -1)
return true;
- else if (project.Competition.IndexOf (filterEntry.Text) > -1)
+ else if (project.Competition.IndexOf (filterEntry.Text, sc) > -1)
return true;
- else if (project.LocalName.IndexOf (filterEntry.Text) > -1)
+ else if (project.LocalName.IndexOf (filterEntry.Text, sc) > -1)
return true;
- else if (project.VisitorName.IndexOf (filterEntry.Text) > -1)
+ else if (project.VisitorName.IndexOf (filterEntry.Text, sc) > -1)
return true;
else
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]