add: var protocolInfo = Components.classes["@mozilla.org/messenger/protocol/info;1?type=" + msgFolder.server.type].getService(Components.interfaces.nsIMsgProtocolInfo);  /** * Check if this protocol service needs to create special folder URIs. * In case of IMAP, when a new account is created, folders 'Sent', 'Drafts' * and 'Templates' are not created then, but created on demand at runtime. * But we do need to present them as possible choices in the Copies and Folders * UI. To do that, folder URIs have to be created and stored in the prefs file. * So, if there is a need to build special folders, append the special folder * names and create right URIs. */ if (protocolInfo.needToBuildSpecialFolderURIs) { var folderDelim = "/"; var sentFolderName =  gMessengerBundle.getString("sentFolderName"); var draftsFolderName =  gMessengerBundle.getString("draftsFolderName"); var templatesFolderName =  gMessengerBundle.getString("templatesFolderName");  identity.draftFolder = msgFolder.server.serverURI+ folderDelim + draftsFolderName; identity.stationeryFolder = msgFolder.server.serverURI+ folderDelim + templatesFolderName; identity.fccFolder = msgFolder.server.serverURI+ folderDelim + sentFolderName; } else {  
context: function setDefaultCopiesAndFoldersPrefs(identity, server){	dump("finding folders on server = " + server.hostName + "\n");	var rootFolder = server.RootFolder;	// we need to do this or it is possible that the server's draft,    // stationery fcc folder will not be in rdf	//	// this can happen in a couple cases	// 1) the first account we create, creates the local mail.  since    // local mail was just created, it obviously hasn't been opened,    // or in rdf..	// 2) the account we created is of a type where    // defaultCopiesAndFoldersPrefsToServer is true	// this since we are creating the server, it obviously hasn't been    // opened, or in rdf.	//	// this makes the assumption that the server's draft, stationery fcc folder	// are at the top level (ie subfolders of the root folder.)  this works    // because we happen to be doing things that way, and if the user changes    // that, it will work because to change the folder, it must be in rdf,    // coming from the folder cache, in the worst case.	var folders = rootFolder.GetSubFolders();	var msgFolder = rootFolder.QueryInterface(Components.interfaces.nsIMsgFolder);	var numFolders = new Object();	// these hex values come from nsMsgFolderFlags.h	var draftFolder = msgFolder.getFoldersWithFlag(0x0400, 1, numFolders);	var stationeryFolder = msgFolder.getFoldersWithFlag(0x400000, 1, numFolders);	var fccFolder = msgFolder.getFoldersWithFlag(0x0200, 1, numFolders);	if (draftFolder) identity.draftFolder = draftFolder.URI;	if (stationeryFolder) identity.stationeryFolder = stationeryFolder.URI;	if (fccFolder) identity.fccFolder = fccFolder.URI;	dump("fccFolder = " + identity.fccFolder + "\n");	dump("draftFolder = " + identity.draftFolder + "\n");	dump("stationeryFolder = " + identity.stationeryFolder + "\n");}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/9bb7587bd90cefcf094521cc53569f970033e6f5/AccountWizard.js/buggy/mailnews/base/prefs/resources/content/AccountWizard.js