mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-28 04:35:33 +00:00
Bug 420595 - ""you have chosen to open" dialog uses wrong icon" (Change the accept button icon to a save one when the only choice is "save") [p=frnchfrgg-mozbugs@altern.org (RIVAUD Julien [_FrnchFrgg_]) r=sdwilsh a1.9=damons]
This commit is contained in:
parent
dad29c2c8a
commit
58195cf54b
@ -436,13 +436,18 @@ nsUnknownContentTypeDialog.prototype = {
|
||||
mimeType == "application/x-msdownload" ||
|
||||
this.mLauncher.targetFileIsExecutable);
|
||||
if (shouldntRememberChoice && !this.openWithDefaultOK()) {
|
||||
let acceptButton = this.mDialog.document.getButton("accept");
|
||||
// change the accept button icon to a save one
|
||||
acceptButton.setAttribute("icon", "save");
|
||||
// change button labels
|
||||
acceptButton.label =
|
||||
this.dialogElement("strings").getString("unknownAccept.label");
|
||||
this.mDialog.document.documentElement.getButton("cancel").label =
|
||||
this.dialogElement("strings").getString("unknownCancel.label");
|
||||
// hide featured choice
|
||||
this.mDialog.document.getElementById("normalBox").collapsed = "true";
|
||||
// show basic choice
|
||||
this.mDialog.document.getElementById("basicBox").collapsed = "false";
|
||||
// change button labels
|
||||
this.mDialog.document.documentElement.getButton("accept").label = this.dialogElement("strings").getString("unknownAccept.label");
|
||||
this.mDialog.document.documentElement.getButton("cancel").label = this.dialogElement("strings").getString("unknownCancel.label");
|
||||
// hide other handler
|
||||
this.mDialog.document.getElementById("openHandler").collapsed = "true";
|
||||
// set save as the selected option
|
||||
|
Loading…
Reference in New Issue
Block a user