From f12b75e414e14d83f5dea2958c797e0fbf031d1a Mon Sep 17 00:00:00 2001 From: "ssu%netscape.com" Date: Tue, 11 Jun 2002 23:10:04 +0000 Subject: [PATCH] fixing bug 114952 - Labels: not available in standalone msg window, Message & context menu items disabled. r=varada, sr=bienvenu --- .../base/resources/content/messageWindow.js | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/mailnews/base/resources/content/messageWindow.js b/mailnews/base/resources/content/messageWindow.js index d7b917d8837c..1c26d2572016 100644 --- a/mailnews/base/resources/content/messageWindow.js +++ b/mailnews/base/resources/content/messageWindow.js @@ -336,6 +336,20 @@ function GetSelectedMessages() return messageArray; } +function GetSelectedIndices(dbView) +{ + try { + var indicesArray = {}; + var length = {}; + dbView.getIndicesForSelection(indicesArray,length); + return indicesArray.value; + } + catch (ex) { + dump("ex = " + ex + "\n"); + return null; + } +} + function GetLoadedMsgFolder() { if(gCurrentFolderUri) @@ -460,6 +474,12 @@ var MessageWindowController = case "cmd_markAllRead": case "cmd_markThreadAsRead": case "cmd_markAsFlagged": + case "cmd_label0": + case "cmd_label1": + case "cmd_label2": + case "cmd_label3": + case "cmd_label4": + case "cmd_label5": case "button_file": case "cmd_file": case "cmd_settingsOffline": @@ -519,6 +539,13 @@ var MessageWindowController = case "cmd_markAsRead": case "cmd_markAllRead": case "cmd_markThreadAsRead": + case "cmd_label0": + case "cmd_label1": + case "cmd_label2": + case "cmd_label3": + case "cmd_label4": + case "cmd_label5": + return(true); case "cmd_markAsFlagged": case "button_file": case "cmd_file": @@ -666,6 +693,24 @@ var MessageWindowController = case "cmd_markAsFlagged": MsgMarkAsFlagged(null); return; + case "cmd_label0": + gDBView.doCommand(nsMsgViewCommandType.label0); + return; + case "cmd_label1": + gDBView.doCommand(nsMsgViewCommandType.label1); + return; + case "cmd_label2": + gDBView.doCommand(nsMsgViewCommandType.label2); + return; + case "cmd_label3": + gDBView.doCommand(nsMsgViewCommandType.label3); + return; + case "cmd_label4": + gDBView.doCommand(nsMsgViewCommandType.label4); + return; + case "cmd_label5": + gDBView.doCommand(nsMsgViewCommandType.label5); + return; case "cmd_downloadFlagged": MsgDownloadFlagged(); return;