зеркало из https://github.com/mozilla/pjs.git
Fix for bug 98476. Add safe save & redundant backup support for prefs.js. r=sfraser, sr=alecf.
This commit is contained in:
Родитель
ec3c533067
Коммит
9446d0c0a8
|
@ -254,7 +254,26 @@ nsPrefWindow.prototype =
|
|||
}
|
||||
}
|
||||
}
|
||||
this.pref.savePrefFile(null);
|
||||
try
|
||||
{
|
||||
this.pref.savePrefFile(null);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var prefUtilBundle = document.getElementById("bundle_prefutilities");
|
||||
var alertText = prefUtilBundle.getString("prefSaveFailedAlert");
|
||||
var titleText = prefUtilBundle.getString("prefSaveFailedTitle");
|
||||
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
|
||||
.getService(Components.interfaces.nsIPromptService);
|
||||
promptService.alert(window, titleText, alertText);
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
dump(e + "\n");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
switchPage:
|
||||
|
|
|
@ -60,6 +60,8 @@
|
|||
|
||||
</script>
|
||||
|
||||
<stringbundle id="bundle_prefutilities"
|
||||
src="chrome://communicator/locale/pref/prefutilities.properties"/>
|
||||
<script type="application/x-javascript" src="chrome://global/content/nsWidgetStateManager.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/nsPrefWindow.js"/>
|
||||
<script type="application/x-javascript" src="chrome://communicator/content/pref/pref-help.js"/>
|
||||
|
|
|
@ -15,3 +15,5 @@ oldTheme=You have selected a theme which was designed for an earlier version of
|
|||
languageAlert=Please restart %brand% to use the new preferred language or region setting.
|
||||
languageTitle=Change Language
|
||||
|
||||
prefSaveFailedAlert=Failed to save the preferences file. Any preference changes will be lost at the end of this session.
|
||||
prefSaveFailedTitle=Save Error
|
||||
|
|
Загрузка…
Ссылка в новой задаче