a=bobj, r=matt, bug 24027, beefed up error handling for charsets without lable/title, changed save filter to accept pref IDs >1 characters

This commit is contained in:
jbetak%netscape.com 2000-02-29 21:38:17 +00:00
Родитель d111d58045
Коммит 01f869dea1
1 изменённых файлов: 35 добавлений и 22 удалений

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

@ -62,7 +62,7 @@ function LoadAvailableCharSets()
try {
tit = ccm.GetCharsetTitle(atom);
} catch (ex) {
//tit = str; //ignore charset detectors without a title
tit = str; //don't ignore charset detectors without a title
}
try {
@ -70,7 +70,7 @@ function LoadAvailableCharSets()
visible = false;
} catch (ex) {
visible = true;
dump('Getting invisible for:' + str + ' failed!\n');
//dump('Getting invisible for:' + str + ' failed!\n');
}
} //atom
@ -80,6 +80,9 @@ function LoadAvailableCharSets()
availCharsetDict[i][0] = tit;
availCharsetDict[i][1] = str;
availCharsetDict[i][2] = visible;
if (tit) {}
else dump('Not label for :' + str + ', ' + tit+'\n');
} //str
} //for
@ -88,6 +91,8 @@ function LoadAvailableCharSets()
if (availCharsetDict) for (i = 0; i < availCharsetDict.length; i++) {
try { //let's beef up our error handling for charsets without label / title
if (availCharsetDict[i][2]) {
// Create a treerow for the new charset
@ -116,6 +121,12 @@ function LoadAvailableCharSets()
} //if visible
} //try
catch (ex) {
dump("*** Failed to add Avail. Charset: " + tit + "\n");
} //catch
} //for
//select first item in list box
@ -454,6 +465,8 @@ function Save()
// Iterate through the 'active charsets tree to collect the charsets
// that the user has chosen.
dump('Entering Save() function.\n');
var active_charsets = document.getElementById('active_charsets');
var active_charsets_treeroot = document.getElementById('active_charsets_root');
@ -469,7 +482,7 @@ function Save()
cell = row.firstChild;
charsetid = cell.getAttribute('id');
if (charsetid.length > 4) {
if (charsetid.length > 1) {
num_charsets++;