зеркало из https://github.com/mozilla/gecko-dev.git
Bug 350738: use localeCompare for the search engine ordering, r=mconnor
This commit is contained in:
Родитель
a52e294ae9
Коммит
4f953a4b8d
|
@ -165,8 +165,15 @@
|
|||
</property>
|
||||
|
||||
<property name="value"
|
||||
onget="return this._textbox.value;"
|
||||
onset="this._textbox.value = val; return val;"/>
|
||||
onget="return this._textbox.value;">
|
||||
<setter><![CDATA[
|
||||
if (val)
|
||||
this._textbox.value = val;
|
||||
else
|
||||
this._textbox._displayCurrentEngine();
|
||||
return val;
|
||||
]]></setter>
|
||||
</property>
|
||||
|
||||
<method name="focus">
|
||||
<body><![CDATA[
|
||||
|
|
|
@ -2390,11 +2390,7 @@ SearchService.prototype = {
|
|||
alphaEngines.push(this._engines[engine.name]);
|
||||
}
|
||||
alphaEngines = alphaEngines.sort(function (a, b) {
|
||||
if (a.name < b.name)
|
||||
return -1;
|
||||
if (a.name > b.name)
|
||||
return 1;
|
||||
return 0;
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
this._sortedEngines = this._sortedEngines.concat(alphaEngines);
|
||||
},
|
||||
|
@ -2565,7 +2561,7 @@ SearchService.prototype = {
|
|||
if (bIdx)
|
||||
return 1;
|
||||
|
||||
return a.name < b.name ? -1 : 1;
|
||||
return a.name.localeCompare(b.name);
|
||||
}
|
||||
engines.sort(compareEngines);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче