зеркало из https://github.com/mozilla/pjs.git
Bug #225387 --> Add back end support for a separate sortable attachment column in the thread pane.
r/sr=bienvenu a=asa
This commit is contained in:
Родитель
989d3703c0
Коммит
e1b2b6a791
|
@ -98,6 +98,7 @@ interface nsMsgViewSortType
|
|||
const nsMsgViewSortTypeValue byLocation = 0x1d;
|
||||
const nsMsgViewSortTypeValue byLabel = 0x1e;
|
||||
const nsMsgViewSortTypeValue byJunkStatus = 0x1f;
|
||||
const nsMsgViewSortTypeValue byAttachments = 0x20;
|
||||
};
|
||||
|
||||
[scriptable, uuid(255d1c1e-fde7-11d4-a5be-0060b0fc04b7)]
|
||||
|
|
|
@ -205,6 +205,11 @@ function MsgSortByJunkStatus()
|
|||
MsgSortThreadPane(nsMsgViewSortType.byJunkStatus);
|
||||
}
|
||||
|
||||
function MsgSortByAttachments()
|
||||
{
|
||||
MsgSortThreadPane(nsMsgViewSortType.byAttachments);
|
||||
}
|
||||
|
||||
function MsgSortBySubject()
|
||||
{
|
||||
MsgSortThreadPane(nsMsgViewSortType.bySubject);
|
||||
|
|
|
@ -3124,7 +3124,8 @@ nsresult nsMsgDBView::GetFieldTypeAndLenForSort(nsMsgViewSortTypeValue sortType,
|
|||
case nsMsgViewSortType::byUnread:
|
||||
case nsMsgViewSortType::byStatus:
|
||||
case nsMsgViewSortType::byLabel:
|
||||
case nsMsgViewSortType::byJunkStatus:
|
||||
case nsMsgViewSortType::byJunkStatus:
|
||||
case nsMsgViewSortType::byAttachments:
|
||||
*pFieldType = kU32;
|
||||
*pMaxLen = sizeof(PRUint32);
|
||||
break;
|
||||
|
@ -3228,6 +3229,11 @@ nsresult nsMsgDBView::GetLongField(nsIMsgDBHdr *msgHdr, nsMsgViewSortTypeValue s
|
|||
*result = junkScoreStr.IsEmpty() ? (0) : atoi(junkScoreStr.get()) + 1;
|
||||
}
|
||||
break;
|
||||
case nsMsgViewSortType::byAttachments:
|
||||
bits = 0;
|
||||
rv = msgHdr->GetFlags(&bits);
|
||||
*result = !(bits & MSG_FLAG_ATTACHMENT);
|
||||
break;
|
||||
case nsMsgViewSortType::byDate:
|
||||
// when sorting threads by date, we want the date of the newest msg
|
||||
// in the thread
|
||||
|
|
Загрузка…
Ссылка в новой задаче