rem: EnableMenuItem("folderPaneContext-searchMessages", IsCanSearchMessagesEnabled() && !isVirtualFolder); 
add: goUpdateCommand('cmd_search'); 
context: function fillFolderPaneContextMenu(){  if (IsFakeAccount())    return false;  var folderTree = GetFolderTree();  var startIndex = {};  var endIndex = {};  folderTree.view.selection.getRangeAt(0, startIndex, endIndex);  if (startIndex.value < 0)    return false;  var numSelected = endIndex.value - startIndex.value + 1;  var folderResource = GetFolderResource(folderTree, startIndex.value);  var folder = GetMsgFolderFromUri(folderResource.Value, false);  var isVirtualFolder = folder ? folder.flags & MSG_FOLDER_FLAG_VIRTUAL : false;  var isServer = GetFolderAttribute(folderTree, folderResource, "IsServer") == 'true';  var serverType = GetFolderAttribute(folderTree, folderResource, "ServerType");  var specialFolder = GetFolderAttribute(folderTree, folderResource, "SpecialFolder");  var canSubscribeToFolder = (serverType == "nntp") || (serverType == "imap");  var isNewsgroup = !isServer && serverType == 'nntp';  var isMailFolder = !isServer && serverType != 'nntp';  var canGetMessages =  (isServer && (serverType != "nntp") && (serverType !="none")) || isNewsgroup;  EnableMenuItem("folderPaneContext-properties", true);  SetupNewMenuItem(folderResource, numSelected, isServer, serverType, specialFolder);  SetupRenameMenuItem(folderResource, numSelected, isServer, serverType, specialFolder);  SetupRemoveMenuItem(folderResource, numSelected, isServer, serverType, specialFolder);  SetupCompactMenuItem(folderResource, numSelected);  SetupFavoritesMenuItem(folderResource, numSelected, isServer, 'folderPaneContext-favoriteFolder');  ShowMenuItem("folderPaneContext-copy-location", !isServer && !isVirtualFolder);  ShowMenuItem("folderPaneContext-emptyTrash", (numSelected <= 1) && (specialFolder == 'Trash'));  EnableMenuItem("folderPaneContext-emptyTrash", true);  ShowMenuItem("folderPaneContext-emptyJunk", (numSelected <= 1) && (specialFolder == 'Junk'));  EnableMenuItem("folderPaneContext-emptyJunk", true);  var showSendUnsentMessages = (numSelected <= 1)     && (specialFolder == 'Unsent Messages' || specialFolder == 'Unsent');  ShowMenuItem("folderPaneContext-sendUnsentMessages", showSendUnsentMessages);  if (showSendUnsentMessages)     EnableMenuItem("folderPaneContext-sendUnsentMessages", IsSendUnsentMsgsEnabled(folderResource));  ShowMenuItem("folderPaneContext-subscribe", (numSelected <= 1) && canSubscribeToFolder && !isVirtualFolder);  EnableMenuItem("folderPaneContext-subscribe", !isVirtualFolder);  // XXX: Hack for RSS servers...  ShowMenuItem("folderPaneContext-rssSubscribe", (numSelected <= 1) && (serverType == "rss"));  EnableMenuItem("folderPaneContext-rssSubscribe", true);    // News folder context menu =============================================  ShowMenuItem("folderPaneContext-newsUnsubscribe", (numSelected <= 1) && canSubscribeToFolder && isNewsgroup);  EnableMenuItem("folderPaneContext-newsUnsubscribe", true);  ShowMenuItem("folderPaneContext-markNewsgroupAllRead", (numSelected <= 1) && isNewsgroup);  EnableMenuItem("folderPaneContext-markNewsgroupAllRead", true);  // End of News folder context menu =======================================  ShowMenuItem("folderPaneContext-markMailFolderAllRead", (numSelected <= 1) && isMailFolder && !isVirtualFolder);  EnableMenuItem("folderPaneContext-markMailFolderAllRead", !isVirtualFolder);  ShowMenuItem("folderPaneContext-searchMessages", (numSelected<=1) && !isVirtualFolder);  EnableMenuItem("folderPaneContext-searchMessages", IsCanSearchMessagesEnabled() && !isVirtualFolder);  // Hide / Show our menu separators based on the menu items we are showing.  ShowMenuItem("folderPaneContext-sep1", (numSelected <= 1) && !isServer);  ShowMenuItem('folderPaneContext-sep2', shouldShowSeparator('folderPaneContext-sep2'));   ShowMenuItem("folderPaneContext-sep3", shouldShowSeparator('folderPaneContext-sep3')); // we always show the separator before properties menu item  return(true);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/10234/efed0d38ec93dd597bbe68acab8a2553175cb0f1/mailContextMenus.js/buggy/mail/base/content/mailContextMenus.js