Tema: Re: CROSS: Add-on'as Thunderbird'ui sujungti zinutems (combine &decode)
Autorius: ejs
Data: 2013-01-14 03:21:21
2013.01.11 21:29, ejs rašė:

> Jei visi folder'iai yra IMAP arba NNTP, belieka "Local folders" ar kaip
> jis ten vadinasi, kur galima kurti katalogą.
>
> Bent jau pas mane jo nesukuria.

ko gero problemą suradau:

po

if ( (oMsgFolder.server.type == "imap") || (oMsgFolder.server.type == 
"nntp") ) {
	// Create folder where we can store joined messages
	let rootMsgFolder = GetDefaultAccountRootFolder();
	MyDump(" [Join] Root folder name: " + rootMsgFolder.name + "; URL = " + 
rootMsgFolder.folderURL + "\n");
  ...

gaunu:
Join:  [Join] Root folder name: Suvestiniai aplankai; URL = 
mailbox:///C:/Users/.../AppData/Roaming/Thunderbird/Profiles/.../Mail/smart%20mailboxes/

....

škias taip:


Vietoj

// Create folder where we can store joined messages
	let rootMsgFolder = GetDefaultAccountRootFolder();

rašom

// Create folder where we can store joined messages
			
var acctMgr = 
Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager);

var accounts = acctMgr.accounts;
for (var i = 0; i < accounts.Count(); i++) {
	var account = accounts.QueryElementAt(i,
            Components.interfaces.nsIMsgAccount);
	var rootFolder = account.incomingServer.rootFolder; // nsIMsgFolder
	MyDump(" [Join] Folder iteration: name: '" + rootMsgFolder.name + "', 
servet type '"+ rootMsgFolder.server.type +"'\n");
				
	if ( !(rootFolder.server.type == "imap") &&
	     !(rootFolder.server.type == "nntp") &&
	     !(rootFolder.server.type == "im")) {
		var rootMsgFolder = rootFolder;
	}
}


Berods dirba.
-- 
V-days comes to Thunderbird ;)