зеркало из 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()
|
function SwitchPacks()
|
||||||
{
|
{
|
||||||
|
var shouldRemoveFaslFile = false;
|
||||||
//Switch the Content pack if necessary
|
//Switch the Content pack if necessary
|
||||||
var oldContentPack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.contentlocale");
|
var oldContentPack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.contentlocale");
|
||||||
var newContentPack;
|
var newContentPack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "contentPackList" ).prefvalue;
|
||||||
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) {}
|
|
||||||
|
|
||||||
if (newContentPack && (newContentPack != oldContentPack))
|
if (newContentPack && (newContentPack != oldContentPack))
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
@ -92,20 +77,7 @@
|
||||||
|
|
||||||
//Switch the Language pack if necessary
|
//Switch the Language pack if necessary
|
||||||
var oldLanguagePack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.locale");
|
var oldLanguagePack = parent.hPrefWindow.getPref( "localizedstring", "general.useragent.locale");
|
||||||
var newLanguagePack;
|
var newLanguagePack = parent.hPrefWindow.wsm.dataManager.getItemData( "chrome://communicator/content/pref/pref-content.xul", "languagePackList" ).prefvalue;
|
||||||
|
|
||||||
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) {}
|
|
||||||
if (newLanguagePack && (newLanguagePack != oldLanguagePack))
|
if (newLanguagePack && (newLanguagePack != oldLanguagePack))
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -408,14 +408,6 @@ function lazyAppendFontNames( i )
|
||||||
|
|
||||||
function saveFontPrefs()
|
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
|
// saving font prefs
|
||||||
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-fonts.xul"];
|
var dataObject = parent.hPrefWindow.wsm.dataManager.pageData["chrome://communicator/content/pref/pref-fonts.xul"];
|
||||||
var pref = parent.hPrefWindow.pref;
|
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.
|
// This function is called when the user presses Ok to close the prefs window.
|
||||||
function onOK() {
|
function onOK() {
|
||||||
try {
|
try {
|
||||||
// Get updates from dialog if we're displayed.
|
|
||||||
if ( "GetFields" in window ) {
|
|
||||||
GetFields();
|
|
||||||
}
|
|
||||||
// Update prefs.
|
// Update prefs.
|
||||||
parent.winHooks.winhooks.settings = parent.winHooks.prefs;
|
parent.winHooks.winhooks.settings = parent.winHooks.prefs;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче