зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
9fb77755d8
Коммит
ff3bc66025
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче