rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
printService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSetInterface.kInitSaveAll);
printService.initPrintSettingsFromPrefs(gPrintSettings, gPrintSetInterface.kInitSaveAll);
function setPrinterDefaultsForSelectedPrinter(){ gPrintSettings.printerName = dialog.printerList.value; dialog.descText.value = getPrinterDescription(gPrintSettings.printerName); // First get any defaults from the printer printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings); // now augment them with any values from last time printService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSetInterface.kInitSaveAll); if (doDebug) { dump("setPrinterDefaultsForSelectedPrinter: printerName='"+gPrintSettings.printerName+"', paperName='"+gPrintSettings.paperName+"'\n"); }}
gPrintService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSettingsInterface.kInitSaveAll);
gPrintService.initPrintSettingsFromPrefs(gPrintSettings, gPrintSettingsInterface.kInitSaveAll);
function setPrinterDefaultsForSelectedPrinter(){ if (gPrintSettings.printerName == "") { gPrintSettings.printerName = gPrintService.defaultPrinterName; } // First get any defaults from the printer gPrintService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings); // now augment them with any values from last time gPrintService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSettingsInterface.kInitSaveAll); if (gDoDebug) { dump("pagesetup/setPrinterDefaultsForSelectedPrinter: printerName='"+gPrintSettings.printerName+"', orientation='"+gPrintSettings.orientation+"'\n"); }}
dialog.descText.value = getPrinterDescription(gPrintSettings.printerName);
function setPrinterDefaultsForSelectedPrinter(){ gPrintSettings.printerName = dialog.printerList.value; // First get any defaults from the printer printService.initPrintSettingsFromPrinter(gPrintSettings.printerName, gPrintSettings); // now augment them with any values from last time printService.initPrintSettingsFromPrefs(gPrintSettings, true, gPrintSetInterface.kInitSaveAll); if (doDebug) { dump("setPrinterDefaultsForSelectedPrinter: printerName='"+gPrintSettings.printerName+"', paperName='"+gPrintSettings.paperName+"'\n"); }}
if (!filename) return;
function SetProgressFinished(filename, networkStatus){ if (!filename) return; if (filename) { var status = networkStatus ? "failed" : "done"; if (networkStatus == 0) gSucceededCount++; if (SetProgressStatus(filename, status)) gFinishedCount++; } if (networkStatus != 0) { // XXX Interpret networkStatus and call SetStatusMessage() with // appropriate error description. if (filename == gPublishData.filename) gFinalMessage = GetString("PublishFailed"); else gFinalMessage = GetString("PublishSomeFileFailed"); } if (gFinishedCount == gTotalFileCount || !filename) { gFinished = true; gDialog.Close.setAttribute("label", GetString("Close")); gFinalMessage = GetString("PublishCompleted"); } SetStatusMessage(gFinalMessage);}
if (gFinishedCount == gTotalFileCount || !filename)
else if (gFinishedCount == gTotalFileCount || !filename)
function SetProgressFinished(filename, networkStatus){ if (!filename) return; if (filename) { var status = networkStatus ? "failed" : "done"; if (networkStatus == 0) gSucceededCount++; if (SetProgressStatus(filename, status)) gFinishedCount++; } if (networkStatus != 0) { // XXX Interpret networkStatus and call SetStatusMessage() with // appropriate error description. if (filename == gPublishData.filename) gFinalMessage = GetString("PublishFailed"); else gFinalMessage = GetString("PublishSomeFileFailed"); } if (gFinishedCount == gTotalFileCount || !filename) { gFinished = true; gDialog.Close.setAttribute("label", GetString("Close")); gFinalMessage = GetString("PublishCompleted"); } SetStatusMessage(gFinalMessage);}
if (filename == gPublishData.filename)
if (!gPublishData.publishOtherFiles || filename == gPublishData.filename)
function SetProgressFinished(filename, networkStatus){ if (filename) { var status = networkStatus ? "failed" : "done"; if (networkStatus == 0) gSucceededCount++; if (SetProgressStatus(filename, status)) gFinishedCount++; } if (networkStatus != 0) { // XXX Interpret networkStatus and call SetStatusMessage() with // appropriate error description. if (filename == gPublishData.filename) gFinalMessage = GetString("PublishFailed"); else gFinalMessage = GetString("PublishSomeFileFailed"); } else if (gFinishedCount == gTotalFileCount || !filename) { gFinished = true; gDialog.Close.setAttribute("label", GetString("Close")); gFinalMessage = GetString("PublishCompleted"); } if (gFinalMessage) SetStatusMessage(gFinalMessage);}
AllowDefaultButton();
function SetProgressFinished(filename, networkStatus){ if (filename) { var status = networkStatus ? "failed" : "done"; if (networkStatus == 0) gSucceededCount++; if (SetProgressStatus(filename, status)) gFinishedCount++; } if (networkStatus != 0) { // XXX Interpret networkStatus and call SetStatusMessage() with // appropriate error description. if (filename == gPublishData.filename) gFinalMessage = GetString("PublishFailed"); else gFinalMessage = GetString("PublishSomeFileFailed"); } else if (gFinishedCount == gTotalFileCount || !filename) { gFinished = true; gDialog.Close.setAttribute("label", GetString("Close")); gFinalMessage = GetString("PublishCompleted"); } if (gFinalMessage) SetStatusMessage(gFinalMessage);}
checkbox.setAttribute("collapsed", "true");
checkbox.collapsed = true;
function SetRelativeCheckbox(checkbox){ if (!checkbox) { checkbox = document.getElementById("MakeRelativeCheckbox"); if (!checkbox) return; } var editor = GetCurrentEditor(); // Mail never allows relative URLs, so hide the checkbox if (editor && (editor.flags & Components.interfaces.nsIPlaintextEditor.eEditorMailMask)) { checkbox.setAttribute("collapsed", "true"); return; } var input = document.getElementById(checkbox.getAttribute("for")); if (!input) return; var url = TrimString(input.value); var urlScheme = GetScheme(url); // Check it if url is relative (no scheme). checkbox.checked = url.length > 0 && !urlScheme; // Now do checkbox enabling: var enable = false; var docUrl = GetDocumentBaseUrl(); var docScheme = GetScheme(docUrl); if (url && docUrl && docScheme) { if (urlScheme) { // Url is absolute // If we can make a relative URL, then enable must be true! // (this lets the smarts of MakeRelativeUrl do all the hard work) enable = (GetScheme(MakeRelativeUrl(url)).length == 0); } else { // Url is relative // Check if url is a named anchor // but document doesn't have a filename // (it's probably "index.html" or "index.htm", // but we don't want to allow a malformed URL) if (url[0] == "#") { var docFilename = GetFilename(docUrl); enable = docFilename.length > 0; } else { // Any other url is assumed // to be ok to try to make absolute enable = true; } } } SetElementEnabled(checkbox, enable);}
if (this.mMsgNotificationBar.selectedIndex != kMsgNotificationJunkBar && this.mMsgNotificationBar.selectedIndex != kMsgNotificationPhishingBar)
if (this.mMsgNotificationBar.selectedIndex == kMsgNotificationNoStatus)
setRemoteContentMsg: function (aMsgHdr) { // The phishing message and junk message takes precedence over the remote content msg if (this.mMsgNotificationBar.selectedIndex != kMsgNotificationJunkBar && this.mMsgNotificationBar.selectedIndex != kMsgNotificationPhishingBar) this.updateMsgNotificationBar(aMsgHdr && aMsgHdr.getUint32Property("remoteContentPolicy") == kBlockRemoteContent ? kMsgNotificationRemoteImages : kMsgNotificationNoStatus); },
var enable = newWord.length > 0 && newWord != MisspelledWord;
var enable = newWord.length > 0 && newWord != gMisspelledWord;
function SetReplaceEnable(){ // Enable "Change..." buttons only if new word is different than misspelled var newWord = dialog.ReplaceWordInput.value; var enable = newWord.length > 0 && newWord != MisspelledWord; SetElementEnabledById("Replace", enable); SetElementEnabledById("ReplaceAll", enable); if (enable) { dialog.ReplaceButton.setAttribute("default","true"); dialog.IgnoreButton.removeAttribute("default"); } else { dialog.IgnoreButton.setAttribute("default","true"); dialog.ReplaceButton.removeAttribute("default"); }}
var item = screenResolution.getElementsByAttribute( "value", resolution )[0]; if (item)
var items = screenResolution.getElementsByAttribute( "value", resolution ); if (items.length)
function setResolution( resolution ) { // Given a number, if it's equal to a hard-coded resolution we use that, // otherwise we set the userResolution field. var screenResolution = document.getElementById( "screenResolution" ); var userResolution = document.getElementById( "userResolution" ); var item = screenResolution.getElementsByAttribute( "value", resolution )[0]; if (item) { // If it's one of the hard-coded values, we'll select it directly screenResolution.selectedItem = item; userResolution.setAttribute( "hidden", "true" ); } else { // Otherwise we need to set up the userResolution field var dpi = screenResolution.getAttribute( "dpi" ); userResolution.setAttribute( "value", resolution ); userResolution.setAttribute( "label", dpi.replace(/\$val/, resolution) ); userResolution.removeAttribute( "hidden" ); screenResolution.selectedItem = userResolution; } }
screenResolution.selectedItem = item;
screenResolution.selectedItem = items[0];
function setResolution( resolution ) { // Given a number, if it's equal to a hard-coded resolution we use that, // otherwise we set the userResolution field. var screenResolution = document.getElementById( "screenResolution" ); var userResolution = document.getElementById( "userResolution" ); var item = screenResolution.getElementsByAttribute( "value", resolution )[0]; if (item) { // If it's one of the hard-coded values, we'll select it directly screenResolution.selectedItem = item; userResolution.setAttribute( "hidden", "true" ); } else { // Otherwise we need to set up the userResolution field var dpi = screenResolution.getAttribute( "dpi" ); userResolution.setAttribute( "value", resolution ); userResolution.setAttribute( "label", dpi.replace(/\$val/, resolution) ); userResolution.removeAttribute( "hidden" ); screenResolution.selectedItem = userResolution; } }
DWREngine._triggerNextPoll(0);
DWREngine._poll();
DWREngine.setReverseAjax = function(reverseAjax) { DWREngine._reverseAjax = reverseAjax; if (DWREngine._reverseAjax) { DWREngine._triggerNextPoll(0); }};
DWREngine.setReverseAjax = function(reverseAjax) { DWREngine._reverseAjax = reverseAjax; if (DWREngine._reverseAjax) DWREngine._poll();
dwr.engine.setReverseAjax = function(reverseAjax) { dwr.engine._reverseAjax = reverseAjax; if (dwr.engine._reverseAjax) dwr.engine._poll();
DWREngine.setReverseAjax = function(reverseAjax) { DWREngine._reverseAjax = reverseAjax; if (DWREngine._reverseAjax) DWREngine._poll();};
document.getElementById("historyOutlinerBody").setAttribute("ref", root);
document.getElementById("historyOutliner").setAttribute("ref", root);
function setRoot(root){ var windowNode = document.getElementById("history-window"); windowNode.setAttribute("title", gHistoryBundle.getString("search_results_title")); document.getElementById("historyOutlinerBody").setAttribute("ref", root);}
DWREngine.setRpcType = function(newType) { if (newType != DWREngine.XMLHttpRequest && newType != DWREngine.IFrame && newType != DWREngine.ScriptTag) { DWREngine._handleError(null, { name:"dwrengine.invalidRpcType", message:"RpcType must be one of DWREngine.XMLHttpRequest or DWREngine.IFrame or DWREngine.ScriptTag" });
dwr.engine.setRpcType = function(newType) { if (newType != dwr.engine.XMLHttpRequest && newType != dwr.engine.IFrame && newType != dwr.engine.ScriptTag) { dwr.engine._handleError(null, { name:"dwr.engine.invalidRpcType", message:"RpcType must be one of dwr.engine.XMLHttpRequest or dwr.engine.IFrame or dwr.engine.ScriptTag" });
DWREngine.setRpcType = function(newType) { if (newType != DWREngine.XMLHttpRequest && newType != DWREngine.IFrame && newType != DWREngine.ScriptTag) { DWREngine._handleError(null, { name:"dwrengine.invalidRpcType", message:"RpcType must be one of DWREngine.XMLHttpRequest or DWREngine.IFrame or DWREngine.ScriptTag" }); return; } DWREngine._rpcType = newType;};
DWREngine._rpcType = newType;
dwr.engine._rpcType = newType;
DWREngine.setRpcType = function(newType) { if (newType != DWREngine.XMLHttpRequest && newType != DWREngine.IFrame && newType != DWREngine.ScriptTag) { DWREngine._handleError(null, { name:"dwrengine.invalidRpcType", message:"RpcType must be one of DWREngine.XMLHttpRequest or DWREngine.IFrame or DWREngine.ScriptTag" }); return; } DWREngine._rpcType = newType;};
var searchTermElements = gSearchTermContainer.childNodes; if (!searchTermElements) return; dump("..on " + searchTermElements.length + " elements.\n"); for (var i=0; i<searchTermElements.length; i++) { searchTermElements[i].searchattribute.searchScope = scope;
dump("..on " + gSearchTerms.length + " elements.\n"); for (var i=0; i<gSearchTerms.length; i++) { gSearchTerms[i].searchattribute.searchScope = scope;
function setSearchScope(scope) { dump("Setting search scope to " + scope + "\n"); gSearchScope = scope; var searchTermElements = gSearchTermContainer.childNodes; if (!searchTermElements) return; dump("..on " + searchTermElements.length + " elements.\n"); for (var i=0; i<searchTermElements.length; i++) { searchTermElements[i].searchattribute.searchScope = scope; }}
gSearchTerms[i].obj.searchattribute.onSelect(null );
function setSearchScope(scope) { gSearchScope = scope; for (var i=0; i<gSearchTerms.length; i++) { gSearchTerms[i].obj.searchattribute.searchScope = scope; gSearchTerms[i].scope = scope; }}
if ("gBrowser" in window) { gBrowser.boxObject.setPropertyAsSupports("xulwindow", window); gBrowser.boxObject.setPropertyAsSupports("secureBrowserUI", securityUI); }
function SetSecurityButton(){ var ui = Components.classes["@mozilla.org/secure_browser_ui;1"].createInstance(); securityUI = ui.QueryInterface(Components.interfaces.nsSecureBrowserUI); var button = document.getElementById('security-button'); if (button && window._content) securityUI.init(window._content, button);}
if (button && window.content) securityUI.init(window.content, button);
if (button && window._content) securityUI.init(window._content, button);
function SetSecurityButton(){ dump("in SetSecurityButton\n"); var ui = Components.classes["component://netscape/secure_browser_ui"].createInstance(); securityUI = ui.QueryInterface(Components.interfaces.nsSecureBrowserUI); var button = document.getElementById('security-button'); if (button && window.content) securityUI.init(window.content, button);}
var ui = Components.classes["component:
var ui = Components.classes["@mozilla.org/secure_browser_ui;1"].createInstance();
function SetSecurityButton(){ dump("in SetSecurityButton\n"); var ui = Components.classes["component://netscape/secure_browser_ui"].createInstance(); securityUI = ui.QueryInterface(Components.interfaces.nsSecureBrowserUI); var button = document.getElementById('security-button'); if (button && window._content) securityUI.init(window._content, button);}
senderOrRecipientColumn.setAttribute("tooltiptext", gMessengerBundle.getString("senderColumnTooltip"));
function SetSentFolderColumns(isSentFolder){ var senderOrRecipientColumn = document.getElementById("senderOrRecipientCol"); var searchCriteria = document.getElementById("searchCriteria"); if(isSentFolder) { senderOrRecipientColumn.setAttribute("label", gMessengerBundle.getString("recipientColumnHeader")); searchCriteria.setAttribute("value", gMessengerBundle.getString("recipientSearchCriteria")); } else { senderOrRecipientColumn.setAttribute("label", gMessengerBundle.getString("senderColumnHeader")); searchCriteria.setAttribute("value", gMessengerBundle.getString("senderSearchCriteria")); }}
SetFolderPicker(uri, "runFiltersFolder");
var firstFolderURI = getFirstFolderURI(msgFolder); SetFolderPicker(firstFolderURI, "runFiltersFolder");
function setServer(uri){ if (uri == gCurrentServerURI) return; var resource = gRDF.GetResource(uri); var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder); //Calling getFilterList will detect any errors in rules.dat, backup the file, and alert the user //we need to do this because gFilterTree.setAttribute will cause rdf to call getFilterList and there is //no way to pass msgWindow in that case. if (msgFolder) msgFolder.getFilterList(gFilterListMsgWindow); rebuildFilterTree(uri); // root the folder picker to this server gRunFiltersFolderPicker.setAttribute("ref", uri); // run filters after the fact not supported by news if (msgFolder.server.type == "nntp" && !msgFolder.isServer) { gRunFiltersFolderPicker.setAttribute("hidden", "true"); gRunFiltersButton.setAttribute("hidden", "true"); gRunFiltersFolderPickerLabel.setAttribute("hidden", "true"); } else { gRunFiltersFolderPicker.removeAttribute("hidden"); gRunFiltersButton.removeAttribute("hidden"); gRunFiltersFolderPickerLabel.removeAttribute("hidden"); // for POP3 and IMAP, select the first folder, which is the INBOX gRunFiltersFolderPicker.selectedIndex = 0; } SetFolderPicker(uri, "runFiltersFolder"); updateButtons(); gCurrentServerURI = uri;}
gCurrentServerURI = uri;
gCurrentServerURI = firstFolderURI;
function setServer(uri){ if (uri == gCurrentServerURI) return; var resource = gRDF.GetResource(uri); var msgFolder = resource.QueryInterface(Components.interfaces.nsIMsgFolder); //Calling getFilterList will detect any errors in rules.dat, backup the file, and alert the user //we need to do this because gFilterTree.setAttribute will cause rdf to call getFilterList and there is //no way to pass msgWindow in that case. if (msgFolder) msgFolder.getFilterList(gFilterListMsgWindow); rebuildFilterTree(uri); // root the folder picker to this server gRunFiltersFolderPicker.setAttribute("ref", uri); // run filters after the fact not supported by news if (msgFolder.server.type == "nntp" && !msgFolder.isServer) { gRunFiltersFolderPicker.setAttribute("hidden", "true"); gRunFiltersButton.setAttribute("hidden", "true"); gRunFiltersFolderPickerLabel.setAttribute("hidden", "true"); } else { gRunFiltersFolderPicker.removeAttribute("hidden"); gRunFiltersButton.removeAttribute("hidden"); gRunFiltersFolderPickerLabel.removeAttribute("hidden"); // for POP3 and IMAP, select the first folder, which is the INBOX gRunFiltersFolderPicker.selectedIndex = 0; } SetFolderPicker(uri, "runFiltersFolder"); updateButtons(); gCurrentServerURI = uri;}
var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var openedFromMail = (window.opener.location.href == "chrome: (window.opener.location.href == "chrome: document.getElementById("downloadMsgs").hidden = (openedFromMail && serverType == "pop3" && !ioService.offline) ? false : true;
function setServerType(){ var pageData = parent.GetPageData(); var serverType = (document.getElementById("servertype")).selectedItem.value; setPageData(pageData, "server", "servertype", serverType); var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); // only show checkbox if (1) mail window is opener (2) this is a pop account and (3) we are online var openedFromMail = (window.opener.location.href == "chrome://messenger/content/messenger.xul") || (window.opener.location.href == "chrome://messenger/content/mail3PaneWindowVertLayout.xul"); document.getElementById("downloadMsgs").hidden = (openedFromMail && serverType == "pop3" && !ioService.offline) ? false : true;}
var element = document.getElementById("foldertextlabel"); var stringName = "foldertextfor-" + serverType; var stringval = gSubscribeBundle.getString(stringName); element.setAttribute('value',stringval); stringName = "foldersheaderfor-" + serverType; stringval = gSubscribeBundle.getString(stringName); element = document.getElementById("foldersheaderlabel"); element.setAttribute('label',stringval);
var stringName = "foldersheaderfor-" + serverType; var stringval = gSubscribeBundle.getString(stringName); var element = document.getElementById("foldersheaderlabel"); element.setAttribute('label',stringval); element = document.getElementById("nameCol"); element.setAttribute('label',stringval);
function SetServerTypeSpecificTextValues(){ if (!gServerURI) return; var serverType = GetMsgFolderFromUri(gServerURI).server.type; //set the server specific ui elements var element = document.getElementById("foldertextlabel"); var stringName = "foldertextfor-" + serverType; var stringval = gSubscribeBundle.getString(stringName); element.setAttribute('value',stringval); stringName = "foldersheaderfor-" + serverType; stringval = gSubscribeBundle.getString(stringName); element = document.getElementById("foldersheaderlabel"); element.setAttribute('label',stringval); //set the delimiter try { gFolderDelimiter = gSubscribableServer.delimiter; } catch (ex) { //dump(ex + "\n"); gFolderDelimiter = "."; }}
DWREngine.setMethod(DWREngine.XMLHttpRequest);
DWREngine.setMethod(DWREngine.ScriptTag);
function setSettings() { starttime = new Date(); failcount = 0; // Set the method var method = DWRUtil.getValue("method"); if (method == "iframe") { DWREngine.setMethod(DWREngine.IFrame); } else { DWREngine.setMethod(DWREngine.XMLHttpRequest); } // Set the verb var verb = DWRUtil.getValue("verb"); DWREngine.setVerb(verb); // Are we in ordered mode var ordered = DWRUtil.getValue("ordered"); DWREngine.setOrdered(ordered == "Yes"); // Sync/Asynch? var async = DWRUtil.getValue("async") == "async"; DWREngine.setAsync(async); // Sync/Asynch? var timeout = 0 + DWRUtil.getValue("timeout"); DWREngine.setTimeout(timeout);}
window._content.focus();
gContentWindow.focus();
function SetSmiley(smileyText){ editorShell.InsertText(smileyText); window._content.focus();}
var groupList = gSubscribeTree.selectedItems; for (var i=0;i<groupList.length;i++) { var group = groupList[i]; var name = group.getAttribute('name'); SetState(name,state); }
if (InSearchMode()) { var outlinerSelection = gSearchView.selection; for (var i=0;i<outlinerSelection.getRangeCount();i++) { var start = new Object; var end = new Object; outlinerSelection.getRangeAt(i,start,end); for (var k=start.value;k<=end.value;k++) { var name = gSearchView.getCellText(k,"nameCol"); SetState(escape(name),state); } } InvalidateSearchOutliner(); } else { var groupList = gSubscribeTree.selectedItems; for (var i=0;i<groupList.length;i++) { var group = groupList[i]; var name = group.getAttribute('name'); SetState(name,state); } }
function SetSubscribeState(state){ try { var groupList = gSubscribeTree.selectedItems; for (var i=0;i<groupList.length;i++) { var group = groupList[i]; var name = group.getAttribute('name'); SetState(name,state); } } catch (ex) { //dump("SetSubscribedState failed: " + ex + "\n"); }}
var labelTag = '$label' + label + '0'; tagsString = encodeURIComponent(gPrefBranch.getComplexValue("mailnews.labels.description." + label, Components.interfaces.nsIPrefLocalizedString).data);
var labelTag = '$label' + label; if (!tags.search(labelTag)) tagsString = encodeURIComponent(gPrefBranch.getComplexValue("mailnews.labels.description." + label, Components.interfaces.nsIPrefLocalizedString).data);
function setTagHeader(){ // it would be nice if we passed in the msg hdr from the back end var msgHdr; try { msgHdr = gDBView.hdrForFirstSelectedMessage; } catch (ex) { return; } // no msgHdr to add our tags to. var tagsString = ""; // extract the tags from the msg hdr var tags = msgHdr.getStringProperty('keywords'); var label = msgHdr.label; if (label > 0) { var labelTag = '$label' + label + '0'; tagsString = encodeURIComponent(gPrefBranch.getComplexValue("mailnews.labels.description." + label, Components.interfaces.nsIPrefLocalizedString).data); } // now convert the list of tag ids into user presentable strings, separate by commas var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] .getService(Components.interfaces.nsIMsgTagService); // tokenize the keywords based on ' ' var tagsArray = tags.split(' '); for (var index = 0; index < tagsArray.length; index++) { if (tagsArray[index]) { var tagName; try { // 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; } if (tagName) { if (tagsString) tagsString += " "; tagsString += encodeURIComponent(tagName); } } } if (tagsString) currentHeaderData['tags'] = { headerName: 'tags', headerValue: tagsString}; else if (currentHeaderData['tags']) // no more tags, so clear out the header field currentHeaderData['tags'] = null;}
var msgHdr = gDBView.hdrForFirstSelectedMessage;
var msgHdr; try { msgHdr = gDBView.hdrForFirstSelectedMessage; } catch (ex) { return; }
function setTagHeader(){ // it would be nice if we passed in the msg hdr from the back end var msgHdr = gDBView.hdrForFirstSelectedMessage; var tagsString = ""; // extract the tags from the msg hdr var tags = msgHdr.getStringProperty('keywords'); var label = msgHdr.label; if (label > 0) { var labelTag = '$label' + label + '0'; tagsString = encodeURIComponent(gPrefBranch.getComplexValue("mailnews.labels.description." + label, Components.interfaces.nsIPrefLocalizedString).data); } // now convert the list of tag ids into user presentable strings, separate by commas var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] .getService(Components.interfaces.nsIMsgTagService); // tokenize the keywords based on ' ' var tagsArray = tags.split(' '); for (var index = 0; index < tagsArray.length; index++) { if (tagsArray[index]) { var tagName; try { // 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; } if (tagName) { if (tagsString) tagsString += " "; tagsString += encodeURIComponent(tagName); } } } if (tagsString) currentHeaderData['tags'] = { headerName: 'tags', headerValue: tagsString}; else if (currentHeaderData['tags']) // no more tags, so clear out the header field currentHeaderData['tags'] = null;}
} else alert("Unable to switch to window.");
} else { var bundle = this.mPanelSet.stringBundle; var msg = bundle.getString("inspectWindow.error.message"); var title = bundle.getString("inspectWindow.error.title"); this.mPromptService.alert(window, title, msg); }
setTargetWindowById: function(aResId) { var windowManager = XPCU.getService(kWindowDataSourceCID, "nsIWindowDataSource"); var win = windowManager.getWindowForResource(aResId); if (win) { this.setTargetWindow(win); this.setBrowser(false, true); } else alert("Unable to switch to window."); },
DWREngine.setTextHtmlHandler = function(handler) { DWREngine._textHtmlHandler = handler;
dwr.engine.setTextHtmlHandler = function(handler) { dwr.engine._textHtmlHandler = handler;
DWREngine.setTextHtmlHandler = function(handler) { DWREngine._textHtmlHandler = handler;}
if (appCore) { appCore.setTextZoom(zoomFactor / 100.0); }
var markupDocumentViewer = getBrowser().markupDocumentViewer; markupDocumentViewer.textZoom = zoomFactor / 100.0;
function setTextZoom() { // dump("Level: "+zoomLevel+" Factor: "+zoomFactor+" Anchor: "+zoomAnchor+" Steps: "+zoomSteps+"\n"); if (appCore) { appCore.setTextZoom(zoomFactor / 100.0); }/* // bah, docShell.zoom doesn't work var docShell = GetBrowserDocShell(); if (docShell) { docShell.zoom = zoomFactor / 100.0; }*/ }
var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 5000 };
var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 2000 };
function setTextZoomOther() { // open dialog and ask for new value var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 5000 }; window.openDialog( "chrome://navigator/content/askViewZoom.xul", "", "chrome,modal,titlebar", o); if (o.retvals.zoomOK) { zoomOther = o.retvals.zoom; zoomAnchor = zoomOther; zoomSteps = 0; browserSetTextZoom(zoomOther); updateTextZoomOtherMenu(); } updateTextZoomMenu(); }
updateTextZoomMenu();
function setTextZoomOther() { // open dialog and ask for new value var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 5000 }; window.openDialog( "chrome://navigator/content/askViewZoom.xul", "", "chrome,modal,titlebar", o); if (o.retvals.zoomOK) { zoomOther = o.retvals.zoom; zoomAnchor = zoomOther; zoomSteps = 0; browserSetTextZoom(zoomOther); updateTextZoomMenu(); updateTextZoomOtherMenu(); } }
updateTextZoomMenu();
function setTextZoomOther() { // open dialog and ask for new value var o = { retvals: {zoom: zoomOther}, zoomMin: 1, zoomMax: 5000 }; window.openDialog( "chrome://navigator/content/askViewZoom.xul", "", "chrome,modal,titlebar", o); if (o.retvals.zoomOK) { zoomOther = o.retvals.zoom; zoomAnchor = zoomOther; zoomSteps = 0; browserSetTextZoom(zoomOther); updateTextZoomMenu(); updateTextZoomOtherMenu(); } }
DWREngine.setTimeout = function(timeout) { DWREngine._timeout = timeout;
dwr.engine.setTimeout = function(timeout) { dwr.engine._timeout = timeout;
DWREngine.setTimeout = function(timeout) { DWREngine._timeout = timeout;};
DWREngine.setTimeout = function(newTimeout) { DWREngine._timeout = newTimeout;
DWREngine.setTimeout = function(timeout) { DWREngine._timeout = timeout;
DWREngine.setTimeout = function(newTimeout) { DWREngine._timeout = newTimeout;};
this.dialog.title = title;
this.dialog.document.title = title;
setTitle: function() { // Start with saving/opening template. // If percentage is not known (-1), use alternate template var title = this.saving ? ( this.percent != -1 ? this.getString( "savingTitle" ) : this.getString( "unknownSavingTitle" ) ) : ( this.percent != -1 ? this.getString( "openingTitle" ) : this.getString( "unknownOpeningTitle" ) ); // Use file name as insert 1. title = this.replaceInsert( title, 1, this.fileName() ); // Use percentage as insert 2 (if known). if ( this.percent != -1 ) { title = this.replaceInsert( title, 2, this.percent ); } // Set <window>'s title attribute. if ( this.dialog ) { this.dialog.title = title; } },
var identities = accountManager.GetIdentitiesForServer(server); var identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity);
var identity; try { var identities = accountManager.GetIdentitiesForServer(server); identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); middle = Bundle.GetStringFromName("titleMailPreHost"); end = identity.email; } catch (ex) { }
function setTitleFromFolder(msgfolder, subject){ if (!msgfolder) return; var title; var server = msgfolder.server; if (null != subject) title = subject+" - "; else title = ""; if (msgfolder.isServer) { // <hostname> title += server.hostName; } else { var middle; var end; if (server.type == "nntp") { // <folder> on <hostname> middle = Bundle.GetStringFromName("titleNewsPreHost"); end = server.hostName; } else { var identities = accountManager.GetIdentitiesForServer(server); var identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); // <folder> for <email> middle = Bundle.GetStringFromName("titleMailPreHost"); end = identity.email; } title += msgfolder.prettyName + " " + middle + " " + end; } title += " - " + BrandBundle.GetStringFromName("brandShortName"); window.title = title;}
middle = Bundle.GetStringFromName("titleMailPreHost"); end = identity.email;
function setTitleFromFolder(msgfolder, subject){ if (!msgfolder) return; var title; var server = msgfolder.server; if (null != subject) title = subject+" - "; else title = ""; if (msgfolder.isServer) { // <hostname> title += server.hostName; } else { var middle; var end; if (server.type == "nntp") { // <folder> on <hostname> middle = Bundle.GetStringFromName("titleNewsPreHost"); end = server.hostName; } else { var identities = accountManager.GetIdentitiesForServer(server); var identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); // <folder> for <email> middle = Bundle.GetStringFromName("titleMailPreHost"); end = identity.email; } title += msgfolder.prettyName + " " + middle + " " + end; } title += " - " + BrandBundle.GetStringFromName("brandShortName"); window.title = title;}
title += msgfolder.prettyName + " " + middle + " " + end;
title += msgfolder.prettyName; if (middle) title += " " + middle; if (end) title += " " + end;
function setTitleFromFolder(msgfolder, subject){ if (!msgfolder) return; var title; var server = msgfolder.server; if (null != subject) title = subject+" - "; else title = ""; if (msgfolder.isServer) { // <hostname> title += server.hostName; } else { var middle; var end; if (server.type == "nntp") { // <folder> on <hostname> middle = Bundle.GetStringFromName("titleNewsPreHost"); end = server.hostName; } else { var identities = accountManager.GetIdentitiesForServer(server); var identity = identities.QueryElementAt(0, Components.interfaces.nsIMsgIdentity); // <folder> for <email> middle = Bundle.GetStringFromName("titleMailPreHost"); end = identity.email; } title += msgfolder.prettyName + " " + middle + " " + end; } title += " - " + BrandBundle.GetStringFromName("brandShortName"); window.title = title;}
treeItem.setAttribute( "onclick" , "unifinderClickEvent(event)" );
function setUnifinderEventTreeItem( treeItem, calendarEvent ) { treeItem.calendarEvent = calendarEvent; treeItem.setAttribute( "eventId", calendarEvent.id ); treeItem.setAttribute( "onmouseover", "changeToolTipTextForEvent( event )" ); treeItem.setAttribute( "ondblclick" , "unifinderDoubleClickEvent(event)" ); treeItem.setAttribute( "onclick" , "unifinderClickEvent(event)" ); treeItem.setAttribute( "calendarevent", "true" ); treeItem.setAttribute( "id", "search-unifinder-treeitem-"+calendarEvent.id ); var treeRow = document.createElement( "treerow" ); var treeCellTitle = document.createElement( "treecell" ); var treeCellStartdate = document.createElement( "treecell" ); var treeCellEnddate = document.createElement( "treecell" ); var treeCellCategories = document.createElement( "treecell" ); var now = new Date(); var thisMorning = new Date( now.getFullYear(), now.getMonth(), now.getDate(), 0, 0, 0 ); if(treeItem.getElementsByTagName( "treerow" )[0]) treeItem.removeChild( treeItem.getElementsByTagName( "treerow" )[0] ); if( calendarEvent.title == "" ) var titleText = "Untitled"; else var titleText = calendarEvent.title; treeCellTitle.setAttribute( "label", titleText ); var eventStartDate = getNextOrPreviousRecurrence( calendarEvent ); var eventEndDate = new Date( calendarEvent.end.getTime() ); var startDate = formatUnifinderEventDate( eventStartDate ); var startTime = formatUnifinderEventTime( eventStartDate ); var endTime = formatUnifinderEventTime( eventEndDate ); if( calendarEvent.allDay ) { startText = "All day " + startDate; endText = "All day " + startDate; } else { startText = startDate + " " + startTime; endText = startDate + " " + endTime; } treeCellStartdate.setAttribute( "label", startText ); treeCellEnddate.setAttribute( "label", endText ); treeCellCategories.setAttribute( "label", calendarEvent.categories ); treeRow.appendChild( treeCellTitle ); treeRow.appendChild( treeCellStartdate ); treeRow.appendChild( treeCellEnddate ); treeRow.appendChild( treeCellCategories ); treeItem.appendChild( treeRow );}
document.getElementById("daysEnd").disabled = locked || !leaveMsgsChecked;
function setupAgeMsgOnServerUI(){ var leaveMsgsChecked = document.getElementById("pop3.leaveMessagesOnServer").checked; var checked = document.getElementById("pop3.deleteByAgeFromServer").checked; var locked = getAccountValueIsLocked(document.getElementById("pop3.deleteByAgeFromServer")); document.getElementById("pop3.deleteByAgeFromServer").disabled = locked || !leaveMsgsChecked; document.getElementById("pop3.numDaysToLeaveOnServer").disabled = locked || !checked || !leaveMsgsChecked;}
} else {
try { if (prefs.GetIntPref("mail.autoComplete.commentColumn")) { document.getElementById('msgRecipient#1').showCommentColumn = true; } } catch (ex) { } } else {
function setupAutocomplete(){ //Setup autocomplete session if we haven't done so already if (!gAutocompleteSession) { gAutocompleteSession = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession); if (gAutocompleteSession) { var emailAddr = gCurrentIdentity.email; var start = emailAddr.lastIndexOf("@"); gAutocompleteSession.defaultDomain = emailAddr.slice(start + 1, emailAddr.length); } else { gAutocompleteSession = 1; } } if (!gSetupLdapAutocomplete) { try { setupLdapAutocompleteSession(); } catch (ex) { // catch the exception and ignore it, so that if LDAP setup // fails, the entire compose window doesn't end up horked } }}
document.getElementById('addressCol2#1').highlightNonMatches = true;
autoCompleteWidget.highlightNonMatches = true;
function setupAutocomplete(){ //Setup autocomplete session if we haven't done so already if (!gAutocompleteSession) { gAutocompleteSession = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession); if (gAutocompleteSession) { setDomainName(); // if the pref is set to turn on the comment column, honor it here. // this element then gets cloned for subsequent rows, so they should // honor it as well // try { if (sPrefs.getBoolPref("mail.autoComplete.highlightNonMatches")) document.getElementById('addressCol2#1').highlightNonMatches = true; if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) { document.getElementById('addressCol2#1').showCommentColumn = true; } } catch (ex) { // if we can't get this pref, then don't show the columns (which is // what the XUL defaults to) } } else { gAutocompleteSession = 1; } } if (!gSetupLdapAutocomplete) { try { setupLdapAutocompleteSession(); } catch (ex) { // catch the exception and ignore it, so that if LDAP setup // fails, the entire compose window doesn't end up horked } }}
if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) { document.getElementById('addressCol2#1').showCommentColumn = true; } } catch (ex) {
if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) autoCompleteWidget.showCommentColumn = true; } catch (ex) {
function setupAutocomplete(){ //Setup autocomplete session if we haven't done so already if (!gAutocompleteSession) { gAutocompleteSession = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession); if (gAutocompleteSession) { setDomainName(); // if the pref is set to turn on the comment column, honor it here. // this element then gets cloned for subsequent rows, so they should // honor it as well // try { if (sPrefs.getBoolPref("mail.autoComplete.highlightNonMatches")) document.getElementById('addressCol2#1').highlightNonMatches = true; if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) { document.getElementById('addressCol2#1').showCommentColumn = true; } } catch (ex) { // if we can't get this pref, then don't show the columns (which is // what the XUL defaults to) } } else { gAutocompleteSession = 1; } } if (!gSetupLdapAutocomplete) { try { setupLdapAutocompleteSession(); } catch (ex) { // catch the exception and ignore it, so that if LDAP setup // fails, the entire compose window doesn't end up horked } }}
document.getElementById('msgRecipient#1').showCommentColumn =
document.getElementById('addressCol2#1').showCommentColumn =
function setupAutocomplete(){ //Setup autocomplete session if we haven't done so already if (!gAutocompleteSession) { gAutocompleteSession = Components.classes["@mozilla.org/autocompleteSession;1?type=addrbook"].getService(Components.interfaces.nsIAbAutoCompleteSession); if (gAutocompleteSession) { var emailAddr = gCurrentIdentity.email; var start = emailAddr.lastIndexOf("@"); gAutocompleteSession.defaultDomain = emailAddr.slice(start + 1, emailAddr.length); // if the pref is set to turn on the comment column, honor it here. // this element then gets cloned for subsequent rows, so they should // honor it as well // try { if (sPrefs.getIntPref("mail.autoComplete.commentColumn")) { document.getElementById('msgRecipient#1').showCommentColumn = true; } } catch (ex) { // if we can't get this pref, then don't show the columns (which is // what the XUL defaults to) } } else { gAutocompleteSession = 1; } } if (!gSetupLdapAutocomplete) { try { setupLdapAutocompleteSession(); } catch (ex) { // catch the exception and ignore it, so that if LDAP setup // fails, the entire compose window doesn't end up horked } }}
var composerController = Components.classes["component:
var composerController = Components.classes["@mozilla.org/editor/composercontroller;1"].createInstance();
function SetupComposerWindowCommands(){ // Create a command controller and register commands // specific to Web Composer window (file-related commands, HTML Source...) // IMPORTANT: For each of these commands, the doCommand method // must first call FinishHTMLSource() // to go from HTML Source mode to any other edit mode var gComposerWindowCommandManager = window.controllers; if (!gComposerWindowCommandManager) return; var composerController = Components.classes["component://netscape/editor/composercontroller"].createInstance(); if (!composerController) { dump("Failed to create composerController\n"); return; } var editorController = composerController.QueryInterface(Components.interfaces.nsIEditorController); if (!editorController) { dump("Failed to get interface for nsIEditorController\n"); return; } // Note: We init with the editorShell for the main composer window, not the HTML Source textfield? editorController.Init(window.editorShell); var interfaceRequestor = composerController.QueryInterface(Components.interfaces.nsIInterfaceRequestor); if (!interfaceRequestor) { dump("Failed to get iterfaceRequestor for composerController\n"); return; } // Get the nsIControllerCommandManager interface we need to register more commands var commandManager = interfaceRequestor.getInterface(Components.interfaces.nsIControllerCommandManager); if (!commandManager) { dump("Failed to get interface for nsIControllerCommandManager\n"); return; } // File-related commands commandManager.registerCommand("cmd_newEditor", nsNewEditorCommand); commandManager.registerCommand("cmd_open", nsOpenCommand); commandManager.registerCommand("cmd_save", nsSaveCommand); commandManager.registerCommand("cmd_saveAs", nsSaveAsCommand); commandManager.registerCommand("cmd_saveAsCharset", nsSaveAsCharsetCommand); commandManager.registerCommand("cmd_revert", nsRevertCommand); commandManager.registerCommand("cmd_openRemote", nsOpenRemoteCommand); commandManager.registerCommand("cmd_preview", nsPreviewCommand); commandManager.registerCommand("cmd_editSendPage", nsSendPageCommand); commandManager.registerCommand("cmd_quit", nsQuitCommand); commandManager.registerCommand("cmd_close", nsCloseCommand); commandManager.registerCommand("cmd_preferences", nsPreferencesCommand); // Edit Mode commands commandManager.registerCommand("cmd_NormalMode", nsNormalModeCommand); commandManager.registerCommand("cmd_AllTagsMode", nsAllTagsModeCommand); commandManager.registerCommand("cmd_HTMLSourceMode", nsHTMLSourceModeCommand); commandManager.registerCommand("cmd_PreviewMode", nsPreviewModeCommand); commandManager.registerCommand("cmd_FinishHTMLSource", nsFinishHTMLSource); commandManager.registerCommand("cmd_CancelHTMLSource", nsCancelHTMLSource); gComposerWindowCommandManager.insertControllerAt(0, editorController);}
gComposerCommandManager.registerCommand("cmd_quit", nsQuitCommand);
function SetupControllerCommands(){ gComposerCommandManager = GetComposerController(); if (!gComposerCommandManager) return; dump("Registering commands\n"); gComposerCommandManager.registerCommand("cmd_newEditor", nsNewEditorCommand); gComposerCommandManager.registerCommand("cmd_open", nsOpenCommand); gComposerCommandManager.registerCommand("cmd_openRemote", nsOpenRemoteCommand); gComposerCommandManager.registerCommand("cmd_preview", nsPreviewCommand); gComposerCommandManager.registerCommand("cmd_find", nsFindCommand); gComposerCommandManager.registerCommand("cmd_findNext", nsFindNextCommand); gComposerCommandManager.registerCommand("cmd_spelling", nsSpellingCommand); gComposerCommandManager.registerCommand("cmd_editHTML", nsEditHTMLCommand); gComposerCommandManager.registerCommand("cmd_preferences", nsPreferencesCommand); gComposerCommandManager.registerCommand("cmd_listProperties", nsListPropertiesCommand); gComposerCommandManager.registerCommand("cmd_pageProperties", nsPagePropertiesCommand); gComposerCommandManager.registerCommand("cmd_colorProperties", nsColorPropertiesCommand); gComposerCommandManager.registerCommand("cmd_image", nsImageCommand); gComposerCommandManager.registerCommand("cmd_hline", nsHLineCommand); gComposerCommandManager.registerCommand("cmd_table", nsTableCommand); // insert or edit gComposerCommandManager.registerCommand("cmd_editTable", nsEditTableCommand); // edit gComposerCommandManager.registerCommand("cmd_link", nsLinkCommand); gComposerCommandManager.registerCommand("cmd_anchor", nsAnchorCommand); gComposerCommandManager.registerCommand("cmd_insertHTML", nsInsertHTMLCommand); gComposerCommandManager.registerCommand("cmd_insertBreak", nsInsertBreakCommand); gComposerCommandManager.registerCommand("cmd_insertBreakAll", nsInsertBreakAllCommand);}
gComposerCommandManager.registerCommand("cmd_objectProperties", nsObjectPropertiesCommand);
function SetupControllerCommands(){ gComposerCommandManager = GetComposerController(); if (!gComposerCommandManager) return; dump("Registering commands\n"); gComposerCommandManager.registerCommand("cmd_newEditor", nsNewEditorCommand); gComposerCommandManager.registerCommand("cmd_open", nsOpenCommand); gComposerCommandManager.registerCommand("cmd_saveAsCharset", nsSaveAsCharsetCommand); gComposerCommandManager.registerCommand("cmd_revert", nsRevertCommand); gComposerCommandManager.registerCommand("cmd_openRemote", nsOpenRemoteCommand); gComposerCommandManager.registerCommand("cmd_preview", nsPreviewCommand); gComposerCommandManager.registerCommand("cmd_quit", nsQuitCommand); gComposerCommandManager.registerCommand("cmd_find", nsFindCommand); gComposerCommandManager.registerCommand("cmd_findNext", nsFindNextCommand); gComposerCommandManager.registerCommand("cmd_spelling", nsSpellingCommand); gComposerCommandManager.registerCommand("cmd_editHTML", nsEditHTMLCommand); gComposerCommandManager.registerCommand("cmd_insertChars", nsInsertCharsCommand); gComposerCommandManager.registerCommand("cmd_preferences", nsPreferencesCommand); gComposerCommandManager.registerCommand("cmd_listProperties", nsListPropertiesCommand); gComposerCommandManager.registerCommand("cmd_pageProperties", nsPagePropertiesCommand); gComposerCommandManager.registerCommand("cmd_colorProperties", nsColorPropertiesCommand); gComposerCommandManager.registerCommand("cmd_advancedProperties", nsAdvancedPropertiesCommand); gComposerCommandManager.registerCommand("cmd_image", nsImageCommand); gComposerCommandManager.registerCommand("cmd_hline", nsHLineCommand); gComposerCommandManager.registerCommand("cmd_link", nsLinkCommand); gComposerCommandManager.registerCommand("cmd_anchor", nsAnchorCommand); gComposerCommandManager.registerCommand("cmd_insertHTML", nsInsertHTMLCommand); gComposerCommandManager.registerCommand("cmd_insertBreak", nsInsertBreakCommand); gComposerCommandManager.registerCommand("cmd_insertBreakAll",nsInsertBreakAllCommand); gComposerCommandManager.registerCommand("cmd_table", nsInsertOrEditTableCommand); gComposerCommandManager.registerCommand("cmd_editTable", nsEditTableCommand); gComposerCommandManager.registerCommand("cmd_SelectTable", nsSelectTableCommand); gComposerCommandManager.registerCommand("cmd_SelectRow", nsSelectTableRowCommand); gComposerCommandManager.registerCommand("cmd_SelectColumn", nsSelectTableColumnCommand); gComposerCommandManager.registerCommand("cmd_SelectCell", nsSelectTableCellCommand); gComposerCommandManager.registerCommand("cmd_SelectAllCells", nsSelectAllTableCellsCommand); gComposerCommandManager.registerCommand("cmd_InsertTable", nsInsertTableCommand); gComposerCommandManager.registerCommand("cmd_InsertRowAbove", nsInsertTableRowAboveCommand); gComposerCommandManager.registerCommand("cmd_InsertRowBelow", nsInsertTableRowBelowCommand); gComposerCommandManager.registerCommand("cmd_InsertColumnBefore", nsInsertTableColumnBeforeCommand); gComposerCommandManager.registerCommand("cmd_InsertColumnAfter", nsInsertTableColumnAfterCommand); gComposerCommandManager.registerCommand("cmd_InsertCellBefore", nsInsertTableCellBeforeCommand); gComposerCommandManager.registerCommand("cmd_InsertCellAfter", nsInsertTableCellAfterCommand); gComposerCommandManager.registerCommand("cmd_DeleteTable", nsDeleteTableCommand); gComposerCommandManager.registerCommand("cmd_DeleteRow", nsDeleteTableRowCommand); gComposerCommandManager.registerCommand("cmd_DeleteColumn", nsDeleteTableColumnCommand); gComposerCommandManager.registerCommand("cmd_DeleteCell", nsDeleteTableCellCommand); gComposerCommandManager.registerCommand("cmd_DeleteCellContents", nsDeleteTableCellContentsCommand); gComposerCommandManager.registerCommand("cmd_tableJoinCells", nsJoinTableCellsCommand); gComposerCommandManager.registerCommand("cmd_tableSplitCell", nsSplitTableCellCommand);}
RDF = Components.classes[rdfServiceProgID].getService(Components.interfaces.nsIRDFService);
RDF = Components.classes[rdfServiceContractID].getService(Components.interfaces.nsIRDFService);
function setupDatasource() { RDF = Components.classes[rdfServiceProgID].getService(Components.interfaces.nsIRDFService); gSearchDatasource = Components.classes[rdfDatasourcePrefix + "msgsearch"].createInstance(Components.interfaces.nsIRDFDataSource); dump("The root is " + gSearchDatasource.URI + "\n"); gThreadTree.setAttribute("ref", gSearchDatasource.URI); // the thread pane needs to use the search datasource (to get the // actual list of messages) and the message datasource (to get any // attributes about each message) gSearchSession = Components.classes[searchSessionProgID].createInstance(Components.interfaces.nsIMsgSearchSession); setMsgDatasourceWindow(gSearchDatasource, msgWindow); gThreadTree.database.AddDataSource(gSearchDatasource); var messageDatasource = Components.classes[rdfDatasourcePrefix + "mailnewsmessages"].createInstance(Components.interfaces.nsIRDFDataSource); setMsgDatasourceWindow(messageDatasource, msgWindow); gThreadTree.database.AddDataSource(messageDatasource); // the datasource is a listener on the search results searchListener = gSearchDatasource.QueryInterface(Components.interfaces.nsIMsgSearchNotify); gSearchSession.registerListener(searchListener);}
gSearchSession = Components.classes[searchSessionProgID].createInstance(Components.interfaces.nsIMsgSearchSession);
gSearchSession = Components.classes[searchSessionContractID].createInstance(Components.interfaces.nsIMsgSearchSession);
function setupDatasource() { RDF = Components.classes[rdfServiceProgID].getService(Components.interfaces.nsIRDFService); gSearchDatasource = Components.classes[rdfDatasourcePrefix + "msgsearch"].createInstance(Components.interfaces.nsIRDFDataSource); dump("The root is " + gSearchDatasource.URI + "\n"); gThreadTree.setAttribute("ref", gSearchDatasource.URI); // the thread pane needs to use the search datasource (to get the // actual list of messages) and the message datasource (to get any // attributes about each message) gSearchSession = Components.classes[searchSessionProgID].createInstance(Components.interfaces.nsIMsgSearchSession); setMsgDatasourceWindow(gSearchDatasource, msgWindow); gThreadTree.database.AddDataSource(gSearchDatasource); var messageDatasource = Components.classes[rdfDatasourcePrefix + "mailnewsmessages"].createInstance(Components.interfaces.nsIRDFDataSource); setMsgDatasourceWindow(messageDatasource, msgWindow); gThreadTree.database.AddDataSource(messageDatasource); // the datasource is a listener on the search results searchListener = gSearchDatasource.QueryInterface(Components.interfaces.nsIMsgSearchNotify); gSearchSession.registerListener(searchListener);}
gResultsTree.setAttribute("ref", gSearchDatasource.URI);
gThreadTree.setAttribute("ref", gSearchDatasource.URI);
function setupDatasource() { RDF = Components.classes[rdfServiceProgID].getService(Components.interfaces.nsIRDFService); gSearchDatasource = Components.classes[rdfDatasourcePrefix + "msgsearch"].createInstance(Components.interfaces.nsIRDFDataSource); dump("The root is " + gSearchDatasource.URI + "\n"); gResultsTree.setAttribute("ref", gSearchDatasource.URI); // the thread pane needs to use the search datasource (to get the // actual list of messages) and the message datasource (to get any // attributes about each message) gSearchSession = Components.classes[searchSessionProgID].createInstance(Components.interfaces.nsIMsgSearchSession); gResultsTree.database.AddDataSource(gSearchDatasource); var messageDatasource = Components.classes[rdfDatasourcePrefix + "mailnewsmessages"].createInstance(Components.interfaces.nsIRDFDataSource); gResultsTree.database.AddDataSource(messageDatasource); // the datasource is a listener on the search results searchListener = gSearchDatasource.QueryInterface(Components.interfaces.nsIMsgSearchNotify); gSearchSession.registerListener(searchListener);}
gResultsTree.database.AddDataSource(gSearchDatasource);
setMsgDatasourceWindow(gSearchDatasource, msgWindow); gThreadTree.database.AddDataSource(gSearchDatasource);
function setupDatasource() { RDF = Components.classes[rdfServiceProgID].getService(Components.interfaces.nsIRDFService); gSearchDatasource = Components.classes[rdfDatasourcePrefix + "msgsearch"].createInstance(Components.interfaces.nsIRDFDataSource); dump("The root is " + gSearchDatasource.URI + "\n"); gResultsTree.setAttribute("ref", gSearchDatasource.URI); // the thread pane needs to use the search datasource (to get the // actual list of messages) and the message datasource (to get any // attributes about each message) gSearchSession = Components.classes[searchSessionProgID].createInstance(Components.interfaces.nsIMsgSearchSession); gResultsTree.database.AddDataSource(gSearchDatasource); var messageDatasource = Components.classes[rdfDatasourcePrefix + "mailnewsmessages"].createInstance(Components.interfaces.nsIRDFDataSource); gResultsTree.database.AddDataSource(messageDatasource); // the datasource is a listener on the search results searchListener = gSearchDatasource.QueryInterface(Components.interfaces.nsIMsgSearchNotify); gSearchSession.registerListener(searchListener);}
gResultsTree.database.AddDataSource(messageDatasource);
setMsgDatasourceWindow(messageDatasource, msgWindow); gThreadTree.database.AddDataSource(messageDatasource);
function setupDatasource() { RDF = Components.classes[rdfServiceProgID].getService(Components.interfaces.nsIRDFService); gSearchDatasource = Components.classes[rdfDatasourcePrefix + "msgsearch"].createInstance(Components.interfaces.nsIRDFDataSource); dump("The root is " + gSearchDatasource.URI + "\n"); gResultsTree.setAttribute("ref", gSearchDatasource.URI); // the thread pane needs to use the search datasource (to get the // actual list of messages) and the message datasource (to get any // attributes about each message) gSearchSession = Components.classes[searchSessionProgID].createInstance(Components.interfaces.nsIMsgSearchSession); gResultsTree.database.AddDataSource(gSearchDatasource); var messageDatasource = Components.classes[rdfDatasourcePrefix + "mailnewsmessages"].createInstance(Components.interfaces.nsIRDFDataSource); gResultsTree.database.AddDataSource(messageDatasource); // the datasource is a listener on the search results searchListener = gSearchDatasource.QueryInterface(Components.interfaces.nsIMsgSearchNotify); gSearchSession.registerListener(searchListener);}
function SetupDeleteMenuItem(menuID, numSelected, forceHide)
function SetupDeleteMenuItem(menuID, numSelected, isNewsgroup, forceHide)
function SetupDeleteMenuItem(menuID, numSelected, forceHide){ ShowMenuItem(menuID, !forceHide); EnableMenuItem(menuID, (numSelected > 0));}
ShowMenuItem(menuID, !forceHide); EnableMenuItem(menuID, (numSelected > 0));
var showMenuItem = !forceHide; ShowMenuItem(menuID, showMenuItem); if(showMenuItem) { EnableMenuItem(menuID, (numSelected > 0)); if(!isNewsgroup) { SetMenuItemValue(menuID, Bundle.GetStringFromName("delete")); SetMenuItemAccessKey(menuID, Bundle.GetStringFromName("deleteAccessKey")); } else { SetMenuItemValue(menuID, Bundle.GetStringFromName("cancel")); SetMenuItemAccessKey(menuID, Bundle.GetStringFromName("cancelAccessKey")); } }
function SetupDeleteMenuItem(menuID, numSelected, forceHide){ ShowMenuItem(menuID, !forceHide); EnableMenuItem(menuID, (numSelected > 0));}
try { var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description", Components.interfaces.nsISupportsString).data; } catch(ex) {} if (directoryServerFlag || !directoryServerString) {
if (directoryServerFlag) {
function setupDirectoriesList(){ var override = document.getElementById("identity.overrideGlobalPref").getAttribute("value"); var autocomplete = document.getElementById("ldapAutocomplete"); // useGlobalFlag is set when user changes the selectedItem on the radio button and switches // to a different pane and switches back in Mail/news AccountSettings var useGlobalFlag = document.getElementById("overrideGlobalPref").getAttribute("value"); // directoryServerFlag is set when user changes the server to None and switches // to a different pane and switches back in Mail/news AccountSettings var directoryServerFlag = document.getElementById("directoryServer").getAttribute("value"); if(override == "true" && !useGlobalFlag) autocomplete.selectedItem = document.getElementById("directories"); else autocomplete.selectedItem = document.getElementById("useGlobalPref"); var directoriesList = document.getElementById("directoriesList"); var directoryServer = document.getElementById("identity.directoryServer").getAttribute('value'); try { var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description", Components.interfaces.nsISupportsString).data; } catch(ex) {} if (directoryServerFlag || !directoryServerString) { document.getElementById("identity.directoryServer").setAttribute("value", ""); directoryServer = ""; var addressBookBundle = document.getElementById("bundle_addressBook"); directoryServerString = addressBookBundle.getString("directoriesListItemNone"); } directoriesList.value = directoryServer; directoriesList.label = directoryServerString; gFromGlobalPref = false;}
var addressBookBundle = document.getElementById("bundle_addressBook"); directoryServerString = addressBookBundle.getString("directoriesListItemNone");
function setupDirectoriesList(){ var override = document.getElementById("identity.overrideGlobalPref").getAttribute("value"); var autocomplete = document.getElementById("ldapAutocomplete"); // useGlobalFlag is set when user changes the selectedItem on the radio button and switches // to a different pane and switches back in Mail/news AccountSettings var useGlobalFlag = document.getElementById("overrideGlobalPref").getAttribute("value"); // directoryServerFlag is set when user changes the server to None and switches // to a different pane and switches back in Mail/news AccountSettings var directoryServerFlag = document.getElementById("directoryServer").getAttribute("value"); if(override == "true" && !useGlobalFlag) autocomplete.selectedItem = document.getElementById("directories"); else autocomplete.selectedItem = document.getElementById("useGlobalPref"); var directoriesList = document.getElementById("directoriesList"); var directoryServer = document.getElementById("identity.directoryServer").getAttribute('value'); try { var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description", Components.interfaces.nsISupportsString).data; } catch(ex) {} if (directoryServerFlag || !directoryServerString) { document.getElementById("identity.directoryServer").setAttribute("value", ""); directoryServer = ""; var addressBookBundle = document.getElementById("bundle_addressBook"); directoryServerString = addressBookBundle.getString("directoriesListItemNone"); } directoriesList.value = directoryServer; directoriesList.label = directoryServerString; gFromGlobalPref = false;}
directoriesList.label = directoryServerString;
function setupDirectoriesList(){ var override = document.getElementById("identity.overrideGlobalPref").getAttribute("value"); var autocomplete = document.getElementById("ldapAutocomplete"); // useGlobalFlag is set when user changes the selectedItem on the radio button and switches // to a different pane and switches back in Mail/news AccountSettings var useGlobalFlag = document.getElementById("overrideGlobalPref").getAttribute("value"); // directoryServerFlag is set when user changes the server to None and switches // to a different pane and switches back in Mail/news AccountSettings var directoryServerFlag = document.getElementById("directoryServer").getAttribute("value"); if(override == "true" && !useGlobalFlag) autocomplete.selectedItem = document.getElementById("directories"); else autocomplete.selectedItem = document.getElementById("useGlobalPref"); var directoriesList = document.getElementById("directoriesList"); var directoryServer = document.getElementById("identity.directoryServer").getAttribute('value'); try { var directoryServerString = gPrefInt.getComplexValue(directoryServer + ".description", Components.interfaces.nsISupportsString).data; } catch(ex) {} if (directoryServerFlag || !directoryServerString) { document.getElementById("identity.directoryServer").setAttribute("value", ""); directoryServer = ""; var addressBookBundle = document.getElementById("bundle_addressBook"); directoryServerString = addressBookBundle.getString("directoriesListItemNone"); } directoriesList.value = directoryServer; directoriesList.label = directoryServerString; gFromGlobalPref = false;}
gFromGlobalPref = false;
function setupDirectoriesList(){ var override = document.getElementById("identity.overrideGlobalPref").getAttribute("value"); var autocomplete = document.getElementById("ldapAutocomplete"); // useGlobalFlag is set when user changes the selectedItem on the radio button and switches // to a different pane and switches back in Mail/news AccountSettings var useGlobalFlag = document.getElementById("overrideGlobalPref").getAttribute("value"); // directoryServerFlag is set when user changes the server to None and switches // to a different pane and switches back in Mail/news AccountSettings var directoryServerFlag = document.getElementById("directoryServer").getAttribute("value"); if(override == "true" && !useGlobalFlag) autocomplete.selectedItem = document.getElementById("directories"); else autocomplete.selectedItem = document.getElementById("useGlobalPref"); var directoriesList = document.getElementById("directoriesList"); var directoryServer = document.getElementById("identity.directoryServer").getAttribute('value'); if (directoryServerFlag) { document.getElementById("identity.directoryServer").setAttribute("value", ""); directoryServer = ""; } directoriesList.value = directoryServer; gFromGlobalPref = false;}
var override = document.getElementById("identity.overrideGlobalPref").getAttribute("value"); var autocomplete = document.getElementById("ldapAutocomplete"); if(override == "true") autocomplete.selectedItem = document.getElementById("directories"); else autocomplete.selectedItem = document.getElementById("useGlobalPref");
function setupDirectoriesList(){ var directoriesList = document.getElementById("directoriesList"); var directoryServer = document.getElementById("identity.directoryServer").getAttribute('value'); try { var directoryServerString = gPrefInt.CopyCharPref(directoryServer + ".description"); } catch(ex) { var addressBookBundle = document.getElementById("bundle_addressBook"); directoryServerString = addressBookBundle.getString("directoriesListItemNone"); } directoriesList.value = directoryServer; directoriesList.label = directoryServerString; gFromGlobalPref = false;}
EnableMenuItem(menuID, true);
EnableMenuItem(menuID, (numSelected == 1));
function SetupEditAsNewMenuItem(menuID, numSelected, forceHide){ ShowMenuItem(menuID, (numSelected <= 1)&& !forceHide); EnableMenuItem(menuID, true);}
ShowMenuItem(menuID, !forceHide);
ShowMenuItem(menuID, (numSelected <= 1) && !forceHide);
function SetupForwardMenuItem(menuID, numSelected, forceHide){ ShowMenuItem(menuID, !forceHide); EnableMenuItem(menuID, (numSelected > 0));}
controller.registerCommand("cmd_ConvertToTable", nsConvertToTable);
function SetupHTMLEditorCommands(){ var controller = GetEditorController(); if (!controller) return; // Include everthing a text editor does SetupTextEditorCommands(); dump("Registering HTML editor commands\n"); controller.registerCommand("cmd_listProperties", nsListPropertiesCommand); controller.registerCommand("cmd_pageProperties", nsPagePropertiesCommand); controller.registerCommand("cmd_colorProperties", nsColorPropertiesCommand); controller.registerCommand("cmd_advancedProperties", nsAdvancedPropertiesCommand); controller.registerCommand("cmd_objectProperties", nsObjectPropertiesCommand); controller.registerCommand("cmd_removeLinks", nsRemoveLinksCommand); controller.registerCommand("cmd_image", nsImageCommand); controller.registerCommand("cmd_hline", nsHLineCommand); controller.registerCommand("cmd_link", nsLinkCommand); controller.registerCommand("cmd_anchor", nsAnchorCommand); controller.registerCommand("cmd_insertHTML", nsInsertHTMLCommand); controller.registerCommand("cmd_insertBreak", nsInsertBreakCommand); controller.registerCommand("cmd_insertBreakAll",nsInsertBreakAllCommand); controller.registerCommand("cmd_table", nsInsertOrEditTableCommand); controller.registerCommand("cmd_editTable", nsEditTableCommand); controller.registerCommand("cmd_SelectTable", nsSelectTableCommand); controller.registerCommand("cmd_SelectRow", nsSelectTableRowCommand); controller.registerCommand("cmd_SelectColumn", nsSelectTableColumnCommand); controller.registerCommand("cmd_SelectCell", nsSelectTableCellCommand); controller.registerCommand("cmd_SelectAllCells", nsSelectAllTableCellsCommand); controller.registerCommand("cmd_InsertTable", nsInsertTableCommand); controller.registerCommand("cmd_InsertRowAbove", nsInsertTableRowAboveCommand); controller.registerCommand("cmd_InsertRowBelow", nsInsertTableRowBelowCommand); controller.registerCommand("cmd_InsertColumnBefore", nsInsertTableColumnBeforeCommand); controller.registerCommand("cmd_InsertColumnAfter", nsInsertTableColumnAfterCommand); controller.registerCommand("cmd_InsertCellBefore", nsInsertTableCellBeforeCommand); controller.registerCommand("cmd_InsertCellAfter", nsInsertTableCellAfterCommand); controller.registerCommand("cmd_DeleteTable", nsDeleteTableCommand); controller.registerCommand("cmd_DeleteRow", nsDeleteTableRowCommand); controller.registerCommand("cmd_DeleteColumn", nsDeleteTableColumnCommand); controller.registerCommand("cmd_DeleteCell", nsDeleteTableCellCommand); controller.registerCommand("cmd_DeleteCellContents", nsDeleteTableCellContentsCommand); controller.registerCommand("cmd_JoinTableCells", nsJoinTableCellsCommand); controller.registerCommand("cmd_SplitTableCell", nsSplitTableCellCommand); controller.registerCommand("cmd_TableOrCellColor", nsTableOrCellColorCommand); controller.registerCommand("cmd_NormalizeTable", nsNormalizeTableCommand); controller.registerCommand("cmd_FinishHTMLSource", nsFinishHTMLSource); controller.registerCommand("cmd_CancelHTMLSource", nsCancelHTMLSource); controller.registerCommand("cmd_smiley", nsSetSmiley); controller.registerCommand("cmd_buildRecentPagesMenu", nsBuildRecentPagesMenu);}
commandManager.registerCommand("cmd_removeLinks", nsRemoveLinksCommand);
function SetupHTMLEditorCommands(){ var commandManager = GetComposerCommandManager(); if (!commandManager) return; // Include everthing a text editor does SetupTextEditorCommands(); //dump("Registering HTML editor commands\n"); commandManager.registerCommand("cmd_renderedHTMLEnabler", nsDummyHTMLCommand); commandManager.registerCommand("cmd_listProperties", nsListPropertiesCommand); commandManager.registerCommand("cmd_pageProperties", nsPagePropertiesCommand); commandManager.registerCommand("cmd_colorProperties", nsColorPropertiesCommand); commandManager.registerCommand("cmd_advancedProperties", nsAdvancedPropertiesCommand); commandManager.registerCommand("cmd_objectProperties", nsObjectPropertiesCommand); commandManager.registerCommand("cmd_removeLinks", nsRemoveLinksCommand); commandManager.registerCommand("cmd_removeNamedAnchors", nsRemoveNamedAnchorsCommand); commandManager.registerCommand("cmd_editLink", nsEditLinkCommand); commandManager.registerCommand("cmd_form", nsFormCommand); commandManager.registerCommand("cmd_inputtag", nsInputTagCommand); commandManager.registerCommand("cmd_inputimage", nsInputImageCommand); commandManager.registerCommand("cmd_textarea", nsTextAreaCommand); commandManager.registerCommand("cmd_select", nsSelectCommand); commandManager.registerCommand("cmd_button", nsButtonCommand); commandManager.registerCommand("cmd_label", nsLabelCommand); commandManager.registerCommand("cmd_fieldset", nsFieldSetCommand); commandManager.registerCommand("cmd_isindex", nsIsIndexCommand); commandManager.registerCommand("cmd_image", nsImageCommand); commandManager.registerCommand("cmd_hline", nsHLineCommand); commandManager.registerCommand("cmd_link", nsLinkCommand); commandManager.registerCommand("cmd_anchor", nsAnchorCommand); commandManager.registerCommand("cmd_insertHTMLWithDialog", nsInsertHTMLWithDialogCommand); commandManager.registerCommand("cmd_insertBreak", nsInsertBreakCommand); commandManager.registerCommand("cmd_insertBreakAll",nsInsertBreakAllCommand); commandManager.registerCommand("cmd_table", nsInsertOrEditTableCommand); commandManager.registerCommand("cmd_editTable", nsEditTableCommand); commandManager.registerCommand("cmd_SelectTable", nsSelectTableCommand); commandManager.registerCommand("cmd_SelectRow", nsSelectTableRowCommand); commandManager.registerCommand("cmd_SelectColumn", nsSelectTableColumnCommand); commandManager.registerCommand("cmd_SelectCell", nsSelectTableCellCommand); commandManager.registerCommand("cmd_SelectAllCells", nsSelectAllTableCellsCommand); commandManager.registerCommand("cmd_InsertTable", nsInsertTableCommand); commandManager.registerCommand("cmd_InsertRowAbove", nsInsertTableRowAboveCommand); commandManager.registerCommand("cmd_InsertRowBelow", nsInsertTableRowBelowCommand); commandManager.registerCommand("cmd_InsertColumnBefore", nsInsertTableColumnBeforeCommand); commandManager.registerCommand("cmd_InsertColumnAfter", nsInsertTableColumnAfterCommand); commandManager.registerCommand("cmd_InsertCellBefore", nsInsertTableCellBeforeCommand); commandManager.registerCommand("cmd_InsertCellAfter", nsInsertTableCellAfterCommand); commandManager.registerCommand("cmd_DeleteTable", nsDeleteTableCommand); commandManager.registerCommand("cmd_DeleteRow", nsDeleteTableRowCommand); commandManager.registerCommand("cmd_DeleteColumn", nsDeleteTableColumnCommand); commandManager.registerCommand("cmd_DeleteCell", nsDeleteTableCellCommand); commandManager.registerCommand("cmd_DeleteCellContents", nsDeleteTableCellContentsCommand); commandManager.registerCommand("cmd_JoinTableCells", nsJoinTableCellsCommand); commandManager.registerCommand("cmd_SplitTableCell", nsSplitTableCellCommand); commandManager.registerCommand("cmd_TableOrCellColor", nsTableOrCellColorCommand); commandManager.registerCommand("cmd_NormalizeTable", nsNormalizeTableCommand); commandManager.registerCommand("cmd_smiley", nsSetSmiley); commandManager.registerCommand("cmd_ConvertToTable", nsConvertToTable);}
document.getElementById( "listLabel").setAttribute('value', GetBundleString( 'ImportMailListLabel'));
function SetUpImportType(){ // set dialog title switch ( top.importType ) { case "mail": document.getElementById( "listLabel").setAttribute('value', GetBundleString( 'ImportMailListLabel')); document.getElementById( "mailRadio").checked = true; document.getElementById( "addressbookRadio").checked = false; document.getElementById( "settingsRadio").checked = false; break; case "addressbook": // top.window.title = top.bundle.GetStringFromName('ImportAddressBooksDialogTitle'); document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportAddressBooksListLabel')); //SetDivText('listLabel', GetBundleString('ImportAddressBooksListLabel')); document.getElementById( "addressbookRadio").checked = true; document.getElementById( "mailRadio").checked = false; document.getElementById( "settingsRadio").checked = false; break; case "settings": // top.window.title = top.bundle.GetStringFromName('ImportSettingsDialogTitle'); document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportSettingsListLabel')); //SetDivText('listLabel', GetBundleString('ImportSettingsListLabel')); document.getElementById( "settingsRadio").checked = true; document.getElementById( "addressbookRadio").checked = false; document.getElementById( "mailRadio").checked = false; break; } ListModules();}
document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportAddressBooksListLabel'));
function SetUpImportType(){ // set dialog title switch ( top.importType ) { case "mail": document.getElementById( "listLabel").setAttribute('value', GetBundleString( 'ImportMailListLabel')); document.getElementById( "mailRadio").checked = true; document.getElementById( "addressbookRadio").checked = false; document.getElementById( "settingsRadio").checked = false; break; case "addressbook": // top.window.title = top.bundle.GetStringFromName('ImportAddressBooksDialogTitle'); document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportAddressBooksListLabel')); //SetDivText('listLabel', GetBundleString('ImportAddressBooksListLabel')); document.getElementById( "addressbookRadio").checked = true; document.getElementById( "mailRadio").checked = false; document.getElementById( "settingsRadio").checked = false; break; case "settings": // top.window.title = top.bundle.GetStringFromName('ImportSettingsDialogTitle'); document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportSettingsListLabel')); //SetDivText('listLabel', GetBundleString('ImportSettingsListLabel')); document.getElementById( "settingsRadio").checked = true; document.getElementById( "addressbookRadio").checked = false; document.getElementById( "mailRadio").checked = false; break; } ListModules();}
document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportSettingsListLabel'));
function SetUpImportType(){ // set dialog title switch ( top.importType ) { case "mail": document.getElementById( "listLabel").setAttribute('value', GetBundleString( 'ImportMailListLabel')); document.getElementById( "mailRadio").checked = true; document.getElementById( "addressbookRadio").checked = false; document.getElementById( "settingsRadio").checked = false; break; case "addressbook": // top.window.title = top.bundle.GetStringFromName('ImportAddressBooksDialogTitle'); document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportAddressBooksListLabel')); //SetDivText('listLabel', GetBundleString('ImportAddressBooksListLabel')); document.getElementById( "addressbookRadio").checked = true; document.getElementById( "mailRadio").checked = false; document.getElementById( "settingsRadio").checked = false; break; case "settings": // top.window.title = top.bundle.GetStringFromName('ImportSettingsDialogTitle'); document.getElementById( "listLabel").setAttribute('value', GetBundleString('ImportSettingsListLabel')); //SetDivText('listLabel', GetBundleString('ImportSettingsListLabel')); document.getElementById( "settingsRadio").checked = true; document.getElementById( "addressbookRadio").checked = false; document.getElementById( "mailRadio").checked = false; break; } ListModules();}
ip.privacy = item.getUnproxiedProperty("PRIVACY");
ip.privacy = item.getUnproxiedProperty("CLASS");
setupItemBaseParams: function (item, olditem, ip) { ip.cal_id = this.mCalId; ip.id = item.id; if (item.recurrenceId) this.setDateParamHelper(ip, "recurrence_id", item.recurrenceId); var tmp; if (tmp = item.getUnproxiedProperty("CREATED")) ip.time_created = tmp.nativeTime; if (tmp = item.getUnproxiedProperty("LAST-MODIFIED")) ip.last_modified = tmp.nativeTime; ip.title = item.getUnproxiedProperty("SUMMARY"); ip.priority = item.getUnproxiedProperty("PRIORITY"); ip.privacy = item.getUnproxiedProperty("PRIVACY"); ip.ical_status = item.getUnproxiedProperty("STATUS"); if (!item.parentItem) ip.event_stamp = item.stampTime.nativeTime; if (tmp = item.getUnproxiedProperty("ALARMTIME")) this.setDateParamHelper(ip, "alarm_time", tmp); },
dump("SetupMoveCopyMenus for " + menuid + "\n");
function SetupMoveCopyMenus(menuid, accountManagerDataSource, folderDataSource){ dump("SetupMoveCopyMenus for " + menuid + "\n"); var menu = document.getElementById(menuid); if(menu) { menu.database.AddDataSource(accountManagerDataSource); menu.database.AddDataSource(folderDataSource); menu.setAttribute('ref', 'msgaccounts:/'); }}
var menuitem = document.createElement("menuitem"); menuitem.setAttribute ("label", munger.entries[entry].description); menuitem.setAttribute ("id", "menu-munger-" + entry); menuitem.setAttribute ("type", "checkbox"); if (munger.entries[entry].enabled) menuitem.setAttribute ("checked", "true"); menuitem.setAttribute ("oncommand", "onToggleMungerEntry('" + entry + "');"); menu.appendChild(menuitem);
if (entry[0] != ".") { var menuitem = document.createElement("menuitem"); menuitem.setAttribute ("label", munger.entries[entry].description); menuitem.setAttribute ("id", "menu-munger-" + entry); menuitem.setAttribute ("type", "checkbox"); if (munger.entries[entry].enabled) menuitem.setAttribute ("checked", "true"); menuitem.setAttribute ("oncommand", "onToggleMungerEntry('" + entry + "');"); menu.appendChild(menuitem); }
function setupMungerMenu(munger){ var menu = document.getElementById("menu-munger"); for (var entry in munger.entries) { var menuitem = document.createElement("menuitem"); menuitem.setAttribute ("label", munger.entries[entry].description); menuitem.setAttribute ("id", "menu-munger-" + entry); menuitem.setAttribute ("type", "checkbox"); if (munger.entries[entry].enabled) menuitem.setAttribute ("checked", "true"); menuitem.setAttribute ("oncommand", "onToggleMungerEntry('" + entry + "');"); menu.appendChild(menuitem); }}
var showNew = (numSelected <=1) && (serverType != 'nntp') && canCreateNew;
var isInbox = specialFolder == "Inbox"; var showNew = ((numSelected <=1) && (serverType != 'nntp') && canCreateNew) || isInbox;
function SetupNewMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var canCreateNew = targetFolder.getAttribute('CanCreateSubfolders') == 'true'; var showNew = (numSelected <=1) && (serverType != 'nntp') && canCreateNew; ShowMenuItem("folderPaneContext-new", showNew); EnableMenuItem("folderPaneContext-new", true); if(showNew) { if(isServer) SetMenuItemValue("folderPaneContext-new", Bundle.GetStringFromName("newFolder")); else SetMenuItemValue("folderPaneContext-new", Bundle.GetStringFromName("newSubfolder")); }}
if(isServer)
if(isServer || isInbox)
function SetupNewMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var canCreateNew = targetFolder.getAttribute('CanCreateSubfolders') == 'true'; var showNew = (numSelected <=1) && (serverType != 'nntp') && canCreateNew; ShowMenuItem("folderPaneContext-new", showNew); EnableMenuItem("folderPaneContext-new", true); if(showNew) { if(isServer) SetMenuItemValue("folderPaneContext-new", Bundle.GetStringFromName("newFolder")); else SetMenuItemValue("folderPaneContext-new", Bundle.GetStringFromName("newSubfolder")); }}
EnableMenuItem("folderPaneContext-new", !isIMAPFolder || !ioService.offline);
EnableMenuItem("folderPaneContext-new", !isIMAPFolder || MailOfflineMgr.isOnline());
function SetupNewMenuItem(folderResource, numSelected, isServer, serverType,specialFolder){ var folderTree = GetFolderTree(); var canCreateNew = GetFolderAttribute(folderTree, folderResource, "CanCreateSubfolders") == "true"; var isInbox = specialFolder == "Inbox"; var isIMAPFolder = GetFolderAttribute(folderTree, folderResource, "ServerType") == "imap"; var ioService = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService); var showNew = ((numSelected <=1) && (serverType != 'nntp') && canCreateNew) || isInbox; ShowMenuItem("folderPaneContext-new", showNew); EnableMenuItem("folderPaneContext-new", !isIMAPFolder || !ioService.offline); if (showNew) { if (isServer || isInbox) SetMenuItemLabel("folderPaneContext-new", gMessengerBundle.getString("newFolder")); else SetMenuItemLabel("folderPaneContext-new", gMessengerBundle.getString("newSubfolder")); }}
EnableMenuItem(menuID, true);
EnableMenuItem(menuID, (numSelected == 1));
function SetupNewMessageWindowMenuItem(menuID, numSelected, forceHide){ ShowMenuItem(menuID, (numSelected <= 1) && !forceHide); EnableMenuItem(menuID, true);}
var okButton = document.documentElement.getButton("accept"); var cancelButton = document.documentElement.getButton("cancel");
doSetOKCancel( onStart, onExit, null, null ); var okButton = document.getElementById("ok"); var cancelButton = document.getElementById("cancel");
function SetUpOKCancelButtons(){ var okButton = document.documentElement.getButton("accept"); var cancelButton = document.documentElement.getButton("cancel"); var okButtonString; var cancelButtonString; try { if (gStartupMode) { okButtonString = gProfileManagerBundle.getFormattedString("startButton", [gBrandBundle.getString("brandShortName")]); cancelButtonString = gProfileManagerBundle.getString("exitButton"); } else { okButtonString = gProfileManagerBundle.getString("selectButton"); cancelButtonString = gProfileManagerBundle.getString("cancel"); } } catch (e) { okButtonString = "Start Yah"; cancelButtonString = "Exit Yah"; } okButton.setAttribute( "label", okButtonString ); cancelButton.setAttribute( "label", cancelButtonString );}
okButton.setAttribute( "class", ( okButton.getAttribute("class") + " padded" ) );
function SetUpOKCancelButtons(){ var okButton = document.documentElement.getButton("accept"); var cancelButton = document.documentElement.getButton("cancel"); var okButtonString; var cancelButtonString; try { if (gStartupMode) { okButtonString = gProfileManagerBundle.getFormattedString("startButton", [gBrandBundle.getString("brandShortName")]); cancelButtonString = gProfileManagerBundle.getString("exitButton"); } else { okButtonString = gProfileManagerBundle.getString("selectButton"); cancelButtonString = gProfileManagerBundle.getString("cancel"); } } catch (e) { okButtonString = "Start Yah"; cancelButtonString = "Exit Yah"; } okButton.setAttribute( "label", okButtonString ); cancelButton.setAttribute( "label", cancelButtonString );}
openButton.removeAttribute("disabled");
if ( !targetFile.isExecutable() ) { openButton.removeAttribute("disabled"); }
function setupPostProgressUI(){ //dialog.cancel.childNodes[0].nodeValue = "Close"; // turn the cancel button into a close button var cancelButton = document.getElementById('cancel'); if (cancelButton) { cancelButton.label = "Close"; // mscott -> replace with a string bundle cancelButton.setAttribute("onclick", "window.close()"); } // enable the open and open folder buttons var openFolderButton = document.getElementById('openFolder'); var openButton = document.getElementById('open'); openFolderButton.removeAttribute("disabled"); openButton.removeAttribute("disabled"); dialog.pause.setAttribute("disabled", true);}
cancelButton.value = "Close";
cancelButton.label = "Close";
function setupPostProgressUI(){ //dialog.cancel.childNodes[0].nodeValue = "Close"; // turn the cancel button into a close button var cancelButton = document.getElementById('cancel'); if (cancelButton) { cancelButton.value = "Close"; // mscott -> replace with a string bundle cancelButton.setAttribute("onclick", "window.close()"); } // enable the open and open folder buttons var openFolderButton = document.getElementById('openFolder'); var openButton = document.getElementById('open'); openFolderButton.removeAttribute("disabled"); openButton.removeAttribute("disabled");}
dialog.pause.setAttribute("disabled", true);
function setupPostProgressUI(){ //dialog.cancel.childNodes[0].nodeValue = "Close"; // turn the cancel button into a close button var cancelButton = document.getElementById('cancel'); if (cancelButton) { cancelButton.label = "Close"; // mscott -> replace with a string bundle cancelButton.setAttribute("onclick", "window.close()"); } // enable the open and open folder buttons var openFolderButton = document.getElementById('openFolder'); var openButton = document.getElementById('open'); openFolderButton.removeAttribute("disabled"); openButton.removeAttribute("disabled");}
RDF = Components.classes["component:
RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService();
function SetUpRDF(){ if (!RDF) { RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); } if (!gSubscribeDS) { gSubscribeDS = RDF.GetDataSource("rdf:subscribe"); }}
var newObserver = new readOnlyAnnouncer(calendar);
var newObserver = new errorAnnouncer(calendar);
setUpReadOnlyObservers: function() { var calendars = this.getCalendars({}); for each(calendar in calendars) { var newObserver = new readOnlyAnnouncer(calendar); calendar.addObserver(newObserver.observer); } },
var isInbox = specialFolder == "Inbox"; var isTrash = specialFolder == "Trash"; var isUnsent = specialFolder == "Unsent Messages"; var showRemove = (numSelected <=1) && (isServer || (isMail && (!(isInbox || isTrash || isUnsent))));
var isSpecialFolder = specialFolder != "none"; var showRemove = (numSelected <=1) && (isMail && !isSpecialFolder) && !isServer;
function SetupRemoveMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var isMail = serverType != 'nntp'; var isInbox = specialFolder == "Inbox"; var isTrash = specialFolder == "Trash"; var isUnsent = specialFolder == "Unsent Messages"; var showRemove = (numSelected <=1) && (isServer || (isMail && (!(isInbox || isTrash || isUnsent)))); ShowMenuItem("folderPaneContext-remove", showRemove); EnableMenuItem("folderPaneContext-remove", false); if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeAccount")); } else { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeNewsAccount")); } } else if(isMail && !(isInbox || isTrash || isUnsent)) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeFolder")); }}
EnableMenuItem("folderPaneContext-remove", false);
EnableMenuItem("folderPaneContext-remove", true);
function SetupRemoveMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var isMail = serverType != 'nntp'; var isInbox = specialFolder == "Inbox"; var isTrash = specialFolder == "Trash"; var isUnsent = specialFolder == "Unsent Messages"; var showRemove = (numSelected <=1) && (isServer || (isMail && (!(isInbox || isTrash || isUnsent)))); ShowMenuItem("folderPaneContext-remove", showRemove); EnableMenuItem("folderPaneContext-remove", false); if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeAccount")); } else { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeNewsAccount")); } } else if(isMail && !(isInbox || isTrash || isUnsent)) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeFolder")); }}
if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeAccount")); } else { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeNewsAccount")); } } else if(isMail && !(isInbox || isTrash || isUnsent))
if(isMail && !isSpecialFolder)
function SetupRemoveMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var isMail = serverType != 'nntp'; var isInbox = specialFolder == "Inbox"; var isTrash = specialFolder == "Trash"; var isUnsent = specialFolder == "Unsent Messages"; var showRemove = (numSelected <=1) && (isServer || (isMail && (!(isInbox || isTrash || isUnsent)))); ShowMenuItem("folderPaneContext-remove", showRemove); EnableMenuItem("folderPaneContext-remove", false); if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeAccount")); } else { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeNewsAccount")); } } else if(isMail && !(isInbox || isTrash || isUnsent)) { SetMenuItemValue("folderPaneContext-remove", Bundle.GetStringFromName("removeFolder")); }}
ShowMenuItem("folderPaneContext-rename", (numSelected <= 1) && (isServer || canRename));
ShowMenuItem("folderPaneContext-rename", (numSelected <= 1) && !isServer && (specialFolder == "none") && canRename);
function SetupRenameMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var isSpecialFolder = specialFolder != 'none'; var isMail = serverType != 'nntp'; var canRename = (targetFolder.getAttribute('CanRename') == "true"); ShowMenuItem("folderPaneContext-rename", (numSelected <= 1) && (isServer || canRename)); EnableMenuItem("folderPaneContext-rename", !isServer); if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameAccount")); } else { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameNewsAccount")); } } else if(canRename) { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameFolder")); }}
if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameAccount")); } else { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameNewsAccount")); } } else if(canRename)
if(canRename)
function SetupRenameMenuItem(targetFolder, numSelected, isServer, serverType, specialFolder){ var isSpecialFolder = specialFolder != 'none'; var isMail = serverType != 'nntp'; var canRename = (targetFolder.getAttribute('CanRename') == "true"); ShowMenuItem("folderPaneContext-rename", (numSelected <= 1) && (isServer || canRename)); EnableMenuItem("folderPaneContext-rename", !isServer); if(isServer) { if(isMail) { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameAccount")); } else { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameNewsAccount")); } } else if(canRename) { SetMenuItemValue("folderPaneContext-rename", Bundle.GetStringFromName("renameFolder")); }}
gReplyButton.removeAttribute("type"); gReplyAllButton.removeAttribute("type"); gReplyAllButton.setAttribute("tooltiptext", gReplyAllButton.getAttribute("tooltiptextmail"));
function SetUpToolbarButtons(uri){ //dump("SetUpToolbarButtons("+uri+")\n"); // eventually, we might want to set up the toolbar differently for imap, // pop, and news. for now, just tweak it based on if it is news or not. var forNews = isNewsURI(uri); if(!gMarkButton) gMarkButton = document.getElementById("button-mark"); if(!gDeleteButton) gDeleteButton = document.getElementById("button-delete"); var buttonToHide = null; var buttonToShow = null; if (forNews) { buttonToHide = gDeleteButton; buttonToShow = gMarkButton; } else { buttonToHide = gMarkButton; buttonToShow = gDeleteButton; } if (buttonToHide) { buttonToHide.setAttribute('hidden',true); } if (buttonToShow) { buttonToShow.removeAttribute('hidden'); }}
lastTreeChildrenValue = null; lastTreeChildren = null;
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); // forget the cached tree children lastTreeChildrenValue = null; lastTreeChildren = null; gStatusBar = document.getElementById('statusbar-icon'); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribeTree.setAttribute('ref',null); // clear out the text field when switching server gNameField.setAttribute('value',""); gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer); } catch (ex) { //dump("failed to populate subscribe ds: " + ex + "\n"); }}
gNameField.setAttribute('value',"");
EnableSearchUI();
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); // forget the cached tree children lastTreeChildrenValue = null; lastTreeChildren = null; gStatusBar = document.getElementById('statusbar-icon'); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribeTree.setAttribute('ref',null); // clear out the text field when switching server gNameField.setAttribute('value',""); gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer); } catch (ex) { //dump("failed to populate subscribe ds: " + ex + "\n"); }}
gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener;
gNameField.setAttribute('value',"");
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); // forget the cached tree children lastTreeChildrenValue = null; lastTreeChildren = null; gStatusBar = document.getElementById('statusbar-icon'); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribeTree.setAttribute('ref',null); // clear out the text field when switching server gNameField.setAttribute('value',""); gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer); } catch (ex) { //dump("failed to populate subscribe ds: " + ex + "\n"); }}
gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined");
SwitchToNormalView();
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); // forget the cached tree children lastTreeChildrenValue = null; lastTreeChildren = null; gStatusBar = document.getElementById('statusbar-icon'); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribeTree.setAttribute('ref',null); // clear out the text field when switching server gNameField.setAttribute('value',""); gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer); } catch (ex) { //dump("failed to populate subscribe ds: " + ex + "\n"); }}
gSubscribableServer.startPopulating(msgWindow, forceToServer);
gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer);
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); // forget the cached tree children lastTreeChildrenValue = null; lastTreeChildren = null; gStatusBar = document.getElementById('statusbar-icon'); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribeTree.setAttribute('ref',null); // clear out the text field when switching server gNameField.setAttribute('value',""); gSubscribeTree.database.RemoveDataSource(subscribeDS); gSubscribableServer.subscribeListener = MySubscribeListener; gStatusFeedback.showProgress(0); gStatusFeedback.showStatusString(gSubscribeBundle.getString("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.startPopulating(msgWindow, forceToServer); } catch (ex) { //dump("failed to populate subscribe ds: " + ex + "\n"); }}
gSubscribeTree.setAttribute('ref',null);
function SetUpTree(){ dump("SetUpTree()\n"); var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { subscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); subscribableServer.subscribeListener = MySubscribeListener; subscribableServer.populateSubscribeDatasource(null /* eventually, a nsIMsgWindow */); } catch (ex) { dump("failed to populate subscribe ds: " + ex + "\n"); }}
gStatusBar.setAttribute("mode","undetermined");
gStatusFeedback.ShowProgress(0); gStatusFeedback.ShowStatusString(Bundle.GetStringFromName("pleaseWaitString")); gStatusBar.setAttribute("mode","undetermined");
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); SetUpRDF(); gSubscribeTree.setAttribute('ref',null); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribableServer.subscribeListener = MySubscribeListener; // Turn progress meter on. gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.populateSubscribeDatasource(null /* eventually, a nsIMsgWindow */, forceToServer); } catch (ex) { dump("failed to populate subscribe ds: " + ex + "\n"); }}
gSubscribableServer.populateSubscribeDatasource(null , forceToServer);
gSubscribableServer.populateSubscribeDatasource(msgWindow, forceToServer);
function SetUpTree(forceToServer){ //dump("SetUpTree()\n"); SetUpRDF(); gSubscribeTree.setAttribute('ref',null); if (!gServerURI) return; var folder = GetMsgFolderFromUri(gServerURI); var server = folder.server; try { gSubscribableServer = server.QueryInterface(Components.interfaces.nsISubscribableServer); gSubscribableServer.subscribeListener = MySubscribeListener; // Turn progress meter on. gStatusBar.setAttribute("mode","undetermined"); gSubscribableServer.populateSubscribeDatasource(null /* eventually, a nsIMsgWindow */, forceToServer); } catch (ex) { dump("failed to populate subscribe ds: " + ex + "\n"); }}