mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Bug 337390: Session restore dialog is scary / confusing. Also fixes bug 342765 (wrong button order in the session restore dialog), patch by Ryan Flint <rflint@dslr.net>, ui-r=beltzner, r=mconnor for the button ordering change
This commit is contained in:
parent
39df89db5e
commit
658e559208
@ -271,20 +271,22 @@ SessionStartup.prototype = {
|
||||
// create prompt strings
|
||||
var ssStringBundle = this._getStringBundle("chrome://browser/locale/sessionstore.properties");
|
||||
var restoreTitle = ssStringBundle.formatStringFromName("restoreTitle", [brandShortName], 1);
|
||||
var restoreText = ssStringBundle.formatStringFromName("restoreText", [brandShortName], 1);
|
||||
var restoreText = ssStringBundle.formatStringFromName("restoredText", [brandShortName], 1);
|
||||
var buttonTitle = ssStringBundle.GetStringFromName("buttonTitle");
|
||||
var cancelTitle = ssStringBundle.GetStringFromName("cancelTitle");
|
||||
|
||||
var promptService = Cc["@mozilla.org/embedcomp/prompt-service;1"].
|
||||
getService(Ci.nsIPromptService);
|
||||
|
||||
// set the buttons that will appear on the dialog
|
||||
var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +
|
||||
promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_0;
|
||||
var flags = promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0 +
|
||||
promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_1 +
|
||||
promptService.BUTTON_POS_0_DEFAULT;
|
||||
|
||||
var buttonChoice = promptService.confirmEx(null, restoreTitle, restoreText,
|
||||
flags, null, buttonTitle, null,
|
||||
flags, buttonTitle, cancelTitle, null,
|
||||
null, {});
|
||||
recover = (buttonChoice == 1);
|
||||
recover = (buttonChoice == 0);
|
||||
}
|
||||
}
|
||||
catch (ex) { dump(ex + "\n"); } // if the prompt fails, recover anyway
|
||||
|
@ -1,3 +1,4 @@
|
||||
restoreTitle= %S - Session Restore
|
||||
restoreText=%S has recovered from a serious error. One of the pages you were viewing may have caused the problem, so you may experience further problems if you continue with the previous browsing session.
|
||||
restoreTitle= %S - Restore Previous Session
|
||||
restoredText=%S experienced a serious error, and your last session closed unexpectedly. You can restore the tabs and windows from your previous session, or start a new session if the problem continues.
|
||||
buttonTitle=Restore Session
|
||||
cancelTitle=Start New Session
|
||||
|
Loading…
Reference in New Issue
Block a user