Bug 89576 now that the wsm saves the page data the pref panel ok handlers don't need to r=caillon sr=alecf

This commit is contained in:
neil%parkwaycc.co.uk 2003-12-19 21:44:02 +00:00
Родитель 6784ccb15c
Коммит bb090e5103
3 изменённых файлов: 3 добавлений и 43 удалений

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

@ -61,25 +61,10 @@
function SwitchPacks()
{
var shouldRemoveFaslFile = false;
//Switch the Content pack if necessary
var oldContentPack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.contentlocale");
var newContentPack;
var selectedItem;
var shouldRemoveFaslFile;
try {
var listbox = document.getElementById("contentPackList");
if (listbox) {
selectedItem = listbox.selectedItems.length ? listbox.selectedItems[0] : null;
if (selectedItem) {
newContentPack = selectedItem.getAttribute("value");
}
} else {
newContentPack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "contentPackList" ).prefvalue;
}
}
catch (e) {}
var newContentPack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "contentPackList" ).prefvalue;
if (newContentPack && (newContentPack != oldContentPack))
{
try {
@ -92,20 +77,7 @@
//Switch the Language pack if necessary
var oldLanguagePack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.locale");
var newLanguagePack;
try {
var languageList = document.getElementById("languagePackList");
if (languageList) {
selectedItem = languageList.selectedItems.length ? languageList.selectedItems[0] : null;
if (selectedItem) {
newLanguagePack = selectedItem.getAttribute("value");
}
} else {
newLanguagePack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "languagePackList" ).prefvalue;
}
}
catch (e) {}
var newLanguagePack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "languagePackList" ).prefvalue;
if (newLanguagePack && (newLanguagePack != oldLanguagePack))
{
try {

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

@ -408,14 +408,6 @@ function lazyAppendFontNames( i )
function saveFontPrefs()
{
// if saveState function is available, assume can call it.
// why is this extra qualification required?!!!!
if( top.hPrefWindow.wsm.contentArea.saveState )
{
saveState();
parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-fonts.xul"] = GetFields();
}
// saving font prefs
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-fonts.xul"];
var pref = parent.hPrefWindow.pref;

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

@ -45,10 +45,6 @@ if ( !( "winHooks" in parent ) ) {
// This function is called when the user presses Ok to close the prefs window.
function onOK() {
try {
// Get updates from dialog if we're displayed.
if ( "GetFields" in window ) {
GetFields();
}
// Update prefs.
parent.winHooks.winhooks.settings = parent.winHooks.prefs;
}