wrap prefs with try and catch. turn back on ComposeLoad() call.

This commit is contained in:
sspitzer%netscape.com 1999-07-27 21:24:57 +00:00
Родитель 56eefb0d35
Коммит 5297ce6223
2 изменённых файлов: 13 добавлений и 5 удалений

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

@ -29,8 +29,18 @@ var prefs = Components.classes["component://netscape/preferences"].getService();
if (prefs) { if (prefs) {
prefs = prefs.QueryInterface(Components.interfaces.nsIPref); prefs = prefs.QueryInterface(Components.interfaces.nsIPref);
if (prefs) { if (prefs) {
update_compose_title_as_you_type = prefs.GetBoolPref("mail.update_compose_title_as_you_type"); try {
other_header = prefs.CopyCharPref("mail.compose.other.header"); update_compose_title_as_you_type = prefs.GetBoolPref("mail.update_compose_title_as_you_type");
}
catch (ex) {
dump("failed to get the mail.update_compose_title_as_you_type pref\n");
}
try {
other_header = prefs.CopyCharPref("mail.compose.other.header");
}
catch (ex) {
dump("failed to get the mail.compose.other.header pref\n");
}
} }
} }

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

@ -30,12 +30,10 @@ Rights Reserved.
<!DOCTYPE window SYSTEM "chrome://messengercompose/locale/messengercompose.dtd"> <!DOCTYPE window SYSTEM "chrome://messengercompose/locale/messengercompose.dtd">
<!-- removed, function must exist to use here
onload="ComposeLoad()"
-->
<window xmlns:html="http://www.w3.org/TR/REC-html40" <window xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onunload="ComposeUnload()" onunload="ComposeUnload()"
onload="ComposeLoad()"
width="640" height="480" width="640" height="480"
title="&msgComposeWindow.title;" title="&msgComposeWindow.title;"
align="vertical"> align="vertical">