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:
reed@reedloden.com 2008-03-11 01:11:08 -07:00
parent dad29c2c8a
commit 58195cf54b

View File

@ -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