зеркало из https://github.com/mozilla/pjs.git
Fix for bug 219620: "Rationalize Thread Messages menu items"
r=neil, sr=mscott, a=chofmann
This commit is contained in:
Родитель
40862e1788
Коммит
0bcaff232a
|
@ -206,7 +206,6 @@ var DefaultController =
|
|||
case "cmd_file":
|
||||
case "cmd_emptyTrash":
|
||||
case "cmd_compactFolder":
|
||||
case "cmd_sortByThread":
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_close":
|
||||
case "cmd_selectAll":
|
||||
|
@ -369,7 +368,6 @@ var DefaultController =
|
|||
case "cmd_previousFlaggedMsg":
|
||||
return IsViewNavigationItemEnabled();
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_sortByThread":
|
||||
case "cmd_viewUnreadMsgs":
|
||||
case "cmd_viewThreadsWithUnread":
|
||||
case "cmd_viewWatchedThreadsWithUnread":
|
||||
|
@ -515,9 +513,6 @@ var DefaultController =
|
|||
case "cmd_previousFlaggedMsg":
|
||||
MsgPreviousFlaggedMessage();
|
||||
break;
|
||||
case "cmd_sortByThread":
|
||||
MsgSortByThread();
|
||||
break;
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_viewThreadsWithUnread":
|
||||
case "cmd_viewWatchedThreadsWithUnread":
|
||||
|
|
|
@ -236,7 +236,6 @@ function InitViewSortByMenu()
|
|||
setSortByMenuItemCheckState("sortBySizeMenuitem", (sortType == nsMsgViewSortType.bySize));
|
||||
setSortByMenuItemCheckState("sortByStatusMenuitem", (sortType == nsMsgViewSortType.byStatus));
|
||||
setSortByMenuItemCheckState("sortBySubjectMenuitem", (sortType == nsMsgViewSortType.bySubject));
|
||||
setSortByMenuItemCheckState("sortByThreadMenuitem", (sortType == nsMsgViewSortType.byThread));
|
||||
setSortByMenuItemCheckState("sortByUnreadMenuitem", (sortType == nsMsgViewSortType.byUnread));
|
||||
setSortByMenuItemCheckState("sortByLabelMenuitem", (sortType == nsMsgViewSortType.byLabel));
|
||||
setSortByMenuItemCheckState("sortByJunkStatusMenuitem", (sortType == nsMsgViewSortType.byJunkStatus));
|
||||
|
@ -249,8 +248,15 @@ function InitViewSortByMenu()
|
|||
setSortByMenuItemCheckState("sortAscending", (sortOrder == nsMsgViewSortOrder.ascending));
|
||||
setSortByMenuItemCheckState("sortDescending", (sortOrder == nsMsgViewSortOrder.descending));
|
||||
|
||||
var threadMenuItem = document.getElementById("sortByThreadMenuitem");
|
||||
threadMenuItem.setAttribute("disabled", !gDBView.supportsThreading);
|
||||
var threaded = ((gDBView.viewFlags & nsMsgViewFlagsType.kThreadedDisplay) != 0);
|
||||
var sortThreadedMenuItem = document.getElementById("sortThreaded");
|
||||
var sortUnthreadedMenuItem = document.getElementById("sortUnthreaded");
|
||||
|
||||
sortThreadedMenuItem.setAttribute("checked", threaded);
|
||||
sortUnthreadedMenuItem.setAttribute("checked", !threaded);
|
||||
|
||||
sortThreadedMenuItem.setAttribute("disabled", !gDBView.supportsThreading);
|
||||
sortUnthreadedMenuItem.setAttribute("disabled", !gDBView.supportsThreading);
|
||||
}
|
||||
|
||||
function InitViewMessagesMenu()
|
||||
|
@ -281,13 +287,7 @@ function InitViewMessagesMenu()
|
|||
|
||||
function InitViewMessageViewMenu()
|
||||
{
|
||||
var viewFlags = (gDBView) ? gDBView.viewFlags : 0;
|
||||
var viewType = (gDBView) ? gDBView.viewType : 0;
|
||||
|
||||
var threadedMenuItem = document.getElementById("viewThreaded");
|
||||
if (threadedMenuItem)
|
||||
threadedMenuItem.setAttribute("checked", (viewFlags & nsMsgViewFlagsType.kThreadedDisplay) != 0);
|
||||
|
||||
var currentViewValue = document.getElementById("viewPicker").value;
|
||||
|
||||
var allMenuItem = document.getElementById("viewAll");
|
||||
|
|
|
@ -115,7 +115,6 @@
|
|||
<command id="cmd_viewThreadsWithUnread" oncommand="goDoCommand('cmd_viewThreadsWithUnread')" disabled="true"/>
|
||||
<command id="cmd_viewWatchedThreadsWithUnread" oncommand="goDoCommand('cmd_viewWatchedThreadsWithUnread')" disabled="true"/>
|
||||
<command id="cmd_viewIgnoredThreads" oncommand="goDoCommand('cmd_viewIgnoredThreads')" disabled="true"/>
|
||||
<command id="cmd_sortByThread" oncommand="goDoCommand('cmd_sortByThread')" disabled="true"/>
|
||||
<commandset id="viewZoomCommands">
|
||||
<command id="cmd_textZoomReduce" oncommand="ZoomManager.prototype.getInstance().reduce();"/>
|
||||
<command id="cmd_textZoomEnlarge" oncommand="ZoomManager.prototype.getInstance().enlarge();"/>
|
||||
|
@ -1160,7 +1159,6 @@
|
|||
<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()"/>
|
||||
<menuitem id="sortByThreadMenuitem" type="radio" name="sortby" label="&sortByThreadCmd.label;" accesskey="&sortByThreadCmd.accesskey;" oncommand="MsgSortByThread()"/>
|
||||
<menuitem id="sortByUnreadMenuitem" type="radio" name="sortby" label="&sortByUnreadCmd.label;" accesskey="&sortByUnreadCmd.accesskey;" oncommand="MsgSortByUnread()"/>
|
||||
<menuitem id="sortByLabelMenuitem" type="radio" name="sortby" label="&sortByLabelCmd.label;" accesskey="&sortByLabelCmd.accesskey;" oncommand="MsgSortByLabel()"/>
|
||||
<menuitem id="sortByJunkStatusMenuitem" type="radio" name="sortby" label="&sortByJunkStatusCmd.label;" accesskey="&sortByJunkStatusCmd.accesskey;" oncommand="MsgSortByJunkStatus()"/>
|
||||
|
@ -1168,13 +1166,14 @@
|
|||
<menuseparator/>
|
||||
<menuitem id="sortAscending" type="radio" name="sortdirection" label="&sortAscending.label;" accesskey="&sortAscending.accesskey;" oncommand="MsgSortAscending()"/>
|
||||
<menuitem id="sortDescending" type="radio" name="sortdirection" label="&sortDescending.label;" accesskey="&sortDescending.accesskey;" oncommand="MsgSortDescending()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="sortThreaded" type="radio" name="threaded" label="&sortThreaded.label;" accesskey="&sortThreaded.accesskey;" oncommand="MsgSortThreaded();"/>
|
||||
<menuitem id="sortUnthreaded" type="radio" name="threaded" label="&sortUnthreaded.label;" accesskey="&sortUnthreaded.accesskey;" oncommand="MsgSortUnthreaded();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
|
||||
<menu label="&msgsMenu.label;" id="viewMessageViewMenu" accesskey="&msgsMenu.accesskey;">
|
||||
<menupopup id="viewMessageViewPopup" onpopupshowing="InitViewMessageViewMenu()">
|
||||
<menuitem id="viewThreaded" type="checkbox" label="&viewThreaded.label;" accesskey="&viewThreaded.accesskey;" oncommand="MsgToggleThreaded();"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="viewAll" type="radio" name="viewmessages" label="&viewAll.label;" accesskey="&viewAll.accesskey;" oncommand="ViewMessagesBy('viewPickerAll');"/>
|
||||
<menuitem id="viewUnread" type="radio" name="viewmessages" label="&viewUnread.label;" accesskey="&viewUnread.accesskey;" oncommand="ViewMessagesBy('viewPickerUnread');"/>
|
||||
<menuseparator/>
|
||||
|
|
|
@ -147,18 +147,18 @@
|
|||
<!ENTITY sortByRecipientCmd.accesskey "c">
|
||||
<!ENTITY sortByUnreadCmd.label "Read">
|
||||
<!ENTITY sortByUnreadCmd.accesskey "R">
|
||||
<!ENTITY sortByThreadCmd.label "Thread">
|
||||
<!ENTITY sortByThreadCmd.accesskey "T">
|
||||
<!ENTITY sortByOrderReceivedCmd.label "Order Received">
|
||||
<!ENTITY sortByOrderReceivedCmd.accesskey "O">
|
||||
<!ENTITY sortAscending.label "Ascending">
|
||||
<!ENTITY sortAscending.accesskey "A">
|
||||
<!ENTITY sortDescending.label "Descending">
|
||||
<!ENTITY sortDescending.accesskey "D">
|
||||
<!ENTITY sortThreaded.label "Threaded">
|
||||
<!ENTITY sortThreaded.accesskey "T">
|
||||
<!ENTITY sortUnthreaded.label "Unthreaded">
|
||||
<!ENTITY sortUnthreaded.accesskey "h">
|
||||
<!ENTITY msgsMenu.label "Messages">
|
||||
<!ENTITY msgsMenu.accesskey "M">
|
||||
<!ENTITY viewThreaded.label "Threaded">
|
||||
<!ENTITY viewThreaded.accesskey "T">
|
||||
<!ENTITY viewAll.label "All">
|
||||
<!ENTITY viewUnread.label "Unread">
|
||||
<!ENTITY viewAll.accesskey "A">
|
||||
|
|
|
@ -206,7 +206,6 @@ var DefaultController =
|
|||
case "cmd_file":
|
||||
case "cmd_emptyTrash":
|
||||
case "cmd_compactFolder":
|
||||
case "cmd_sortByThread":
|
||||
case "cmd_settingsOffline":
|
||||
case "cmd_close":
|
||||
case "cmd_selectAll":
|
||||
|
@ -369,7 +368,6 @@ var DefaultController =
|
|||
case "cmd_previousFlaggedMsg":
|
||||
return IsViewNavigationItemEnabled();
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_sortByThread":
|
||||
case "cmd_viewUnreadMsgs":
|
||||
case "cmd_viewThreadsWithUnread":
|
||||
case "cmd_viewWatchedThreadsWithUnread":
|
||||
|
@ -514,9 +512,6 @@ var DefaultController =
|
|||
case "cmd_previousFlaggedMsg":
|
||||
MsgPreviousFlaggedMessage();
|
||||
break;
|
||||
case "cmd_sortByThread":
|
||||
MsgSortByThread();
|
||||
break;
|
||||
case "cmd_viewAllMsgs":
|
||||
case "cmd_viewThreadsWithUnread":
|
||||
case "cmd_viewWatchedThreadsWithUnread":
|
||||
|
|
|
@ -210,7 +210,6 @@ function InitViewSortByMenu()
|
|||
setSortByMenuItemCheckState("sortBySizeMenuitem", (sortType == nsMsgViewSortType.bySize));
|
||||
setSortByMenuItemCheckState("sortByStatusMenuitem", (sortType == nsMsgViewSortType.byStatus));
|
||||
setSortByMenuItemCheckState("sortBySubjectMenuitem", (sortType == nsMsgViewSortType.bySubject));
|
||||
setSortByMenuItemCheckState("sortByThreadMenuitem", (sortType == nsMsgViewSortType.byThread));
|
||||
setSortByMenuItemCheckState("sortByUnreadMenuitem", (sortType == nsMsgViewSortType.byUnread));
|
||||
setSortByMenuItemCheckState("sortByLabelMenuitem", (sortType == nsMsgViewSortType.byLabel));
|
||||
setSortByMenuItemCheckState("sortByJunkStatusMenuitem", (sortType == nsMsgViewSortType.byJunkStatus));
|
||||
|
@ -222,8 +221,15 @@ function InitViewSortByMenu()
|
|||
setSortByMenuItemCheckState("sortAscending", (sortOrder == nsMsgViewSortOrder.ascending));
|
||||
setSortByMenuItemCheckState("sortDescending", (sortOrder == nsMsgViewSortOrder.descending));
|
||||
|
||||
var threadMenuItem = document.getElementById("sortByThreadMenuitem");
|
||||
threadMenuItem.setAttribute("disabled", !gDBView.supportsThreading);
|
||||
var threaded = ((gDBView.viewFlags & nsMsgViewFlagsType.kThreadedDisplay) != 0);
|
||||
var sortThreadedMenuItem = document.getElementById("sortThreaded");
|
||||
var sortUnthreadedMenuItem = document.getElementById("sortUnthreaded");
|
||||
|
||||
sortThreadedMenuItem.setAttribute("checked", threaded);
|
||||
sortUnthreadedMenuItem.setAttribute("checked", !threaded);
|
||||
|
||||
sortThreadedMenuItem.setAttribute("disabled", !gDBView.supportsThreading);
|
||||
sortUnthreadedMenuItem.setAttribute("disabled", !gDBView.supportsThreading);
|
||||
}
|
||||
|
||||
function InitViewMessagesMenu()
|
||||
|
@ -254,12 +260,6 @@ function InitViewMessagesMenu()
|
|||
|
||||
function InitViewMessageViewMenu()
|
||||
{
|
||||
var viewFlags = gDBView ? gDBView.viewFlags : 0;
|
||||
|
||||
var threadedMenuItem = document.getElementById("viewThreaded");
|
||||
if (threadedMenuItem)
|
||||
threadedMenuItem.setAttribute("checked", (viewFlags & nsMsgViewFlagsType.kThreadedDisplay) != 0);
|
||||
|
||||
var currentViewValue = document.getElementById("viewPicker").value;
|
||||
|
||||
var allMenuItem = document.getElementById("viewAll");
|
||||
|
|
|
@ -125,7 +125,6 @@ Rights Reserved.
|
|||
<command id="cmd_viewThreadsWithUnread" oncommand="goDoCommand('cmd_viewThreadsWithUnread')" disabled="true"/>
|
||||
<command id="cmd_viewWatchedThreadsWithUnread" oncommand="goDoCommand('cmd_viewWatchedThreadsWithUnread')" disabled="true"/>
|
||||
<command id="cmd_viewIgnoredThreads" oncommand="goDoCommand('cmd_viewIgnoredThreads')" disabled="true"/>
|
||||
<command id="cmd_sortByThread" oncommand="goDoCommand('cmd_sortByThread')" disabled="true"/>
|
||||
<commandset id="viewZoomCommands"/>
|
||||
</commandset>
|
||||
|
||||
|
@ -1185,19 +1184,19 @@ Rights Reserved.
|
|||
<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()"/>
|
||||
<menuitem id="sortByThreadMenuitem" type="radio" name="sortby" label="&sortByThreadCmd.label;" accesskey="&sortByThreadCmd.accesskey;" oncommand="MsgSortByThread()"/>
|
||||
<menuitem id="sortByUnreadMenuitem" type="radio" name="sortby" label="&sortByUnreadCmd.label;" accesskey="&sortByUnreadCmd.accesskey;" oncommand="MsgSortByUnread()"/>
|
||||
<menuitem id="sortByLabelMenuitem" type="radio" name="sortby" label="&sortByLabelCmd.label;" accesskey="&sortByLabelCmd.accesskey;" oncommand="MsgSortByLabel()"/>
|
||||
<menuitem id="sortByJunkStatusMenuitem" type="radio" name="sortby" label="&sortByJunkStatusCmd.label;" accesskey="&sortByJunkStatusCmd.accesskey;" oncommand="MsgSortByJunkStatus()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="sortAscending" type="radio" name="sortdirection" label="&sortAscending.label;" accesskey="&sortAscending.accesskey;" oncommand="MsgSortAscending()"/>
|
||||
<menuitem id="sortDescending" type="radio" name="sortdirection" label="&sortDescending.label;" accesskey="&sortDescending.accesskey;" oncommand="MsgSortDescending()"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="sortThreaded" type="radio" name="threaded" label="&sortThreaded.label;" accesskey="&sortThreaded.accesskey;" oncommand="MsgSortThreaded();"/>
|
||||
<menuitem id="sortUnthreaded" type="radio" name="threaded" label="&sortUnthreaded.label;" accesskey="&sortUnthreaded.accesskey;" oncommand="MsgSortUnthreaded();"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menu label="&msgsMenu.label;" id="viewMessageViewMenu" accesskey="&msgsMenu.accesskey;">
|
||||
<menupopup id="viewMessageViewPopup" onpopupshowing="InitViewMessageViewMenu()">
|
||||
<menuitem id="viewThreaded" type="checkbox" label="&viewThreaded.label;" accesskey="&viewThreaded.accesskey;" oncommand="MsgToggleThreaded();"/>
|
||||
<menuseparator/>
|
||||
<menuitem id="viewAll" type="radio" name="viewmessages" label="&viewAll.label;" accesskey="&viewAll.accesskey;" oncommand="ViewMessagesBy('viewPickerAll');"/>
|
||||
<menuitem id="viewUnread" type="radio" name="viewmessages" label="&viewUnread.label;" accesskey="&viewUnread.accesskey;" oncommand="ViewMessagesBy('viewPickerUnread');"/>
|
||||
<menuseparator/>
|
||||
|
|
|
@ -282,10 +282,24 @@ function MsgReverseSortThreadPane()
|
|||
|
||||
function MsgToggleThreaded()
|
||||
{
|
||||
var dbview = GetDBView();
|
||||
dbview.viewFlags ^= nsMsgViewFlagsType.kThreadedDisplay;
|
||||
dbview.sort(dbview.sortType, dbview.sortOrder); // resort
|
||||
UpdateSortIndicators(dbview.sortType, dbview.sortOrder);
|
||||
var dbview = GetDBView();
|
||||
dbview.viewFlags ^= nsMsgViewFlagsType.kThreadedDisplay;
|
||||
dbview.sort(dbview.sortType, dbview.sortOrder);
|
||||
UpdateSortIndicators(dbview.sortType, dbview.sortOrder);
|
||||
}
|
||||
|
||||
function MsgSortThreaded()
|
||||
{
|
||||
// Toggle if not already threaded.
|
||||
if ((GetDBView().viewFlags & nsMsgViewFlagsType.kThreadedDisplay) == 0)
|
||||
MsgToggleThreaded();
|
||||
}
|
||||
|
||||
function MsgSortUnthreaded()
|
||||
{
|
||||
// Toggle if not already unthreaded.
|
||||
if ((GetDBView().viewFlags & nsMsgViewFlagsType.kThreadedDisplay) != 0)
|
||||
MsgToggleThreaded();
|
||||
}
|
||||
|
||||
function MsgSortAscending()
|
||||
|
|
|
@ -170,18 +170,18 @@ Rights Reserved.
|
|||
<!ENTITY sortByRecipientCmd.accesskey "c">
|
||||
<!ENTITY sortByUnreadCmd.label "Read">
|
||||
<!ENTITY sortByUnreadCmd.accesskey "R">
|
||||
<!ENTITY sortByThreadCmd.label "Thread">
|
||||
<!ENTITY sortByThreadCmd.accesskey "T">
|
||||
<!ENTITY sortByOrderReceivedCmd.label "Order Received">
|
||||
<!ENTITY sortByOrderReceivedCmd.accesskey "O">
|
||||
<!ENTITY sortAscending.label "Ascending">
|
||||
<!ENTITY sortAscending.accesskey "A">
|
||||
<!ENTITY sortDescending.label "Descending">
|
||||
<!ENTITY sortDescending.accesskey "D">
|
||||
<!ENTITY sortThreaded.label "Threaded">
|
||||
<!ENTITY sortThreaded.accesskey "T">
|
||||
<!ENTITY sortUnthreaded.label "Unthreaded">
|
||||
<!ENTITY sortUnthreaded.accesskey "h">
|
||||
<!ENTITY msgsMenu.label "Messages">
|
||||
<!ENTITY msgsMenu.accesskey "M">
|
||||
<!ENTITY viewThreaded.label "Threaded">
|
||||
<!ENTITY viewThreaded.accesskey "T">
|
||||
<!ENTITY viewAll.label "All">
|
||||
<!ENTITY viewUnread.label "Unread">
|
||||
<!ENTITY viewAll.accesskey "A">
|
||||
|
|
Загрузка…
Ссылка в новой задаче