Bug 337475: Add confirm dialog for removing all passwords, patch by Peter Weilbacher <mozilla@Weilbacher.org>, r=Kairo for locale, r=CTho for content and sr=Neil.

This commit is contained in:
ajschult%verizon.net 2006-08-19 19:31:13 +00:00
Родитель e7c871990e
Коммит f1c995c1fa
2 изменённых файлов: 14 добавлений и 0 удалений

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

@ -331,6 +331,18 @@ function DeleteSignon() {
} }
function DeleteAllSignons() { function DeleteAllSignons() {
var prompter = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
// Confirm the user wants to remove all passwords
var dummy = { value: false };
if (prompter.confirmEx(window,
kSignonBundle.getString("removeAllPasswordsTitle"),
kSignonBundle.getString("removeAllPasswordsPrompt"),
prompter.STD_YES_NO_BUTTONS + prompter.BUTTON_POS_1_DEFAULT,
null, null, null, null, dummy) == 1) // 1 == "No" button
return;
DeleteAllFromTree(signonsTree, signonsTreeView, DeleteAllFromTree(signonsTree, signonsTreeView,
signons, deletedSignons, signons, deletedSignons,
"removeSignon", "removeAllSignons"); "removeSignon", "removeAllSignons");

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

@ -3,3 +3,5 @@ close=Close
hidePasswords=Hide Passwords hidePasswords=Hide Passwords
showPasswords=Show Passwords showPasswords=Show Passwords
noMasterPasswordPrompt=Are you sure you wish to show your passwords? noMasterPasswordPrompt=Are you sure you wish to show your passwords?
removeAllPasswordsPrompt=Are you sure you wish to remove all passwords?
removeAllPasswordsTitle=Remove all passwords