Author: felix
Date: Fri Mar 20 10:11:05 2009
New Revision: 4887
URL: http://svn.slimdevices.com/jive?rev=4887&view=rev
Log:
Bug: 11211
Description: Change alpha comparator to be case insensitve.
Modified:
7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua
Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua
URL:
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua?rev=4887&r1=4886&r2=4887&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/SimpleMenu.lua Fri Mar
20 10:11:05 2009
@@ -205,7 +205,7 @@
=cut
--]]
function itemComparatorAlpha(a, b)
- return tostring(a.text) < tostring(b.text)
+ return string.lower(tostring(a.text)) < string.lower(tostring(b.text))
end
@@ -222,7 +222,7 @@
local w = a.weight - b.weight
if w == 0 then
- return tostring(a.text) < tostring(b.text)
+ return string.lower(tostring(a.text)) <
string.lower(tostring(b.text))
end
return (w < 0)
end
@@ -244,7 +244,7 @@
local w = a.weight - b.weight
if w == 0 then
- return tostring(a.text) < tostring(b.text)
+ return string.lower(tostring(a.text)) <
string.lower(tostring(b.text))
end
return (w < 0)
else
@@ -290,7 +290,7 @@
if (not a.weights[i+1] or not b.weights[i+1]) and w == 0 then
-- end of the road, weights are the same
if not a.weights[i+1] and not b.weights[i+1] then
- return tostring(a.text) < tostring(b.text)
+ return string.lower(tostring(a.text)) <
string.lower(tostring(b.text))
-- a is the node
elseif not a.weights[i+1] then
return true
@@ -303,7 +303,7 @@
return (w < 0)
-- end of the road, weight is the same
elseif i==x then
- return tostring(a.text) < tostring(b.text)
+ return string.lower(tostring(a.text)) <
string.lower(tostring(b.text))
end
-- if we get here, it's time to examine the next i in the
weights table
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins