last-exit r161 - in trunk: . src
- From: bhale svn gnome org
- To: svn-commits-list gnome org
- Subject: last-exit r161 - in trunk: . src
- Date: Sun, 24 Feb 2008 14:28:52 +0000 (GMT)
Author: bhale
Date: Sun Feb 24 14:28:52 2008
New Revision: 161
URL: http://svn.gnome.org/viewvc/last-exit?rev=161&view=rev
Log:
* Bug #465549:
Another crash on matching strings on search. Patch from Bob Mauchin.
Modified:
trunk/ChangeLog
trunk/src/FindStation.cs
trunk/src/TagView.cs
Modified: trunk/src/FindStation.cs
==============================================================================
--- trunk/src/FindStation.cs (original)
+++ trunk/src/FindStation.cs Sun Feb 24 14:28:52 2008
@@ -460,9 +460,11 @@
string name = get_node_text (t_node, "name");
int id = Int32.Parse (get_node_text (t_node, "id"));
- NumberFormatInfo match_fmt = new NumberFormatInfo();
- match_fmt.NumberDecimalSeparator = ".";
- double match = Double.Parse (get_node_text (t_node, "match"), match_fmt);
+ double match = 0;
+ if (get_node_text (t_node, "match") != "") {
+ CultureInfo match_fmt = new CultureInfo("", false);
+ match = Double.Parse (get_node_text (t_node, "match"), match_fmt);
+ }
Tag t = new Tag (id, name, match);
tags.Add (t);
Modified: trunk/src/TagView.cs
==============================================================================
--- trunk/src/TagView.cs (original)
+++ trunk/src/TagView.cs Sun Feb 24 14:28:52 2008
@@ -45,7 +45,10 @@
}
foreach (Tag t in value) {
- string pretty = t.Name + String.Format(Catalog.GetString("\n<span size=\"smaller\">Relevance: {0}%</span>"),(t.Match * 100));
+ string pretty = t.Name;
+ if (t.Match != 0) {
+ pretty = t.Name + String.Format(Catalog.GetString("\n<span size=\"smaller\">Relevance: {0}%</span>"),(t.Match * 100));
+ }
tagstore.AppendValues (t.ID, t.Name, t.Match, pretty);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]