diff --git a/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js b/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js
index a48e0187fd1..80f1d90a6d4 100644
--- a/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js
+++ b/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js
@@ -227,6 +227,7 @@ var DefaultController =
case "cmd_close":
case "cmd_selectAll":
case "cmd_selectThread":
+ case "cmd_selectFlagged":
return true;
case "cmd_downloadFlagged":
case "cmd_downloadSelected":
@@ -370,6 +371,7 @@ var DefaultController =
case "cmd_search":
return IsCanSearchMessagesEnabled();
case "cmd_selectAll":
+ case "cmd_selectFlagged":
return gDBView != null;
// these are enabled on when we are in threaded mode
case "cmd_selectThread":
@@ -688,6 +690,9 @@ var DefaultController =
case "cmd_selectThread":
gDBView.doCommand(nsMsgViewCommandType.selectThread);
break;
+ case "cmd_selectFlagged":
+ gDBView.doCommand(nsMsgViewCommandType.selectFlagged);
+ break;
}
},
diff --git a/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul b/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul
index 5cf80c50fac..7e015dd75d6 100644
--- a/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul
+++ b/mozilla/mailnews/base/resources/content/mailWindowOverlay.xul
@@ -1160,6 +1160,9 @@
accesskey="&selectThreadCmd.accesskey;"
key="key_selectThread"
observes="cmd_selectThread"/>
+
diff --git a/mozilla/mailnews/base/resources/locale/en-US/messenger.dtd b/mozilla/mailnews/base/resources/locale/en-US/messenger.dtd
index 66dd50bce7b..de8156ca806 100644
--- a/mozilla/mailnews/base/resources/locale/en-US/messenger.dtd
+++ b/mozilla/mailnews/base/resources/locale/en-US/messenger.dtd
@@ -127,6 +127,8 @@
+
+
diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp
index 47e3c8b26e2..72193b3fc1a 100644
--- a/mozilla/mailnews/base/src/nsMsgDBView.cpp
+++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp
@@ -2085,9 +2085,21 @@ NS_IMETHODIMP nsMsgDBView::DoCommand(nsMsgViewCommandTypeValue command)
rv = ExpandAndSelectThread();
break;
case nsMsgViewCommandType::selectFlagged:
-#ifdef DEBUG_seth
- printf("clear current selection, and then select all flagged messages, we may have to expand all first to look for them\n");
-#endif
+ if (!mTreeSelection)
+ rv = NS_ERROR_UNEXPECTED;
+ else
+ {
+ mTreeSelection->SetSelectEventsSuppressed(PR_TRUE);
+ mTreeSelection->ClearSelection();
+ // XXX ExpandAll?
+ nsMsgViewIndex numIndices = GetSize();
+ for (nsMsgViewIndex curIndex = 0; curIndex < numIndices; curIndex++)
+ {
+ if (m_flags.GetAt(curIndex) & MSG_FLAG_MARKED)
+ mTreeSelection->ToggleSelect(curIndex);
+ }
+ mTreeSelection->SetSelectEventsSuppressed(PR_FALSE);
+ }
break;
case nsMsgViewCommandType::markAllRead:
if (m_folder)