зеркало из https://github.com/mozilla/gecko-dev.git
Bug 36492: Implementation of separate recipient and sender columns in thread pane
r=Neil sr=Bienvenu
This commit is contained in:
Родитель
3f116defdd
Коммит
0fc4b54f4e
|
@ -247,7 +247,7 @@ interface nsMsgNavigationType
|
|||
[scriptable, uuid(704c7d28-fd1a-11d4-a5be-0060b0fc04b7)]
|
||||
interface nsIMsgDBView : nsISupports
|
||||
{
|
||||
void open(in nsIMsgFolder folder, in nsMsgViewSortTypeValue sortType, in nsMsgViewSortOrderValue sortOrder, in nsMsgViewFlagsTypeValue viewFlags, in boolean aTreatRecipientAsAuthor, out long count);
|
||||
void open(in nsIMsgFolder folder, in nsMsgViewSortTypeValue sortType, in nsMsgViewSortOrderValue sortOrder, in nsMsgViewFlagsTypeValue viewFlags, out long count);
|
||||
void close();
|
||||
|
||||
void init(in nsIMessenger aMessengerInstance, in nsIMsgWindow aMsgWindow, in nsIMsgDBViewCommandUpdater aCommandUpdater);
|
||||
|
|
|
@ -389,18 +389,32 @@ function SwitchView(command)
|
|||
|
||||
function SetSentFolderColumns(isSentFolder)
|
||||
{
|
||||
var senderOrRecipientColumn = document.getElementById("senderOrRecipientCol");
|
||||
var tree = GetThreadTree();
|
||||
var searchCriteria = document.getElementById("searchCriteria");
|
||||
|
||||
var lastFolderSent = tree.getAttribute("lastfoldersent") == "true";
|
||||
if (isSentFolder != lastFolderSent)
|
||||
{
|
||||
var senderColumn = document.getElementById("senderCol");
|
||||
var recipientColumn = document.getElementById("recipientCol");
|
||||
|
||||
var saveHidden = senderColumn.getAttribute("hidden");
|
||||
senderColumn.setAttribute("hidden", senderColumn.getAttribute("swappedhidden"));
|
||||
senderColumn.setAttribute("swappedhidden", saveHidden);
|
||||
|
||||
saveHidden = recipientColumn.getAttribute("hidden");
|
||||
recipientColumn.setAttribute("hidden", recipientColumn.getAttribute("swappedhidden"));
|
||||
recipientColumn.setAttribute("swappedhidden", saveHidden);
|
||||
}
|
||||
|
||||
if(isSentFolder)
|
||||
{
|
||||
senderOrRecipientColumn.setAttribute("tooltiptext", gMessengerBundle.getString("recipientColumnTooltip"));
|
||||
senderOrRecipientColumn.setAttribute("label", gMessengerBundle.getString("recipientColumnHeader"));
|
||||
tree.setAttribute("lastfoldersent", "true");
|
||||
searchCriteria.setAttribute("value", gMessengerBundle.getString("recipientSearchCriteria"));
|
||||
}
|
||||
else
|
||||
{
|
||||
senderOrRecipientColumn.setAttribute("tooltiptext", gMessengerBundle.getString("senderColumnTooltip"));
|
||||
senderOrRecipientColumn.setAttribute("label", gMessengerBundle.getString("senderColumnHeader"));
|
||||
tree.setAttribute("lastfoldersent", "false");
|
||||
searchCriteria.setAttribute("value", gMessengerBundle.getString("senderSearchCriteria"));
|
||||
}
|
||||
}
|
||||
|
@ -447,13 +461,11 @@ function ConvertColumnIDToSortType(columnID)
|
|||
case "dateCol":
|
||||
sortKey = nsMsgViewSortType.byDate;
|
||||
break;
|
||||
case "senderOrRecipientCol":
|
||||
if (IsSpecialFolderSelected(MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) {
|
||||
sortKey = nsMsgViewSortType.byRecipient;
|
||||
}
|
||||
else {
|
||||
sortKey = nsMsgViewSortType.byAuthor;
|
||||
}
|
||||
case "senderCol":
|
||||
sortKey = nsMsgViewSortType.byAuthor;
|
||||
break;
|
||||
case "recipientCol":
|
||||
sortKey = nsMsgViewSortType.byRecipient;
|
||||
break;
|
||||
case "subjectCol":
|
||||
sortKey = nsMsgViewSortType.bySubject;
|
||||
|
@ -509,8 +521,10 @@ function ConvertSortTypeToColumnID(sortKey)
|
|||
columnID = "dateCol";
|
||||
break;
|
||||
case nsMsgViewSortType.byAuthor:
|
||||
columnID = "senderCol";
|
||||
break;
|
||||
case nsMsgViewSortType.byRecipient:
|
||||
columnID = "senderOrRecipientCol";
|
||||
columnID = "recipientCol";
|
||||
break;
|
||||
case nsMsgViewSortType.bySubject:
|
||||
columnID = "subjectCol";
|
||||
|
@ -598,18 +612,11 @@ function CreateBareDBView(originalView, msgFolder, viewType, viewFlags, sortType
|
|||
if (!gThreadPaneCommandUpdater)
|
||||
gThreadPaneCommandUpdater = new nsMsgDBViewCommandUpdater();
|
||||
|
||||
if ((sortType == nsMsgViewSortType.byAuthor) && IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) {
|
||||
gCurSortType = nsMsgViewSortType.byRecipient;
|
||||
}
|
||||
else {
|
||||
gCurSortType = sortType;
|
||||
}
|
||||
gCurSortType = sortType;
|
||||
|
||||
if (!originalView) {
|
||||
gDBView.init(messenger, msgWindow, gThreadPaneCommandUpdater);
|
||||
|
||||
var treatRecipientAsAuthor = IsSpecialFolder(msgFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE);
|
||||
gDBView.open(msgFolder, gCurSortType, sortOrder, viewFlags, treatRecipientAsAuthor, count);
|
||||
gDBView.open(msgFolder, gCurSortType, sortOrder, viewFlags, count);
|
||||
}
|
||||
else {
|
||||
gDBView = originalView.cloneDBView(messenger, msgWindow, gThreadPaneCommandUpdater);
|
||||
|
|
|
@ -311,9 +311,9 @@ function fillFolderPaneContextMenu()
|
|||
EnableMenuItem("folderPaneContext-markNewsgroupAllRead", true);
|
||||
|
||||
// End of News folder context menu =======================================
|
||||
|
||||
ShowMenuItem("folderPaneContext-markMailFolderAllRead", (numSelected <= 1) && ! isNewsgroup);
|
||||
EnableMenuItem("folderPaneContext-markMailFolderAllRead", true);
|
||||
|
||||
ShowMenuItem("folderPaneContext-markMailFolderAllRead", (numSelected <= 1) && ! isNewsgroup);
|
||||
EnableMenuItem("folderPaneContext-markMailFolderAllRead", true);
|
||||
|
||||
ShowMenuItem("folderPaneContext-searchMessages", (numSelected<=1));
|
||||
EnableMenuItem("folderPaneContext-searchMessages", IsCanSearchMessagesEnabled());
|
||||
|
|
|
@ -218,21 +218,9 @@ function InitViewSortByMenu()
|
|||
setSortByMenuItemCheckState("sortByUnreadMenuitem", (sortType == nsMsgViewSortType.byUnread));
|
||||
setSortByMenuItemCheckState("sortByLabelMenuitem", (sortType == nsMsgViewSortType.byLabel));
|
||||
setSortByMenuItemCheckState("sortByJunkStatusMenuitem", (sortType == nsMsgViewSortType.byJunkStatus));
|
||||
|
||||
// the Sender / Recipient menu is dynamic
|
||||
setSortByMenuItemCheckState("sortBySenderOrRecipientMenuitem", (sortType == nsMsgViewSortType.byAuthor) || (sortType == nsMsgViewSortType.byRecipient));
|
||||
var senderOrRecipientMenuitem = document.getElementById("sortBySenderOrRecipientMenuitem");
|
||||
if (senderOrRecipientMenuitem) {
|
||||
var currentFolder = gDBView.msgFolder;
|
||||
if (IsSpecialFolder(currentFolder, MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) {
|
||||
senderOrRecipientMenuitem.setAttribute('label',gMessengerBundle.getString('recipientColumnHeader'));
|
||||
senderOrRecipientMenuitem.setAttribute('accesskey',gMessengerBundle.getString('recipientAccessKey'));
|
||||
}
|
||||
else {
|
||||
senderOrRecipientMenuitem.setAttribute('label',gMessengerBundle.getString('senderColumnHeader'));
|
||||
senderOrRecipientMenuitem.setAttribute('accesskey',gMessengerBundle.getString('senderAccessKey'));
|
||||
}
|
||||
}
|
||||
setSortByMenuItemCheckState("sortBySenderMenuitem", (sortType == nsMsgViewSortType.byAuthor));
|
||||
setSortByMenuItemCheckState("sortByRecipientMenuitem", (sortType == nsMsgViewSortType.byRecipient));
|
||||
|
||||
var sortOrder = gDBView.sortOrder;
|
||||
|
||||
setSortByMenuItemCheckState("sortAscending", (sortOrder == nsMsgViewSortOrder.ascending));
|
||||
|
|
|
@ -648,10 +648,10 @@ Rights Reserved.
|
|||
<menuitem id="folderPaneContext-markNewsgroupAllRead"
|
||||
label="&folderContextMarkNewsgroupRead.label;"
|
||||
accesskey="&folderContextMarkNewsgroupRead.accesskey;"
|
||||
oncommand="MsgMarkAllRead();"/>
|
||||
<menuitem id="folderPaneContext-markMailFolderAllRead"
|
||||
label="&folderContextMarkMailFolderRead.label;"
|
||||
accesskey="&folderContextMarkMailFolderRead.accesskey;"
|
||||
oncommand="MsgMarkAllRead();"/>
|
||||
<menuitem id="folderPaneContext-markMailFolderAllRead"
|
||||
label="&folderContextMarkMailFolderRead.label;"
|
||||
accesskey="&folderContextMarkMailFolderRead.accesskey;"
|
||||
oncommand="MsgMarkAllRead();"/>
|
||||
<menuitem id="folderPaneContext-new"
|
||||
label="&folderContextNew.label;"
|
||||
|
@ -1174,8 +1174,8 @@ Rights Reserved.
|
|||
<menuitem id="sortByFlagMenuitem" type="radio" name="sortby" label="&sortByFlagCmd.label;" accesskey="&sortByFlagCmd.accesskey;" oncommand="MsgSortByFlagged()"/>
|
||||
<menuitem id="sortByOrderReceivedMenuitem" type="radio" name="sortby" label="&sortByOrderReceivedCmd.label;" accesskey="&sortByOrderReceivedCmd.accesskey;" oncommand="MsgSortByOrderReceived()"/>
|
||||
<menuitem id="sortByPriorityMenuitem" type="radio" name="sortby" label="&sortByPriorityCmd.label;" accesskey="&sortByPriorityCmd.accesskey;" oncommand="MsgSortByPriority()"/>
|
||||
<!-- for Sender / Recipient, accesskey and label are set dynamically -->
|
||||
<menuitem id="sortBySenderOrRecipientMenuitem" type="radio" name="sortby" oncommand="MsgSortBySenderOrRecipient()"/>
|
||||
<menuitem id="sortBySenderMenuitem" type="radio" name="sortby" label="&sortBySenderCmd.label;" accesskey="&sortBySenderCmd.accesskey;" oncommand="MsgSortBySender()"/>
|
||||
<menuitem id="sortByRecipientMenuitem" type="radio" name="sortby" label="&sortByRecipientCmd.label;" accesskey="&sortByRecipientCmd.accesskey;" oncommand="MsgSortByRecipient()"/>
|
||||
<menuitem id="sortBySizeMenuitem" type="radio" name="sortby" label="&sortBySizeCmd.label;" accesskey="&sortBySizeCmd.accesskey;" oncommand="MsgSortBySize()"/>
|
||||
<menuitem id="sortByStatusMenuitem" type="radio" name="sortby" label="&sortByStatusCmd.label;" accesskey="&sortByStatusCmd.accesskey;" oncommand="MsgSortByStatus()"/>
|
||||
<menuitem id="sortBySubjectMenuitem" type="radio" name="sortby" label="&sortBySubjectCmd.label;" accesskey="&sortBySubjectCmd.accesskey;" oncommand="MsgSortBySubject()"/>
|
||||
|
|
|
@ -170,14 +170,14 @@ function MsgSortByDate()
|
|||
MsgSortThreadPane(nsMsgViewSortType.byDate);
|
||||
}
|
||||
|
||||
function MsgSortBySenderOrRecipient()
|
||||
function MsgSortBySender()
|
||||
{
|
||||
if (IsSpecialFolderSelected(MSG_FOLDER_FLAG_SENTMAIL | MSG_FOLDER_FLAG_DRAFTS | MSG_FOLDER_FLAG_QUEUE)) {
|
||||
MsgSortThreadPane(nsMsgViewSortType.byRecipient);
|
||||
}
|
||||
else {
|
||||
MsgSortThreadPane(nsMsgViewSortType.byAuthor);
|
||||
}
|
||||
MsgSortThreadPane(nsMsgViewSortType.byAuthor);
|
||||
}
|
||||
|
||||
function MsgSortByRecipient()
|
||||
{
|
||||
MsgSortThreadPane(nsMsgViewSortType.byRecipient);
|
||||
}
|
||||
|
||||
function MsgSortByStatus()
|
||||
|
@ -373,7 +373,7 @@ function ThreadPaneOnLoad()
|
|||
var tree = GetThreadTree();
|
||||
|
||||
tree.addEventListener("click",ThreadPaneOnClick,true);
|
||||
|
||||
|
||||
// The mousedown event listener below should only be added in the thread
|
||||
// pane of the mailnews 3pane window, not in the advanced search window.
|
||||
if(tree.parentNode.id == "searchResultListBox")
|
||||
|
|
|
@ -35,7 +35,7 @@ Contributors:
|
|||
|
||||
<script src="chrome://messenger/content/threadPane.js"/>
|
||||
|
||||
<tree id="threadTree" flex="1" enableColumnDrag="true" _selectDelay="500" class="plain focusring" disableKeyNavigation="true"
|
||||
<tree id="threadTree" persist="lastfoldersent" flex="1" enableColumnDrag="true" _selectDelay="500" class="plain focusring" disableKeyNavigation="true" lastfoldersent="false"
|
||||
onkeypress="ThreadPaneKeyPress(event);"
|
||||
onselect="ThreadPaneSelectionChanged();">
|
||||
<treecols pickertooltiptext="&columnChooser.tooltip;">
|
||||
|
@ -48,8 +48,10 @@ Contributors:
|
|||
<treecol id="junkStatusCol" persist="hidden ordinal width" fixed="true" cycler="true" class="treecol-image junkStatusHeader"
|
||||
display="&junkStatusColumn.label;" tooltiptext="&junkStatusColumn.tooltip;"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="senderOrRecipientCol" persist="hidden ordinal width" flex="4"
|
||||
<treecol id="senderCol" persist="ordinal width hidden swappedhidden" flex="4" hidden="false" swappedhidden="true"
|
||||
label="&senderColumn.label;" tooltiptext="&senderColumn.tooltip;"/>
|
||||
<treecol id="recipientCol" persist="ordinal width hidden swappedhidden" flex="4" hidden="true" swappedhidden="false"
|
||||
label="&recipientColumn.label;" tooltiptext="&recipientColumn.tooltip;"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="unreadButtonColHeader" persist="hidden ordinal" fixed="true" cycler="true" class="treecol-image readColumnHeader"
|
||||
display="&readColumn.label;" tooltiptext="&readColumn.tooltip;"/>
|
||||
|
|
|
@ -165,7 +165,10 @@ Rights Reserved.
|
|||
<!ENTITY sortByJunkStatusCmd.accesskey "J">
|
||||
<!ENTITY sortBySubjectCmd.label "Subject">
|
||||
<!ENTITY sortBySubjectCmd.accesskey "S">
|
||||
<!-- Sender / Recipient lives in messenger.properties, since that item is dynamic -->
|
||||
<!ENTITY sortBySenderCmd.label "Sender">
|
||||
<!ENTITY sortBySenderCmd.accesskey "n">
|
||||
<!ENTITY sortByRecipientCmd.label "Recipient">
|
||||
<!ENTITY sortByRecipientCmd.accesskey "c">
|
||||
<!ENTITY sortByUnreadCmd.label "Read">
|
||||
<!ENTITY sortByUnreadCmd.accesskey "R">
|
||||
<!ENTITY sortByThreadCmd.label "Thread">
|
||||
|
@ -493,7 +496,7 @@ Rights Reserved.
|
|||
<!ENTITY folderContextUnsubscribe.accesskey "U">
|
||||
<!ENTITY folderContextMarkNewsgroupRead.label "Mark Newsgroup Read">
|
||||
<!ENTITY folderContextMarkNewsgroupRead.accesskey "k">
|
||||
<!ENTITY folderContextMarkMailFolderRead.label "Mark Folder Read">
|
||||
<!ENTITY folderContextMarkMailFolderRead.label "Mark Folder Read">
|
||||
<!ENTITY folderContextMarkMailFolderRead.accesskey "k">
|
||||
<!ENTITY folderContextNew.label "New Subfolder...">
|
||||
<!ENTITY folderContextNew.accesskey "N">
|
||||
|
|
|
@ -102,14 +102,6 @@ serverType-none=Local Mail Store
|
|||
# LOCALIZATION NOTES(serverType-movemail): DONT_TRANSLATE
|
||||
serverType-movemail=Unix Movemail
|
||||
|
||||
# used in the column and in the "View | Sort By " menu
|
||||
recipientColumnTooltip=Click to sort by recipient
|
||||
recipientColumnHeader=Recipient
|
||||
recipientAccessKey=n
|
||||
senderColumnTooltip=Click to sort by sender
|
||||
senderColumnHeader=Sender
|
||||
senderAccessKey=n
|
||||
|
||||
sizeColumnTooltip=Click to sort by size
|
||||
sizeColumnHeader=Size
|
||||
linesColumnTooltip=Click to sort by lines
|
||||
|
|
|
@ -20,6 +20,7 @@ Rights Reserved.
|
|||
|
||||
<!ENTITY threadColumn.label "Thread">
|
||||
<!ENTITY senderColumn.label "Sender">
|
||||
<!ENTITY recipientColumn.label "Recipient">
|
||||
<!ENTITY subjectColumn.label "Subject">
|
||||
<!ENTITY dateColumn.label "Date">
|
||||
<!ENTITY priorityColumn.label "Priority">
|
||||
|
@ -39,6 +40,7 @@ Rights Reserved.
|
|||
<!ENTITY columnChooser.tooltip "Click to select columns to display">
|
||||
<!ENTITY threadColumn.tooltip "Click to display message threads">
|
||||
<!ENTITY senderColumn.tooltip "Click to sort by sender">
|
||||
<!ENTITY recipientColumn.tooltip "Click to sort by recipient">
|
||||
<!ENTITY subjectColumn.tooltip "Click to sort by subject">
|
||||
<!ENTITY dateColumn.tooltip "Click to sort by date">
|
||||
<!ENTITY priorityColumn.tooltip "Click to sort by priority">
|
||||
|
|
|
@ -497,7 +497,7 @@ function setupDatasource() {
|
|||
var cmdupdator = new nsMsgSearchCommandUpdater();
|
||||
|
||||
gSearchView.init(messenger, msgWindow, cmdupdator);
|
||||
gSearchView.open(null, nsMsgViewSortType.byId, nsMsgViewSortOrder.ascending, nsMsgViewFlagsType.kNone, false, count);
|
||||
gSearchView.open(null, nsMsgViewSortType.byId, nsMsgViewSortOrder.ascending, nsMsgViewFlagsType.kNone, count);
|
||||
|
||||
// the thread pane needs to use the search datasource (to get the
|
||||
// actual list of messages) and the message datasource (to get any
|
||||
|
|
|
@ -137,7 +137,6 @@ nsMsgDBView::nsMsgDBView()
|
|||
mSuppressMsgDisplay = PR_FALSE;
|
||||
mSuppressCommandUpdating = PR_FALSE;
|
||||
mSuppressChangeNotification = PR_FALSE;
|
||||
mTreatRecipientAsAuthor = PR_FALSE;
|
||||
mIsNews = PR_FALSE;
|
||||
mDeleteModel = nsMsgImapDeleteModels::MoveToTrash;
|
||||
m_deletingRows = PR_FALSE;
|
||||
|
@ -502,11 +501,7 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsgHdr * aHdr, PRUnichar ** aSenderString)
|
|||
if (!mHeaderParser)
|
||||
mHeaderParser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
if (mTreatRecipientAsAuthor)
|
||||
rv = aHdr->GetMime2DecodedRecipients(getter_Copies(unparsedAuthor));
|
||||
else
|
||||
rv = aHdr->GetMime2DecodedAuthor(getter_Copies(unparsedAuthor));
|
||||
nsresult rv = aHdr->GetMime2DecodedAuthor(getter_Copies(unparsedAuthor));
|
||||
|
||||
// *sigh* how sad, we need to convert our beautiful unicode string to utf8
|
||||
// so we can extract the name part of the address...then convert it back to
|
||||
|
@ -526,6 +521,32 @@ nsresult nsMsgDBView::FetchAuthor(nsIMsgHdr * aHdr, PRUnichar ** aSenderString)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsMsgDBView::FetchRecipient(nsIMsgHdr * aHdr, PRUnichar ** aRecipientString)
|
||||
{
|
||||
nsXPIDLString unparsedRecipient;
|
||||
if (!mHeaderParser)
|
||||
mHeaderParser = do_GetService(NS_MAILNEWS_MIME_HEADER_PARSER_CONTRACTID);
|
||||
|
||||
nsresult rv = aHdr->GetMime2DecodedRecipients(getter_Copies(unparsedRecipient));
|
||||
|
||||
// *sigh* how sad, we need to convert our beautiful unicode string to utf8
|
||||
// so we can extract the name part of the address...then convert it back to
|
||||
// unicode again.
|
||||
if (mHeaderParser)
|
||||
{
|
||||
nsXPIDLCString name;
|
||||
rv = mHeaderParser->ExtractHeaderAddressName("UTF-8", NS_ConvertUCS2toUTF8(unparsedRecipient).get(), getter_Copies(name));
|
||||
if (NS_SUCCEEDED(rv) && (const char*)name)
|
||||
{
|
||||
*aRecipientString = nsCRT::strdup(NS_ConvertUTF8toUCS2(name).get());
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
// if we got here then just return the original string
|
||||
*aRecipientString = nsCRT::strdup(unparsedRecipient);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsMsgDBView::FetchSubject(nsIMsgHdr * aMsgHdr, PRUint32 aFlags, PRUnichar ** aValue)
|
||||
{
|
||||
if (aFlags & MSG_FLAG_HAS_RE)
|
||||
|
@ -1503,6 +1524,10 @@ NS_IMETHODIMP nsMsgDBView::GetCellText(PRInt32 aRow, const PRUnichar * aColID, n
|
|||
rv = FetchStatus(m_flags[aRow], getter_Copies(valueText));
|
||||
aValue.Assign(valueText);
|
||||
break;
|
||||
case 'r': // recipient
|
||||
rv = FetchRecipient(msgHdr, getter_Copies(valueText));
|
||||
aValue.Assign(valueText);
|
||||
break;
|
||||
case 'd': // date
|
||||
rv = FetchDate(msgHdr, getter_Copies(valueText));
|
||||
aValue.Assign(valueText);
|
||||
|
@ -1691,12 +1716,11 @@ NS_IMETHODIMP nsMsgDBView::PerformActionOnCell(const PRUnichar *action, PRInt32
|
|||
// end nsITreeView Implementation Methods
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMETHODIMP nsMsgDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount)
|
||||
NS_IMETHODIMP nsMsgDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRInt32 *pCount)
|
||||
{
|
||||
m_viewFlags = viewFlags;
|
||||
m_sortOrder = sortOrder;
|
||||
m_sortType = sortType;
|
||||
mTreatRecipientAsAuthor = aTreatRecipientAsAuthor;
|
||||
|
||||
nsMsgViewTypeValue viewType;
|
||||
|
||||
|
@ -5803,7 +5827,6 @@ nsresult nsMsgDBView::CopyDBView(nsMsgDBView *aNewMsgDBView, nsIMessenger *aMess
|
|||
aNewMsgDBView->mIsNews = mIsNews;
|
||||
aNewMsgDBView->mHeaderParser = mHeaderParser;
|
||||
aNewMsgDBView->mDeleteModel = mDeleteModel;
|
||||
aNewMsgDBView->mTreatRecipientAsAuthor = mTreatRecipientAsAuthor;
|
||||
aNewMsgDBView->m_flags.CopyArray(m_flags);
|
||||
aNewMsgDBView->m_levels.CopyArray(m_levels);
|
||||
aNewMsgDBView->m_keys.CopyArray(m_keys);
|
||||
|
|
|
@ -158,6 +158,7 @@ protected:
|
|||
PRPackedBool mSuppressChangeNotification;
|
||||
virtual const char * GetViewName(void) {return "MsgDBView"; }
|
||||
nsresult FetchAuthor(nsIMsgHdr * aHdr, PRUnichar ** aAuthorString);
|
||||
nsresult FetchRecipient(nsIMsgHdr * aHdr, PRUnichar ** aRecipientString);
|
||||
nsresult FetchSubject(nsIMsgHdr * aMsgHdr, PRUint32 aFlags, PRUnichar ** aValue);
|
||||
nsresult FetchDate(nsIMsgHdr * aHdr, PRUnichar ** aDateString);
|
||||
nsresult FetchStatus(PRUint32 aFlags, PRUnichar ** aStatusString);
|
||||
|
@ -337,7 +338,6 @@ protected:
|
|||
// and decendents of those folders
|
||||
// (like the "Sent" folder, "Sent/Old Sent")
|
||||
// the Sender column really shows recipients.
|
||||
PRPackedBool mTreatRecipientAsAuthor;
|
||||
PRPackedBool mIsNews; // we have special icons for news, and for news, we show lines instead of size
|
||||
PRPackedBool m_sortValid;
|
||||
PRUint8 m_saveRestoreSelectionDepth;
|
||||
|
|
|
@ -60,13 +60,13 @@ nsMsgSearchDBView::~nsMsgSearchDBView()
|
|||
|
||||
NS_IMPL_ISUPPORTS_INHERITED3(nsMsgSearchDBView, nsMsgDBView, nsIMsgDBView, nsIMsgCopyServiceListener, nsIMsgSearchNotify)
|
||||
|
||||
NS_IMETHODIMP nsMsgSearchDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount)
|
||||
NS_IMETHODIMP nsMsgSearchDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRInt32 *pCount)
|
||||
{
|
||||
nsresult rv;
|
||||
m_folders = do_CreateInstance(NS_SUPPORTSARRAY_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = nsMsgDBView::Open(folder, sortType, sortOrder, viewFlags, aTreatRecipientAsAuthor, pCount);
|
||||
rv = nsMsgDBView::Open(folder, sortType, sortOrder, viewFlags, pCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (pCount)
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
|
||||
virtual const char * GetViewName(void) {return "SearchView"; }
|
||||
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder,
|
||||
nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount);
|
||||
nsMsgViewFlagsTypeValue viewFlags, PRInt32 *pCount);
|
||||
NS_IMETHOD Close();
|
||||
NS_IMETHOD Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder);
|
||||
NS_IMETHOD DoCommand(nsMsgViewCommandTypeValue command);
|
||||
|
|
|
@ -47,11 +47,6 @@ nsMsgThreadsWithUnreadDBView::~nsMsgThreadsWithUnreadDBView()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgThreadsWithUnreadDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount)
|
||||
{
|
||||
return nsMsgThreadedDBView::Open(folder, sortType, sortOrder, viewFlags, aTreatRecipientAsAuthor, pCount);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgThreadsWithUnreadDBView::GetViewType(nsMsgViewTypeValue *aViewType)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aViewType);
|
||||
|
|
|
@ -46,7 +46,6 @@ public:
|
|||
nsMsgThreadsWithUnreadDBView();
|
||||
virtual ~nsMsgThreadsWithUnreadDBView();
|
||||
virtual const char * GetViewName(void) {return "ThreadsWithUnreadView"; }
|
||||
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount);
|
||||
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval);
|
||||
NS_IMETHOD GetViewType(nsMsgViewTypeValue *aViewType);
|
||||
|
||||
|
|
|
@ -56,9 +56,9 @@ nsMsgThreadedDBView::~nsMsgThreadedDBView()
|
|||
/* destructor code */
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgThreadedDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount)
|
||||
NS_IMETHODIMP nsMsgThreadedDBView::Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRInt32 *pCount)
|
||||
{
|
||||
nsresult rv = nsMsgDBView::Open(folder, sortType, sortOrder, viewFlags, aTreatRecipientAsAuthor, pCount);
|
||||
nsresult rv = nsMsgDBView::Open(folder, sortType, sortOrder, viewFlags, pCount);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Preset msg hdr cache size for performance reason.
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
nsMsgThreadedDBView();
|
||||
virtual ~nsMsgThreadedDBView();
|
||||
|
||||
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRBool aTreatRecipientAsAuthor, PRInt32 *pCount);
|
||||
NS_IMETHOD Open(nsIMsgFolder *folder, nsMsgViewSortTypeValue sortType, nsMsgViewSortOrderValue sortOrder, nsMsgViewFlagsTypeValue viewFlags, PRInt32 *pCount);
|
||||
NS_IMETHOD CloneDBView(nsIMessenger *aMessengerInstance, nsIMsgWindow *aMsgWindow, nsIMsgDBViewCommandUpdater *aCommandUpdater, nsIMsgDBView **_retval);
|
||||
NS_IMETHOD Close();
|
||||
virtual nsresult AddKeys(nsMsgKey *pKeys, PRInt32 *pFlags, const char *pLevels, nsMsgViewSortTypeValue sortType, PRInt32 numKeysToAdd);
|
||||
|
|
Загрузка…
Ссылка в новой задаче