Follow up to bug 293303 rework - if statements into a switch r=neil.parkwaycc.co.uk,sr=bienvenu

This commit is contained in:
bugzilla%standard8.demon.co.uk 2005-08-21 17:06:05 +00:00
Родитель 713b429f0a
Коммит 0e913e97be
2 изменённых файлов: 16 добавлений и 12 удалений

Просмотреть файл

@ -60,14 +60,16 @@ var gSearchAbViewListener = {
},
onCountChanged: function(total) {
var statusText;
if (total == 0)
statusText = gAddressBookBundle.getString("noMatchFound");
else
{
if (total == 1)
switch (total) {
case 0:
statusText = gAddressBookBundle.getString("noMatchFound");
break;
case 1:
statusText = gAddressBookBundle.getString("matchFound");
else
break;
default:
statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]);
break;
}
gStatusText.setAttribute("label", statusText);
}

Просмотреть файл

@ -60,14 +60,16 @@ var gSearchAbViewListener = {
},
onCountChanged: function(total) {
var statusText;
if (total == 0)
statusText = gAddressBookBundle.getString("noMatchFound");
else
{
if (total == 1)
switch (total) {
case 0:
statusText = gAddressBookBundle.getString("noMatchFound");
break;
case 1:
statusText = gAddressBookBundle.getString("matchFound");
else
break;
default:
statusText = gAddressBookBundle.getFormattedString("matchesFound", [total]);
break;
}
gStatusText.setAttribute("label", statusText);
}