[prefwindow] fix for mac prefwindow startup crasher, mail bool-radio pref functionality hookup

This commit is contained in:
rgoodger%ihug.co.nz 2000-01-07 12:05:09 +00:00
Родитель 9b7089a0ca
Коммит 1e5ae7141b
2 изменённых файлов: 6 добавлений и 13 удалений

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

@ -66,7 +66,7 @@ function goEditCardDialog(abURI, card, okCallback)
function goPreferences(id, pane) function goPreferences(id, pane)
{ {
//if( !top.goPrefWindow ) // XXXX commenting out for now until we find a way to duplicate this. //if( !top.goPrefWindow ) // XXXX commenting out for now until we find a way to duplicate this.
top.goPrefWindow = window.openDialog("chrome://pref/content/pref.xul","PrefWindow", "chrome,modal=yes,resizable=yes", pane); top.goPrefWindow = window.openDialog("chrome://pref/content/pref.xul","PrefWindow", "chrome,modal=no,resizable=yes", pane);
} }

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

@ -129,19 +129,10 @@ function WSM_SavePageData( currentPageTag, optAttributes, exclElements, inclElem
} }
} }
} }
else if( formElement.getAttribute("type") && formElement.type.toLowerCase() == "checkbox" ) { else if( formElement.getAttribute("type") && ( formElement.type.toLowerCase() == "checkbox" || formElement.type.toLowerCase() == "radio" ) ) {
// XXX 11/04/99 // XXX 11/04/99
this.AddAttributes( formElement, elementEntry, "checked", optAttributes ); this.AddAttributes( formElement, elementEntry, "checked", optAttributes );
} }
else if( formElement.getAttribute("type") && formElement.type.toLowerCase() == "radio" ) {
if( formElement.getAttribute("preftype").toLowerCase() == "bool" ) {
if( formElement.getAttribute("checked") == true )
this.AddAttributes( formElement, elementEntry, "prefindex", optAttributes );
}
else {
this.AddAttributes( formElement, elementEntry, "checked", optAttributes );
}
}
else if( formElement.type == "text" && else if( formElement.type == "text" &&
formElement.getAttribute( "datatype" ) == "nsIFileSpec" && formElement.getAttribute( "datatype" ) == "nsIFileSpec" &&
formElement.value ) { formElement.value ) {
@ -213,12 +204,14 @@ function WSM_SetPageData( currentPageTag, hasExtraAttributes )
if( formElement.type.toLowerCase() == "checkbox" || formElement.type.toLowerCase() == "radio" ) { if( formElement.type.toLowerCase() == "checkbox" || formElement.type.toLowerCase() == "radio" ) {
if( value == undefined ) if( value == undefined )
formElement.checked = formElement.defaultChecked; formElement.checked = formElement.defaultChecked;
else { else
formElement.checked = value;
/* oops.. appears we've reimplemented 'reversed'. this will be why its not working for alecf.
if( formElement.getAttribute( "reversed" ) ) if( formElement.getAttribute( "reversed" ) )
formElement.checked = !value; formElement.checked = !value;
else else
formElement.checked = value; formElement.checked = value;
} */
} }
else if( formElement.type.toLowerCase() == "text" && else if( formElement.type.toLowerCase() == "text" &&
formElement.getAttribute( "datatype" ) == "nsIFileSpec" ) { formElement.getAttribute( "datatype" ) == "nsIFileSpec" ) {