bug 395713: show 'Save to Disk' option for applicable types in Applications prefpane; r=gavin, a=mconnor

This commit is contained in:
myk%mozilla.org 2007-09-17 18:59:55 +00:00
Родитель 2f3b06f4af
Коммит bc0b68d73a
1 изменённых файлов: 2 добавлений и 15 удалений

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

@ -175,6 +175,7 @@ HandlerInfoWrapper.prototype = {
// we haven't (yet?) implemented, so we make it a public property.
wrappedHandlerInfo: null,
//**************************************************************************//
// Convenience Utils
@ -195,20 +196,6 @@ HandlerInfoWrapper.prototype = {
},
//**************************************************************************//
// nsISupports
QueryInterface: function(aIID) {
if (aIID.equals(Ci.nsIHandlerInfo) ||
aIID.equals(Ci.nsISupports) ||
(aIID.equals(Ci.nsIMIMEInfo) &&
this.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo))
return this;
throw Cr.NS_ERROR_NO_INTERFACE;
},
//**************************************************************************//
// nsIHandlerInfo
@ -1172,7 +1159,7 @@ var gApplicationsPane = {
// And it's not available to types handled only by plugins either, although
// I would think we'd want to give users the ability to redirect that stuff
// to disk (so maybe we should revisit that decision).
if ((handlerInfo instanceof Ci.nsIMIMEInfo) &&
if ((handlerInfo.wrappedHandlerInfo instanceof Ci.nsIMIMEInfo) &&
handlerInfo.type != TYPE_MAYBE_FEED &&
!handlerInfo.handledOnlyByPlugin) {
let menuItem = document.createElementNS(kXULNS, "menuitem");