Hendrik
About me
Name | Hendrik |
---|---|
User since | Nov. 29, 2012 |
Number of add-ons developed | 0 add-ons |
Average rating of developer's add-ons | Not yet rated |
My Reviews
Gnome Integration
Rated 4 out of 5 stars
I'm using Ubuntu 12.04.1 with Cinnamon. The addon worked great except that it only sent notifications when I did not use the account filtering feature. To fix that I modified the overlay.js:
119,120c119,120
< var title = this.format(titleFormat, subject, author, recipients, carbonCopy, date, folder, server, priority, messageSize, lineCount, messageID, account, false);
< var message = this.format(messageFormat, subject, author, recipients, carbonCopy, date, folder, server, priority, messageSize, lineCount, messageID, account, true);
---
> var title = this.format(titleFormat, subject, author, recipients, carbonCopy, date, folder, server, priority, messageSize, lineCount, messageID, account.incomingServer.prettyName, false);
> var message = this.format(messageFormat, subject, author, recipients, carbonCopy, date, folder, server, priority, messageSize, lineCount, messageID, account.incomingServer.prettyName, true);
133c133
< if(this.checkNotify(account, messageID, timeout) == true)
---
> if(this.checkNotify(account.key, messageID, timeout) == true)
862c862,863
<
---
> var account = findAccountFromFolder(folder);
>
886c887
< gnomeIntegration.notify(titleFormat, messageFormat, header.mime2DecodedSubject, header.mime2DecodedAuthor, header.mime2DecodedRecipients, cclist, Math.round(header.date / 1000), folder.prettyName, server.prettyName, header.priority, header.messageSize, header.lineCount, header.messageId, header.accountKey, header);
---
> gnomeIntegration.notify(titleFormat, messageFormat, header.mime2DecodedSubject, header.mime2DecodedAuthor, header.mime2DecodedRecipients, cclist, Math.round(header.date / 1000), folder.prettyName, server.prettyName, header.priority, header.messageSize, header.lineCount, header.messageId, account, header);
890a892,911
>
> function findAccountFromFolder (theFolder) {
> if (!theFolder)
> return null;
> 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
> if (rootFolder.hasSubFolders) {
> var subFolders = rootFolder.subFolders; // nsIMsgFolder
> while(subFolders.hasMoreElements()) {
> if (theFolder == subFolders.getNext().QueryInterface(Components.interfaces.nsIMsgFolder))
> return account.QueryInterface(Components.interfaces.nsIMsgAccount);
> }
> }
> }
> return null;
> }
It works great for me now!
To create your own collections, you must have a Mozilla Add-ons account.