From 1222f0daacf03dfb567381720be6cf4dc56b82a6 Mon Sep 17 00:00:00 2001 From: "bugzilla%standard8.demon.co.uk" Date: Mon, 19 Mar 2007 19:58:12 +0000 Subject: [PATCH] Bug 373240 Uppercase the VK_* bits for consistency with the rest of the codebase (CV1, mailnews) r=neil,sr=mscott --- .../base/resources/content/mailWidgets.xml | 350 +++++++++--------- 1 file changed, 176 insertions(+), 174 deletions(-) diff --git a/mailnews/base/resources/content/mailWidgets.xml b/mailnews/base/resources/content/mailWidgets.xml index 201832b0d24..ac3051a264b 100644 --- a/mailnews/base/resources/content/mailWidgets.xml +++ b/mailnews/base/resources/content/mailWidgets.xml @@ -30,12 +30,12 @@ this.selectedItems.push(els[i]); ]]> - + - - + @@ -44,20 +44,20 @@ var suppress = this._suppressOnSelect; if (timeout != -1) this._suppressOnSelect = true; - + this.selectItem(item); - - this._suppressOnSelect = suppress; - + + this._suppressOnSelect = suppress; + if (timeout != -1) { if (this._selectTimeout) window.clearTimeout(this._selectTimeout); - - this._selectTimeout = window.setTimeout(this._selectTimeoutHandler, timeout, this); + + this._selectTimeout = window.setTimeout(this._selectTimeoutHandler, timeout, this); } ]]> - + @@ -71,7 +71,7 @@ ]]> - + @@ -132,14 +132,14 @@ this._currentItem.removeAttribute("current"); this._currentItem = val; if (val) - val.setAttribute("current", "true"); + val.setAttribute("current", "true"); return val; ]]> - + - + @@ -147,8 +147,8 @@ return index < this.selectedItems.length ? this.selectedItems[index] : null; ]]> - - + + @@ -156,34 +156,34 @@ if (this.selType != "multiple" && this.selectedCount) return; if (item.hasAttribute("selected")) - return; + return; this.selectedItems.push(item); - item.setAttribute("selected", "true"); + item.setAttribute("selected", "true"); this._fireOnSelect(); ]]> - - + + - - + + @@ -194,33 +194,33 @@ this.addItemToSelection(item); ]]> - - + + - - + + @@ -233,24 +233,24 @@ startItem = this._selectionStart ? this._selectionStart : this.currentItem; if (!startItem) startItem = endItem; - + var suppressSelect = this._suppressOnSelect; this._suppressOnSelect = true; this.clearSelection(); this._selectionStart = startItem; - + var currentItem; var startIndex = this.getIndexOfItem(startItem); var endIndex = this.getIndexOfItem(endItem); if (endIndex < startIndex) { currentItem = endItem; endItem = startItem; - startItem = currentItem; + startItem = currentItem; } else { currentItem = startItem; } - + while (currentItem) { if (currentItem.localName == "descriptionitem") this.addItemToSelection(currentItem); @@ -260,51 +260,51 @@ } this._suppressOnSelect = suppressSelect; - + this._fireOnSelect(); ]]> - - + + - - + + - - + + = 0; --i) this.selectedItems[i].removeAttribute("selected"); - + this.selectedItems.splice(0, this.selectedItems.length); } this._selectionStart = null; @@ -336,7 +336,7 @@ return null; ]]> - + @@ -353,13 +353,13 @@ ]]> - + - - - + - 1 ) this.removeItemFromSelection(this.selectedItems[l-1]); if ( l <= 2 ) this._isUpSelection=0; } - else + else { this.addItemToSelection(n); this._isDownSelection=1; @@ -421,73 +421,74 @@ - 1 ) this.removeItemFromSelection(this.selectedItems[l-1]); if ( l <= 2 ) this._isDownSelection=0; - } else + } + else { this.addItemToSelection(n); this._isUpSelection=1; } - } + } ]]> - - - + + + - + - + - + - - + + - + - + - + @@ -495,13 +496,13 @@ @@ -510,7 +511,7 @@ if (event.button != 0) return; var targetItem = event.target; - if (targetItem.localName == "descriptionitem") + if (targetItem.localName == "descriptionitem") { if (this.selType != "multiple") this.selectItem(targetItem); @@ -527,15 +528,15 @@ clicked, UNLESS it was a right-click. We have to do this in click rather than mousedown so that you can drag a selected group of items */ - + var selectedItems = this.selectedItems; var didSuppressSelect = false; var i = 0; - while (i < selectedItems.length) + while (i < selectedItems.length) { - if (selectedItems[i] != targetItem) + if (selectedItems[i] != targetItem) { - if (!didSuppressSelect) + if (!didSuppressSelect) { this._suppressOnSelect = true; didSuppressSelect = true; @@ -549,7 +550,7 @@ this._suppressOnSelect = false; } } - else + else { if (this.selType != "multiple" || (!event.ctrlKey && !event.shiftKey && !event.metaKey)) this.clearSelection(); @@ -575,10 +576,10 @@ - + - @@ -586,17 +587,17 @@ - + - + - @@ -604,10 +605,10 @@ - + - + @@ -617,9 +618,9 @@ - + @@ -636,7 +637,7 @@ readonly="true"/> - + @@ -665,8 +666,8 @@ created around for the lifetime of the widget. mSizeOfAddressCache controls how many of these elements we keep around --> 3 - - @@ -677,7 +678,7 @@ ]]> - + @@ -721,12 +722,12 @@ 1) numExistingCachedAddresses = (numExistingCachedAddresses + 1)/ 2; - - var index = 0; + + var index = 0; var numAddressesAdded = 0; var emailAddressNode; var commaNode; @@ -760,7 +761,7 @@ @@ -773,7 +774,7 @@ // before we try to create email address nodes, try to leverage any cached nodes... var remainder = this.fillCachedAddresses(aAddressesNode, aNumAddressesToShow); - var index = numAddresses - remainder; + var index = numAddresses - remainder; while (index < numAddresses && index < aNumAddressesToShow) { var newAddressNode = document.createElement("mail-emailaddress"); @@ -783,8 +784,8 @@ textNode.setAttribute("value", ", "); textNode.setAttribute("class", "emailSeparator"); aAddressesNode.appendChild(textNode); - } - + } + var itemInDocument = aAddressesNode.appendChild(newAddressNode); this.updateEmailAddressNode(itemInDocument, this.mAddresses[index]); index++; @@ -796,7 +797,7 @@ + readonly="true"/> @@ -806,7 +807,7 @@ + ]]> @@ -823,7 +824,7 @@ ]]> - + @@ -836,11 +837,11 @@ var numItemsInNode = aParentNode.childNodes.length; while (numItemsInNode && (numItemsInNode > numItemsToPreserve)) - { + { aParentNode.removeChild(aParentNode.childNodes[numItemsInNode-1]); numItemsInNode = numItemsInNode - 1; } - ]]> + ]]> @@ -848,7 +849,7 @@ - + - - - + + = 0; --i) headerValueNode.removeChild(headerValueNode.childNodes[i]); - + var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] .getService(Components.interfaces.nsIMsgTagService); - + // tokenize the keywords based on ' ' var tagsArray = aTags.split(' '); for (var index = 0; index < tagsArray.length; index++) @@ -923,15 +924,15 @@ // color of the tag and append it. var tagName; try { - // if we got a bad tag name, getTagForKey will throw an exception, skip it + // if we got a bad tag name, getTagForKey will throw an exception, skip it // and go to the next one. tagName = tagService.getTagForKey(tagsArray[index]); } catch (ex) { continue; } - + var color = tagService.getColorForKey(tagsArray[index]); - + // now create a label for the tag name, and set the color - var label = document.createElement("label"); + var label = document.createElement("label"); label.setAttribute('value', tagName); label.style.color = color; label.className = "tagvalue"; @@ -989,7 +990,7 @@ try { var hdrs = pref.getCharPref("mailnews.customHeaders"); - hdrs = hdrs.replace(/\s+/g,''); //remove white spaces before splitting + hdrs = hdrs.replace(/\s+/g, ""); //remove white spaces before splitting hdrsArray = hdrs.match(/[^:]+/g); } catch(ex) @@ -1077,7 +1078,7 @@ - + @@ -1142,7 +1143,7 @@ var optargets = this.optargets; if (optargets) { - for (i=0; i < optargets.length; i++) { + for (i = 0; i < optargets.length; ++i) { optargets[i].opParentValue = menulist.value; } } @@ -1220,7 +1221,7 @@ @@ -1247,7 +1248,7 @@ - null null null - + @@ -1517,7 +1518,7 @@ var children = parentNode.childNodes; var len=children.length; for (var i=0; i @@ -1607,7 +1608,7 @@ ]]> - + - - - @@ -1663,7 +1664,7 @@ var stringBundle = this.stringBundle; var andString = val ? "And" : "Or"; for (var i=0; i0) @@ -1678,7 +1679,7 @@ nsMsgSearchAttrib.OtherHeader && this.searchAttribute < nsMsgSearchAttrib.kNumMsgSearchAttributes) + if (this.searchAttribute > nsMsgSearchAttrib.OtherHeader && this.searchAttribute < nsMsgSearchAttrib.kNumMsgSearchAttributes) searchTerm.arbitraryHeader = this.searchattribute.label; searchTerm.op = this.searchoperator.value; if (this.searchvalue.value) @@ -2004,7 +2005,7 @@ return false; var msgFolder = GetFolderResource(folderTree, row).QueryInterface(Components.interfaces.nsIMsgFolder); - if (!msgFolder || msgFolder.isServer) + if (!msgFolder || msgFolder.isServer) return false; var asyncResults = {}; return document.getAnonymousNodes(this)[0].parseFolder(msgFolder, null, asyncResults); @@ -2021,7 +2022,7 @@ - + 8 @@ -2037,7 +2038,7 @@ // skip servers, Trash and Junk folders if (!aFolder || aFolder.isServer || aFolder.getFlag(kMsgPopupFolderFlagJunk) || aFolder.getFlag(kMsgPopupFolderFlagTrash)) return false; - var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); + var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch); var showPreviewText = pref.getBoolPref("mail.biff.alert.show_preview"); var folderArray = new Array; if (aFolder.flags & MSG_FOLDER_FLAG_VIRTUAL) @@ -2048,7 +2049,7 @@ var srchFolderUriArray = srchFolderUri.split('|'); var foldersAdded = 0; var RDF = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService().QueryInterface(Components.interfaces.nsIRDFService); - for (var i in srchFolderUriArray) + for (var i in srchFolderUriArray) { var realFolder = RDF.GetResource(srchFolderUriArray[i]).QueryInterface(Components.interfaces.nsIMsgFolder); if (!realFolder.isServer) @@ -2085,20 +2086,20 @@ // fetchMsgPreviewText throws an error when we call it on a news folder, we should just not show // the tooltip if this method returns an error. aFolder.setMsgDatabase(null); - continue; + continue; } } // if fetching the preview text is going to be an asynch operation and the caller - // is set up to handle that fact, then don't bother filling in any of the fields since + // is set up to handle that fact, then don't bother filling in any of the fields since // we'll have to do this all over again when the fetch for the preview text completes. // We don't expect to get called with a urlListener if we're doing a virtual folder. if (aOutAsync.value && aUrlListener) - return false; + return false; var unicodeConverter = Components.classes["@mozilla.org/intl/scriptableunicodeconverter"] .createInstance(Components.interfaces.nsIScriptableUnicodeConverter); - unicodeConverter.charset = "UTF-8"; + unicodeConverter.charset = "UTF-8"; foundNewMsg = true; - + var index = 0; var hdrParser = Components.classes["@mozilla.org/messenger/headerparser;1"].getService(Components.interfaces.nsIMsgHeaderParser); while (document.getAnonymousNodes(this)[0].childNodes.length < this.mMaxMsgHdrsInPopup && index < numMsgKeys.value) @@ -2134,10 +2135,10 @@ msgPopup.folderUri = aFolder.URI; msgPopup.msgKey = msgHdr.messageKey; document.getAnonymousNodes(this)[0].appendChild(msgPopup); - } + } if (document.getAnonymousNodes(this)[0].childNodes.length >= this.mMaxMsgHdrsInPopup) - return true; - } + return true; + } return foundNewMsg; ]]> @@ -2147,8 +2148,8 @@ @@ -2169,7 +2170,8 @@ - +