From 25988e7f9decafc7d5fe67271b34f21baac3d5d7 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Thu, 14 Dec 2000 22:08:23 +0000 Subject: [PATCH] fix for #36488. thanks to andrew.taylor@cal.montage.ca for the initial patch. make it so in the drafts and unsent message folders we change the sender column to the recipient column. r=sspitzer, sr=bienvenu --- mailnews/base/resources/content/commandglue.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mailnews/base/resources/content/commandglue.js b/mailnews/base/resources/content/commandglue.js index 32dab7610273..12cfb4297b62 100644 --- a/mailnews/base/resources/content/commandglue.js +++ b/mailnews/base/resources/content/commandglue.js @@ -278,7 +278,7 @@ function RerootFolder(uri, newFolder, isThreaded, sortID, sortDirection) else SortThreadPane("DateColumn", "http://home.netscape.com/NC-rdf#Date", "", false, null, false); - SetSentFolderColumns(IsSpecialFolder(newFolder, "Sent")); + SetSentFolderColumns(IsSpecialFolder(newFolder, [ "Sent", "Drafts", "Unsent Messages" ])); // Since SetSentFolderColumns() may alter the template's structure, // we need to explicitly force the builder to recompile its rules. @@ -825,7 +825,7 @@ function OpenToFolder(item, folderURI) } -function IsSpecialFolder(msgFolder, specialFolderName) +function IsSpecialFolder(msgFolder, specialFolderNames) { var db = GetFolderDatasource(); var folderResource = msgFolder.QueryInterface(Components.interfaces.nsIRDFResource); @@ -838,10 +838,16 @@ function IsSpecialFolder(msgFolder, specialFolderName) if (!result) return false; result = result.QueryInterface(Components.interfaces.nsIRDFLiteral); if (!result) return false; - dump("We are looking for " + specialFolderName + "\n"); - dump("special folder name = " + result.Value + "\n"); - if(result.Value == specialFolderName) - return true; + + //dump("We are looking for " + specialFolderNames + "\n"); + //dump("special folder name = " + result.Value + "\n"); + + var count = specialFolderNames.length; + var i; + for (i = 0; i < count; i++) { + if(result.Value == specialFolderNames[i]) + return true; + } } return false;