From 8777455d055b79a00a8b2a34bb452ce1791ed9db Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Wed, 7 Aug 2002 06:50:13 +0000 Subject: [PATCH] fix for #124269. fix the behaviour of select all (ctrl a) when the folder pane has focus. forward the command to the thread pane, and do a select all there. then, set focus to the thread pane. disable the command if there is no thread view (gDBView), so that the command is disabled when we've got a server selected in the folder pane and account central is showing. r/sr=bienvenu git-svn-id: svn://10.0.0.236/trunk@126634 18797224-902f-48f8-a5cc-f745e15eee43 --- .../content/mail3PaneWindowCommands.js | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js b/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js index 00657218b60..8b59e27d124 100644 --- a/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js +++ b/mozilla/mailnews/base/resources/content/mail3PaneWindowCommands.js @@ -53,6 +53,17 @@ var FolderPaneController = switch ( command ) { case "cmd_selectAll": + // the folder pane (currently) + // only handles single selection + // so we forward select all to the thread pane + // if there is no DBView + // don't bother sending to the thread pane + // this can happen when we've selected a server + // and account central is displayed + if (!gDBView) + return false; + else + return true; case "cmd_cut": case "cmd_copy": case "cmd_paste": @@ -111,6 +122,12 @@ var FolderPaneController = case "button_delete": MsgDeleteFolder(); break; + case "cmd_selectAll": + // the folder pane (currently) + // only handles single selection + // so we forward select all to the thread pane + SendCommandToThreadPane(command); + break; } }, @@ -1103,4 +1120,12 @@ function IsFakeAccount() { return false; } +function SendCommandToThreadPane(command) +{ + ThreadPaneController.doCommand(command); + + // if we are sending the command so the thread pane + // we should focus the thread pane + SetFocusThreadPane(); +}