+out-of-office (1.0.5)
+ * Fix Thunderbird 24 compatibility (https://developer.mozilla.org/en-US/docs/Thunderbird/Releases/24)
+ * Fix bug on SieveAccounts and nsIMsgIncomingServer: cf https://bugzilla.mozilla.org/show_bug.cgi?id=820377
+-- Oct 21 2013
+
out-of-office (1.0.4)
* Fix bug on SASL LOGIN (authentication error)
* Clean code on requests/responses
{
- var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].
- getService(Components.interfaces.nsIWindowMediator);
+ var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator);
- var existingAccountManager =
- windowManager.getMostRecentWindow("mailnews:accountmanager");
+ Components.utils.import('resource://gre/modules/Services.jsm');
+
+ var existingAccountManager = Services.wm.getMostRecentWindow("mailnews:accountmanager");
if (existingAccountManager)
{
*/
GetActiveServer : function()
{
+
+
// this function depends on funtions of the overlayed message window...
if (typeof(GetFirstSelectedMsgFolder) == "undefined")
return null;
function onDialogLoad()
{
// Require
- if( gAccount == null ){
+ if( gAccount == undefined || gAccount == null ){
throw "onDialogLoad(): Sieve Server Account cannot be null (gAccount)!";
}
else {
throw "updateData(): Sieve server account to configure cannot be null (gSieveServerToConfigure)!";
}
-}
\ No newline at end of file
+}
jsLoader.loadSubScript("chrome://out_of_office/content/editor/OutOfOfficeAccountTreeView.js");
- // Retrieve selected account and create OutOfOffice manager
+ // Retrieve selected account and create OutOfOffice manager
gOutOfOfficeManager = new OutOfOfficeManager(null);
// Retrieve out of office settings from server Cyrus for the out of office file
tree.currentIndex = 0;
onTreeSelect(tree);
}
+ else {
+ globalServices.errorSrv( OOOALV_FILE_HEADER + "No tree available" );
+ }
}
/**
globalServices.enableCtrlID('btnEdit', false );
globalServices.enableCtrlID('btnEnable', false );
}
-}
\ No newline at end of file
+}
*
* @type SieveAccounts
*/
- this.sieveAccounts = new SieveAccounts();
+ this.sieveAccounts = new SieveAccounts();
/**
* SieveAccounts list
*
* @type object
*/
this.listener = listener;
+
}
/**
* Return the name of the class initialized in CONST_HEADER variable.
return this.accounts;
}
-
\ No newline at end of file
+
/******************************************************************************/
function SieveAccounts()
{
+ Components.utils.import("resource://gre/modules/iteratorUtils.jsm");
+ Components.utils.import("resource://gre/modules/Services.jsm");
+ Components.utils.import("resource:///modules/mailServices.js");
+
var accountManager = Components.classes['@mozilla.org/messenger/account-manager;1']
.getService(Components.interfaces.nsIMsgAccountManager);
this.accounts = new Array();
-
+
+ for (let account in fixIterator(MailServices.accounts.allServers, Components.interfaces.nsIMsgIncomingServer)) {
+
+ if (account.type != "imap")
+ continue;
+
+ // pass the key if the imap account, not the account! This ensures, that...
+ // ... we always use the most recent settings.
+ this.accounts.push(
+ new SieveAccount(
+ account.rootMsgFolder.baseMessageURI.slice(15),
+ account.key,
+ account.prettyName));
+
+ }
+}
+
+/*
for (var i = 0; i < accountManager.allServers.Count(); i++)
{
var account = accountManager.allServers.GetElementAt(i)
account.key,
account.prettyName));
}
-}
+*/
+
+
/**
* Returns all SieveAccounts of the currently active Thunderbrid profile.
*
* @type string
*/
- this.extensionVersion="1.0.1beta";
+ this.extensionVersion="1.0.5";
/**
* preferences
*
/**
* the latest configured out_of_office version
*/
-pref("extensions.out_of_office.version","1.0.3");
+pref("extensions.out_of_office.version","1.0.5");
/**
* Debug activation
<em:id>out.of.office@milimail.org</em:id>
<em:name>Out Of Office</em:name>
- <em:version>1.0.3</em:version>
+ <em:version>1.0.5</em:version>
<em:creator>Trustedbird/Milimail project</em:creator>
<em:developer>Olivier Brun</em:developer>
<!-- Thunderbird -->
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>2.0</em:minVersion>
- <em:maxVersion>8.0</em:maxVersion>
+ <em:maxVersion>28.0</em:maxVersion>
</rdf:Description>
</em:targetApplication>