First svn checkin for the DSPAM thunderbird extension
authorhm <hm@373031ac-1c93-412e-a0c6-3e950ad17548>
Sun, 20 Apr 2008 00:50:50 +0000 (00:50 +0000)
committerhm <hm@373031ac-1c93-412e-a0c6-3e950ad17548>
Sun, 20 Apr 2008 00:50:50 +0000 (00:50 +0000)
git-svn-id: https://svn.hmonteiro.net/svn/mozilla-extensions/thunderbird/DSPAM/DSPAM@1 373031ac-1c93-412e-a0c6-3e950ad17548

30 files changed:
chrome.manifest [new file with mode: 0644]
chrome/content/contents.rdf [new file with mode: 0644]
chrome/content/dspam.js [new file with mode: 0644]
chrome/content/messenger.xul [new file with mode: 0644]
chrome/content/options.js [new file with mode: 0644]
chrome/content/options.xul [new file with mode: 0644]
chrome/content/toolbar.xul [new file with mode: 0644]
chrome/dspam.jar [new file with mode: 0644]
chrome/locale/en-US/contents.rdf [new file with mode: 0644]
chrome/locale/en-US/dspam.dtd [new file with mode: 0644]
chrome/locale/en-US/dspam.properties [new file with mode: 0644]
chrome/locale/pt-PT/contents.rdf [new file with mode: 0644]
chrome/locale/pt-PT/dspam.dtd [new file with mode: 0644]
chrome/locale/pt-PT/dspam.properties [new file with mode: 0644]
chrome/skin/button2.gif [new file with mode: 0644]
chrome/skin/contents.rdf [new file with mode: 0644]
chrome/skin/dspam-logo-eyes-small.gif [new file with mode: 0644]
chrome/skin/dspam-logo-eyes-transp-small.png [new file with mode: 0644]
chrome/skin/dspam-logo-eyes.gif [new file with mode: 0644]
chrome/skin/dspam-logo-small.gif [new file with mode: 0644]
chrome/skin/dspam-logo-text.gif [new file with mode: 0644]
chrome/skin/dspam-logo.gif [new file with mode: 0644]
chrome/skin/dspam.css [new file with mode: 0644]
chrome/skin/report-spam-orig.png [new file with mode: 0644]
chrome/skin/reportham-large.png [new file with mode: 0644]
chrome/skin/reportham-small.png [new file with mode: 0644]
chrome/skin/reportspam-large.png [new file with mode: 0644]
chrome/skin/reportspam-small.png [new file with mode: 0644]
install.rdf [new file with mode: 0644]
license.txt [new file with mode: 0644]

diff --git a/chrome.manifest b/chrome.manifest
new file mode 100644 (file)
index 0000000..1daf05c
--- /dev/null
@@ -0,0 +1,7 @@
+content        dspam   jar:chrome/dspam.jar!/content/
+locale dspam   en-US   jar:chrome/dspam.jar!/locale/en-US/
+locale dspam   pt-PT   jar:chrome/dspam.jar!/locale/pt-PT/
+skin   dspam   classic/1.0     jar:chrome/dspam.jar!/skin/
+
+overlay        chrome://messenger/content/messenger.xul        chrome://dspam/content/messenger.xul
+style  chrome://global/content/customizeToolbar.xul    chrome://dspam/skin/dspam.css
diff --git a/chrome/content/contents.rdf b/chrome/content/contents.rdf
new file mode 100644 (file)
index 0000000..a79a9ae
--- /dev/null
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+  <!-- list all the packages being supplied by this jar -->
+  <RDF:Seq about="urn:mozilla:package:root">
+    <RDF:li resource="urn:mozilla:package:dspam"/>
+  </RDF:Seq>
+
+  <!-- package information -->
+  <RDF:Description about="urn:mozilla:package:dspam"
+        chrome:displayName="DSPAM Extension"
+        chrome:author="Hugo Monteiro"
+        chrome:name="dspam"
+        chrome:description="Reports spam/ham to DSPAM" 
+        chrome:settingsURL="chrome://dspam/content/options.xul"
+        chrome:extension="true">
+  </RDF:Description>
+
+  <!-- overlay information -->
+  <RDF:Seq about="urn:mozilla:overlays">
+    <RDF:li resource="chrome://global/content/customizeToolbar.xul"/>
+    <RDF:li resource="chrome://messenger/content/messenger.xul"/>
+  </RDF:Seq>
+
+  <RDF:Seq about="chrome://global/content/customizeToolbar.xul">
+    <RDF:li>chrome://dspam/content/toolbar.xul</RDF:li>
+  </RDF:Seq>
+
+  <RDF:Seq about="chrome://messenger/content/messenger.xul">
+    <RDF:li>chrome://dspam/content/messenger.xul</RDF:li>
+  </RDF:Seq>
+</RDF:RDF>
diff --git a/chrome/content/dspam.js b/chrome/content/dspam.js
new file mode 100644 (file)
index 0000000..6a788b4
--- /dev/null
@@ -0,0 +1,243 @@
+var sendListener = {
+
+onGetDraftFolderURI: function ( folderURI ) {},
+onProgress: function ( msgID , progress , progressMax ) {},
+onSendNotPerformed: function ( msgID , status ) {},
+onStartSending: function ( msgID , msgSize ) {},
+onStatus: function ( msgID , msg ) {},
+
+onStopSending: function ( msgID , status , msg , returnFileSpec )
+{
+       DeleteJunkMail(this.action);
+},
+
+       action : 0
+
+};
+
+function MoveToFolder()
+{
+
+}
+
+
+var fwdStatus = 0;
+
+function dspamReportSpam(event) {
+
+       var validDspamConfig = true;
+       var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+       try {
+               var spamaction = pref.getIntPref("dspam.spamaction");
+       } catch(e) {
+               spamaction = 0;
+       }
+
+       try {
+               var spamaddress = pref.getCharPref("dspam.spamaddress");
+       } catch(e) {
+               validDspamConfig = false;
+       }
+
+       if (spamaction != 0) {
+               try {
+                       var spamfolder = RDF.GetResource(pref.getCharPref("dspam.spamfolder")).QueryInterface(Components.interfaces.nsIMsgFolder);
+               } catch (e) {
+                       validDspamConfig = false;
+               }
+               try {
+                       var hamfolder = RDF.GetResource(pref.getCharPref("dspam.hamfolder")).QueryInterface(Components.interfaces.nsIMsgFolder);
+               } catch (e) {
+                       validDspamConfig = false;
+               }
+       }
+
+       var folder = GetLoadedMsgFolder();
+       var rootFolder = folder.rootFolder;
+       var messageArray = GetSelectedMessages();
+       var server;
+       server = folder.server;
+       var dbv = GetDBView();
+
+       if (validDspamConfig == true) {
+
+               var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
+
+               msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
+
+               messenger.SetWindow(window, msgWindow);
+
+               if (messageArray && messageArray.length > 0) {
+                       uri = "";
+                       for (var i = 0; i < messageArray.length; ++i) {
+                               var messageUri = messageArray[i];
+                               var hdr = messenger.msgHdrFromURI(messageUri);
+       
+                               folder = hdr.folder;
+                               if (folder) {
+                                       server = folder.server;
+                               }
+       
+                               var accountKey = hdr.accountKey;
+                               if (accountKey.length > 0) {
+                                       var account = accountManager.getAccount(accountKey);
+                                       if (account)
+                                               server = account.incomingServer;
+                               }
+                               var fwdStatus = true;
+
+                               if (server) {
+                                       try {
+                                               msgComposeService.forwardMessage(spamaddress, hdr, msgWindow, server);
+                                       } catch(e) {
+                                               fwdStatus = false;
+                                       }
+
+                                       if ( fwdStatus ) {
+                                               if (spamaction == 1) {
+                                                       var out = new Object();
+                                                       var trashFolder = rootFolder.getFoldersWithFlag(MSG_FOLDER_FLAG_TRASH, 1, out);
+                                                       if (trashFolder) {
+                                                               try {
+                                                                       dbv.doCommandWithFolder(nsMsgViewCommandType.moveMessages, trashFolder);
+                                                               } catch(e) {
+                                                                       alert("Error while moving message to Trash Folder.");
+                                                               }
+                                                       } else
+                                                               alert("Could not get Trash folder settings.\nMessage was not moved.");
+                                                       }
+
+                                               if ((spamaction == 2) && (spamfolder != hamfolder)) {
+                                                       try {
+                                                                       dbv.doCommandWithFolder(nsMsgViewCommandType.moveMessages, spamfolder);
+                                                       } catch(e) {
+                                                               alert("Error while moving message to Spam Folder.");
+                                                       }
+                                               }
+                                       } else {
+                                               alert("la la la.");
+                                       }
+                               } else {
+                                       alert("Unknown Error. Please contact the plugin author.");
+                               }
+
+                       }
+
+               } else
+                       alert("You need to select at least one message.");
+       } else {
+               alert("Please check your SPAM reporting options.");
+       }
+
+}
+
+
+function dspamReportHam(event) {
+
+       var validDspamConfig = true;
+       var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+       try {
+               var hamaction = pref.getIntPref("dspam.hamaction");
+       } catch(e) {
+               hamaction = 0;
+       }
+
+       try {
+               var hamaddress = pref.getCharPref("dspam.hamaddress");
+       } catch(e) {
+               validDspamConfig = false;
+       }
+
+       if (hamaction != 0) {
+               try {
+                       var hamfolder = RDF.GetResource(pref.getCharPref("dspam.hamfolder")).QueryInterface(Components.interfaces.nsIMsgFolder);
+               } catch (e) {
+                       validDspamConfig = false;
+               }
+               try {
+                       var spamfolder = RDF.GetResource(pref.getCharPref("dspam.spamfolder")).QueryInterface(Components.interfaces.nsIMsgFolder);
+               } catch (e) {
+                       validDspamConfig = false;
+               }
+       }
+
+
+       var folder = GetLoadedMsgFolder();
+       var messageArray = GetSelectedMessages();
+       var server;
+       server = folder.server;
+
+       var dbv = GetDBView();
+
+       if (validDspamConfig == true) {
+
+               var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
+
+               var count = 0;
+
+               if (messageArray && messageArray.length > 0) {
+                       for (var i = 0; i < messageArray.length; ++i) {
+                               var messageService = messenger.messageServiceFromURI(messageArray[i]);
+                               var messageStream = Components.classes["@mozilla.org/network/sync-stream-listener;1"].createInstance().QueryInterface(Components.interfaces.nsIInputStream);
+                               var inputStream = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance().QueryInterface(Components.interfaces.nsIScriptableInputStream);
+                               inputStream.init(messageStream);
+                               try {
+                                       messageService.streamMessage(messageArray[i],messageStream, msgWindow, null, false, null);
+                               } catch (ex) {
+                                       alert("Unknown Error.");
+                               }
+
+                       }
+               }
+
+               msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
+
+               messenger.SetWindow(window, msgWindow);
+
+               if (messageArray && messageArray.length > 0) {
+                       for (var i = 0; i < messageArray.length; ++i) {
+                               var messageUri = messageArray[i];
+                               var hdr = messenger.msgHdrFromURI(messageUri);
+                               folder = hdr.folder;
+                               if (folder) {
+                                       server = folder.server;
+                               }
+       
+                               var accountKey = hdr.accountKey;
+                               if (accountKey.length > 0) {
+                                       var account = accountManager.getAccount(accountKey);
+                                       if (account)
+                                               server = account.incomingServer;
+                               }
+                               if (server) {
+                                       try {
+                                               msgComposeService.forwardMessage(hamaddress, hdr, msgWindow, server);
+                                       } catch(e) {
+                                               alert("la la la.");
+                                       }
+
+                                       if ((spamfolder != hamfolder) && (hamaction == 1))
+                                               try {
+                                                       dbv.doCommandWithFolder(nsMsgViewCommandType.moveMessages, hamfolder);
+                                               } catch(e) {
+                                                       alert("Error while moving message to Ham Folder.");
+                                               }
+
+                               } else {
+                                       alert("Unknown Error.");
+                               }
+       
+                       }
+               } else
+                       alert("You need to select at least one message.");
+       } else {
+               alert("Please check your HAM reporting options.");
+       }
+
+}
+
diff --git a/chrome/content/messenger.xul b/chrome/content/messenger.xul
new file mode 100644 (file)
index 0000000..e029fcc
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<?xml-stylesheet href="chrome://dspam/skin/dspam.css" type="text/css"?>
+<!DOCTYPE overlay SYSTEM "chrome://dspam/locale/dspam.dtd">
+
+<overlay id="dspamTbOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+       <script type="application/x-javascript" src="chrome://dspam/content/dspam.js"/>
+
+       <commandset id="mailCommands">
+               <command id="cmd_dspam_reportspam"
+            label="&dspam.spamreportbutton.label;"
+            tooltiptext="&dspam.spamreportbutton.tooltiptext;"
+            oncommand="dspamReportSpam();"/>
+               <command id="cmd_dspam_reportham"
+            label="&dspam.hamreportbutton.label;"
+            tooltiptext="&dspam.hamreportbutton.tooltiptext;"
+            oncommand="dspamReportHam();"/>
+       </commandset>
+       
+       <keyset id="mailKeys">
+               <key id="key_dspam_reportspam" modifiers="shift,alt,control,accel" keycode="VK_SCROLL_LOCK" command="cmd_dspam_reportspam"/>
+               <key id="key_dspam_reportham" modifiers="shift,alt,control,accel" keycode="VK_SCROLL_LOCK" command="cmd_dspam_reportham"/>
+       </keyset>
+       
+       <toolbarpalette id="MailToolbarPalette">
+       <toolbaritem id="toolbarbuttongroup">
+               <toolbarbutton class="toolbarbutton-1 dspamButtons" id="bReportSpam"
+                                                                               command="cmd_dspam_reportspam"/>
+               <toolbarbutton class="toolbarbutton-1 dspamButtons" id="bReportHam"
+                                                                               command="cmd_dspam_reportham"/>
+       </toolbaritem>
+       </toolbarpalette>
+       
+</overlay>
+
diff --git a/chrome/content/options.js b/chrome/content/options.js
new file mode 100644 (file)
index 0000000..05d11ba
--- /dev/null
@@ -0,0 +1,226 @@
+/* read and write options
+* to preferences
+*/
+
+var _elementIDs = ["spamaddress", "hamaddress", "spamaction", "hamaction", "PickFolder0", "PickFolder1", "spamfolder", "hamfolder"];
+       
+function init()
+{
+       var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+
+       // initialize the default window values...
+       for( var i = 0; i < _elementIDs.length; i++ )
+       {
+               var elementID = _elementIDs[i];
+               var element = document.getElementById(elementID);
+               if (!element) break;
+                       var eltType = element.localName;
+               try 
+               {
+                       if (eltType == "radiogroup")
+                               element.selectedIndex = pref.getIntPref(element.getAttribute("prefstring"));
+                       else if (eltType == "checkbox")
+                               element.checked = pref.getBoolPref(element.getAttribute("prefstring"));
+                       else if (eltType == "textbox")
+                               element.value = pref.getCharPref(element.getAttribute("prefstring")) ;
+                       else if (eltType == "menulist")
+                               SetFolderPicker(pref.getComplexValue(element.getAttribute("prefstring"), Components.interfaces.nsISupportsString).data, elementID);
+               } catch (ex) {
+                       if (eltType == "radiogroup")
+                               element.selectedIndex = 0;
+               }
+       }
+
+}
+
+function savePrefs()
+{
+       var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+       var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
+
+       for( var i = 0; i < _elementIDs.length; i++ )
+       {
+               var elementID = _elementIDs[i];
+
+               var element = document.getElementById(elementID);
+               if (!element) break;
+                       var eltType = element.localName;
+
+               if (eltType == "radiogroup")
+                       pref.setIntPref(element.getAttribute("prefstring"), element.selectedIndex);
+               else if (eltType == "checkbox")
+                       pref.setBoolPref(element.getAttribute("prefstring"), element.checked);
+               else if (eltType == "textbox" && element.preftype == "int")
+                       pref.setIntPref(element.getAttribute("prefstring"), parseInt(element.value) );
+               else if (eltType == "textbox")
+                       pref.setCharPref(element.getAttribute("prefstring"), element.value );
+               else if (eltType == "menulist")
+                       if ((elementID == "PickFolder0") || (elementID == "PickFolder1")) {
+                               var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
+                               str.data = element.getAttribute("uri");
+                               pref.setComplexValue(element.getAttribute("prefstring"), Components.interfaces.nsISupportsString, str);
+                       }
+       }
+}
+
+
+function setFolderPicker(val,pickerID,targetID,selection) {
+
+       try {
+               var picker = document.getElementById(pickerID);
+       } catch(e) {}
+
+       var uri = val;
+       if (selection) {
+               var pn = selection.parentNode;
+               while (pn.id.indexOf('PickFolde') < 0) {
+                       pn = pn.parentNode;
+               }
+               if (pn.id.indexOf('PickFolde') > -1) {
+                       var picker = pn;
+               }
+               uri = selection.getAttribute('id');
+               val = selection.getAttribute('value');
+               if (uri == '' && val == '') return;
+       }
+       var msgfolder = GetMsgFolderFromUri(uri, true);
+       if (msgfolder == null) {
+               if (val == QMglobals.bundle.getString("treeItemNone") ) uri = '';
+       } else {
+               val = document.getElementById("bundle_messenger").getFormattedString("verboseFolderFormat", [msgfolder.name, msgfolder.server.prettyName]);
+       }        
+       try {
+               picker.setAttribute("label",val);
+               picker.setAttribute("uri",uri);
+       } catch(e) {}
+}
+
+/*
+        function savePrefsnction() {
+               var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
+               for( var i = 0; i < QMglobals.items; i++ ) {
+                var elementID = 'PickFolder' + i;
+                var element = document.getElementById(elementID);
+                var uri = element.getAttribute("uri")
+                if (!element) break;
+                pref.setCharPref('quickmove.qf' + i, uri);
+                var element = document.getElementById("qmMR" + i);
+                if (!element) break;
+                pref.setBoolPref("quickmove.markread" + i, element.checked);
+               }
+               for( var i = 1; i < 11; i++ ) {
+                var element = document.getElementById('gl' + i);
+                pref.setCharPref('quickmove.label.group' + i, element.value);
+               }
+            pref.setBoolPref(QMglobals.bundle.getString("debugpref"), document.getElementById("QMdebug").checked);
+            var obSvc = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
+            obSvc.notifyObservers(null, "update_QMsettings", null);
+        },  
+*/
+
+
+
+
+    function setBox(myId, myValue) {
+      document.getElementById(myId).setAttribute("disabled", !myValue);
+    }
+
+    function getBox(myId) {
+      return document.getElementById(myId).getAttribute("focused")
+    }
+
+    function updateCheckSpam() {
+//      setBox("startupLabel", getBox("spammove"));
+      setBox("PickFolder0", getBox("spammove"));
+    }
+
+    function updateCheckHam() {
+//      setBox("startupLabel", getBox("spammove"));
+      setBox("PickFolder1", getBox("hammove"));
+    }
+
+    function doDefault() {
+      var selected = theListbox.selectedIndex;
+      if (selected < 0) {
+        alert(alerts.getString("dspam.options.errordefault"));
+      } else {
+        var defaultLabel = document.getElementById("defaultServerLabel");
+        var newDefault = theListbox.getItemAtIndex(selected);
+        theListbox.insertItemAt(0, defaultLabel.getAttribute("value"), defaultAccount);
+        defaultLabel.setAttribute("value", newDefault.getAttribute("label"));
+        defaultAccount = newDefault.getAttribute("value");
+        theListbox.removeItemAt(selected+1);
+        theListbox.ensureIndexIsVisible(0);
+        theListbox.selectedIndex = 0;
+      }
+    }
+
+    function doUp() {
+      var selected = theListbox.selectedIndex;
+      if (selected < 0) {
+        alert(alerts.getString("dspam.options.errormoveup"));
+        return;
+      } else if (selected > 0) {
+        var moveMe = theListbox.removeItemAt(selected-1);
+        if (moveMe) {
+          if(selected >= theListbox.getRowCount()) {
+            theListbox.appendItem(moveMe.getAttribute("label"), moveMe.getAttribute("value"));
+          } else {
+            theListbox.insertItemAt(selected, moveMe.getAttribute("label"), moveMe.getAttribute("value"));
+          }
+          if(selected-2 >= 0)
+            theListbox.ensureIndexIsVisible(selected-2);
+          theListbox.ensureIndexIsVisible(selected);
+        }
+      }
+    }
+
+    function doDown() {
+      var selected = theListbox.selectedIndex;
+      if (selected < 0) {
+        alert(alerts.getString("dspam.options.errormovedown"));
+        return;
+      } else if (selected < theListbox.getRowCount()-1) {
+        var moveMe = theListbox.removeItemAt(selected+1);
+        if (moveMe) {
+          theListbox.insertItemAt(selected, moveMe.getAttribute("label"), moveMe.getAttribute("value"));
+          if(selected+2 < theListbox.getRowCount())
+            theListbox.ensureIndexIsVisible(selected+2);
+          theListbox.ensureIndexIsVisible(selected+1);
+        }
+      }
+    }
+
+    function openURL(aURL) {
+      var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI);
+      uri.spec = aURL;
+      var protocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"].getService(Components.interfaces.nsIExternalProtocolService);
+      protocolSvc.loadUrl(uri);
+    }
+
+function chuonthisInitPrefs(branch) {
+  return Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch(branch);
+}
+
+function chuonthisGetPrefString(prefs, prefname) {
+  try {
+    return prefs.getComplexValue(prefname, Components.interfaces.nsISupportsString).data;
+  } catch (ex) {
+    return "";
+  }
+}
+
+function chuonthisSetPrefString(prefs, prefname, prefvalue) {
+  var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
+  str.data = prefvalue;
+  prefs.setComplexValue(prefname, Components.interfaces.nsISupportsString, str);
+}
+
+function chuonthisGetPrefBool(prefs, prefname, defvalue) {
+  try {
+    return prefs.getBoolPref(prefname);
+  } catch (ex) {
+    return defvalue;
+  }
+}
diff --git a/chrome/content/options.xul b/chrome/content/options.xul
new file mode 100644 (file)
index 0000000..96e7cd8
--- /dev/null
@@ -0,0 +1,240 @@
+<?xml version="1.0"?> 
+<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
+<?xml-stylesheet href="chrome://dspam/skin/dspam.css" type="text/css"?>
+<?xul-overlay href="chrome://messenger/content/msgFolderPickerOverlay.xul"?>
+<!-- <!DOCTYPE dialog SYSTEM "chrome://dspam/locale/dspam.dtd"> -->
+
+<!DOCTYPE dialog [
+<!ENTITY % dspamDTD SYSTEM "chrome://dspam/locale/dspam.dtd" >
+%dspamDTD;
+<!ENTITY % folderpickerDTD SYSTEM "chrome://messenger/locale/msgFolderPickerOverlay.dtd" >
+%folderpickerDTD;
+]>
+
+<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+        xmlns:nc="http://home.netscape.com/NC-rdf#"
+               xmlns:ncll="http://home.netscape.com/NC-rdf#"
+        onload="init();"
+        buttons="accept,cancel"
+        ondialogaccept="savePrefs();"
+        persist="screenX screenY"
+        title="DSPAM Extension for Thunderbird">
+
+  <stringbundleset id="stringbundleset">
+    <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
+    <stringbundle id="fptAlerts" src="chrome://dspam/locale/dspam.properties"/>
+  </stringbundleset>
+
+  <script type="application/x-javascript" src="chrome://dspam/content/options.js"/>
+  <script type="application/x-javascript" src="chrome://messenger/content/widgetglue.js"/>
+  <script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
+                 
+
+  <tabbox flex="1" style="margin:5px">
+    <tabs id="prefTabBox">
+<!--      <tab id="generalTab"  label="&dspam.options.gentab.label;"/> -->
+      <tab id="forwardTab"  label="&dspam.options.forwardtab.label;"/>
+<!--      <tab id="webui"  label="&dspam.options.webuitab.label;" disabled="true"/> -->
+      <tab id="actionTab"  label="&dspam.options.actiontab.label;"/>
+    </tabs>
+<tabpanels flex="1">
+
+<!-- General Options -->
+<!-- <vbox id="generalTab" flex="1">
+  <groupbox id="general-box" >
+       <caption label="General Options" />
+    <label control="method" value="&dspam.options.methodLabel;"/>
+      <radiogroup id="method" prefstring="dspam.method">
+        <radio id="forward" selected="true" label="&dspam.options.methodForward;"/>
+        <radio id="web" label="&dspam.options.methodWebUI;" disabled="true"/>
+      </radiogroup>
+  </groupbox>
+</vbox>
+-->
+<!-- Forwarding Report Options -->
+<vbox id="forwardTab" flex="1">
+  <groupbox id="forward-box" >
+    <caption label="Forward Report Options" />
+    <label control="spamaddress" value="&dspam.options.spamaddressLabel;"/>
+      <textbox id="spamaddress" value="" prefstring="dspam.spamaddress" tooltiptext="&dspam.options.spamaddresstooltip;" />
+    <label control="hamaddress" value="&dspam.options.hamaddressLabel;"/>
+      <textbox id="hamaddress" value="" prefstring="dspam.hamaddress" tooltiptext="&dspam.options.hamaddresstooltip;" />
+  </groupbox>
+</vbox>
+
+<!-- WebUI Report Options -->
+<!-- <vbox id="webuiTab" flex="1">
+  <groupbox id="webui-box" >
+    <caption label="WebUI Report Options" />
+    <label control="webuiurl" value="&dspam.options.webuiurlLabel;"/>
+      <textbox id="webuiurl" value="" prefstring="dspam.webuiurl" tooltiptext="&dspam.options.webuiurltooltip;" />
+    <label control="webuiuser" value="&dspam.options.webuiuserLabel;"/>
+      <textbox id="webuiuser" value="" prefstring="dspam.webuiuser" tooltiptext="&dspam.options.webuiusertooltip;" />
+    <label control="webuipass" value="&dspam.options.webuipassLabel;"/>
+      <textbox id="webuiupass" type="password" value="" prefstring="dspam.webuipass" tooltiptext="&dspam.options.webuipasstooltip;" />
+       <checkbox id="rememberwebuipass"
+         preftype="bool"
+         prefstring="dspam.rememberwebuipass"
+         label="&dspam.options.rememberwebuipass;"
+         tooltiptext="&dspam.options.rememberwebuipass;" />
+  </groupbox>
+</vbox> -->
+
+<!-- Post Report Action -->
+<vbox id="actionTab" flex="1">
+  <groupbox id="spamreport-box" >
+       <caption label="&dspam.options.spamactionLabel;" />
+      <radiogroup id="spamaction" prefstring="dspam.spamaction">
+        <radio id="spamleave" label="&dspam.options.spamactionLeave;" oncommand="updateCheckSpam();"/>
+        <radio id="spamdelete" label="&dspam.options.spamactionDelete;" oncommand="updateCheckSpam();"/>
+         <row>
+               <radio id="spammove" label="&dspam.options.selectspamfolder;" oncommand="updateCheckSpam();"/>
+                        <menulist id="PickFolder0" flex="1" prefstring="dspam.spamfolder"
+                            oncommand="setFolderPicker('1','PickFolder','',event.target);"
+                            sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
+                            sortDirection="ascending"
+                            context="folderPaneContext"
+                            datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
+                            class="folderMenuItem menu-iconic"
+                            ref="msgaccounts:/">
+                            <template>
+                                    <rule ncll:CanFileMessagesOnServer="false">
+                                        <!-- don't show servers (nntp & any others) which does not allow message filing -->
+                                    </rule>
+                                    <rule ncll:CanFileMessages="false" iscontainer="true" isempty="false" >
+                                        <!-- don't allow folders which does not allow message filing to be picked, show them tho-->
+                                        <menupopup>
+                                            <menu uri="..." 
+                                                class="folderMenuItem menu-iconic"
+                                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
+                                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
+                                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
+                                                IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
+                                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
+                                                label="rdf:http://home.netscape.com/NC-rdf#FolderTreeName">
+                                                <menupopup class="folderMenuItem menu-iconic"/>
+                                            </menu>
+                                        </menupopup>
+                                    </rule>
+                                    <rule ncll:CanFileMessages="true" iscontainer="true" isempty="false" >
+                                        <!-- show folders that allow message filing and allow them to be picked-->
+                                        <menupopup>
+                                            <menu uri="..." 
+                                                class="folderMenuItem menu-iconic"
+                                                oncommand="setFolderPicker('2','PickFolder','',event.target);"
+                                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
+                                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
+                                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
+                                                IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
+                                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
+                                                label="rdf:http://home.netscape.com/NC-rdf#FolderTreeName">
+                                                <menupopup class="folderMenuItem menu-iconic">
+                                                    <menuitem label="&dspam.options.selectspamfolder.label;" 
+                                                        oncommand="setFolderPicker('3','PickFolder','',event.target.parentNode.parentNode);"/>
+                                                    <menuseparator/>
+                                                </menupopup>
+                                                <menupopup class="folderMenuItem menu-iconic"/>
+                                            </menu>
+                                        </menupopup>
+                                    </rule>
+                                    <rule ncll:CanFileMessages="true">
+                                        <!-- show all folders that can do message filing that did not fit the rules above-->
+                                        <menupopup>
+                                            <menuitem uri="..." value="..."  
+                                                class="folderMenuItem menuitem-iconic"
+                                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
+                                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
+                                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
+                                                IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
+                                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
+                                                label="rdf:http://home.netscape.com/NC-rdf#Name"/>
+                                        </menupopup>
+                                    </rule>
+                            </template>
+                        </menulist>
+         </row>
+      </radiogroup>
+  </groupbox>
+
+  <groupbox id="hamreport-box" >
+       <caption label="&dspam.options.hamactionLabel;" />
+      <radiogroup id="hamaction" prefstring="dspam.hamaction">
+        <radio id="hamleave" label="&dspam.options.hamactionLeave;" oncommand="updateCheckHam();"/>
+         <row>
+               <radio id="hammove" label="&dspam.options.selecthamfolder;" oncommand="updateCheckHam();"/>
+                        <menulist id="PickFolder1" flex="1" prefstring="dspam.hamfolder"
+                            oncommand="setFolderPicker('1','PickFolder','',event.target);"
+                            sortResource="http://home.netscape.com/NC-rdf#FolderTreeName"
+                            sortDirection="ascending"
+                            context="folderPaneContext"
+                            datasources="rdf:msgaccountmanager rdf:mailnewsfolders"
+                            class="folderMenuItem menu-iconic"
+                            ref="msgaccounts:/">
+                            <template>
+                                    <rule ncll:CanFileMessagesOnServer="false">
+                                        <!-- don't show servers (nntp & any others) which does not allow message filing -->
+                                    </rule>
+                                    <rule ncll:CanFileMessages="false" iscontainer="true" isempty="false" >
+                                        <!-- don't allow folders which does not allow message filing to be picked, show them tho-->
+                                        <menupopup>
+                                            <menu uri="..." 
+                                                class="folderMenuItem menu-iconic"
+                                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
+                                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
+                                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
+                                                IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
+                                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
+                                                label="rdf:http://home.netscape.com/NC-rdf#FolderTreeName">
+                                                <menupopup class="folderMenuItem menu-iconic"/>
+                                            </menu>
+                                        </menupopup>
+                                    </rule>
+                                    <rule ncll:CanFileMessages="true" iscontainer="true" isempty="false" >
+                                        <!-- show folders that allow message filing and allow them to be picked-->
+                                        <menupopup>
+                                            <menu uri="..." 
+                                                class="folderMenuItem menu-iconic"
+                                                oncommand="setFolderPicker('2','PickFolder','',event.target);"
+                                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
+                                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
+                                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
+                                                IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
+                                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
+                                                label="rdf:http://home.netscape.com/NC-rdf#FolderTreeName">
+                                                <menupopup class="folderMenuItem menu-iconic">
+                                                    <menuitem label="&dspam.options.selectspamfolder.label;" 
+                                                        oncommand="setFolderPicker('3','PickFolder','',event.target.parentNode.parentNode);"/>
+                                                    <menuseparator/>
+                                                </menupopup>
+                                                <menupopup class="folderMenuItem menu-iconic"/>
+                                            </menu>
+                                        </menupopup>
+                                    </rule>
+                                    <rule ncll:CanFileMessages="true">
+                                        <!-- show all folders that can do message filing that did not fit the rules above-->
+                                        <menupopup>
+                                            <menuitem uri="..." value="..."  
+                                                class="folderMenuItem menuitem-iconic"
+                                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
+                                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
+                                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
+                                                IsSecure="rdf:http://home.netscape.com/NC-rdf#IsSecure"
+                                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"
+                                                label="rdf:http://home.netscape.com/NC-rdf#Name"/>
+                                        </menupopup>
+                                    </rule>
+                            </template>
+                        </menulist>
+         </row>
+      </radiogroup>
+  </groupbox>
+ </vbox>
+
+    </tabpanels>
+<hbox>
+  <image id="options_img"/>
+</hbox>
+
+  </tabbox>
+</dialog>
+
diff --git a/chrome/content/toolbar.xul b/chrome/content/toolbar.xul
new file mode 100644 (file)
index 0000000..00a0c7d
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+
+<?xml-stylesheet href="chrome://dspam/skin/dspam.css" type="text/css"?>
+
+<overlay id="buttonsToolbarTbOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+</overlay>
diff --git a/chrome/dspam.jar b/chrome/dspam.jar
new file mode 100644 (file)
index 0000000..6b39161
Binary files /dev/null and b/chrome/dspam.jar differ
diff --git a/chrome/locale/en-US/contents.rdf b/chrome/locale/en-US/contents.rdf
new file mode 100644 (file)
index 0000000..4411715
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+         xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+  <!-- list all the skins being supplied by this package -->
+  <RDF:Seq about="urn:mozilla:locale:root">
+    <RDF:li resource="urn:mozilla:locale:en-US"/>
+  </RDF:Seq>
+
+  <!-- locale information -->
+  <RDF:Description about="urn:mozilla:locale:en-US">
+    <chrome:packages>
+      <RDF:Seq about="urn:mozilla:locale:en-US:packages">
+        <RDF:li resource="urn:mozilla:locale:en-US:dspam"/>
+      </RDF:Seq>
+    </chrome:packages>
+  </RDF:Description>
+</RDF:RDF>
diff --git a/chrome/locale/en-US/dspam.dtd b/chrome/locale/en-US/dspam.dtd
new file mode 100644 (file)
index 0000000..f5aa225
--- /dev/null
@@ -0,0 +1,44 @@
+<!ENTITY dspam.options.selectspamfolder "Move to Folder:">
+<!ENTITY dspam.options.selectspamfolder.label "Select this folder">
+<!ENTITY dspam.options.selectspamfolder.accesskey  "f">
+<!ENTITY dspam.options.selecthamfolder "Move to Folder:">
+<!ENTITY dspam.options.selecthamfolder.label "Select this folder">
+<!ENTITY dspam.options.selecthamfolder.accesskey  "f">
+<!ENTITY dspam.spamreportbutton.label "Spam">
+<!ENTITY dspam.spamreportbutton.tooltiptext "Report the selected messages as SPAM">
+<!ENTITY dspam.hamreportbutton.label "Not Spam">
+<!ENTITY dspam.hamreportbutton.tooltiptext "Report the selected messages as SPAM">
+<!ENTITY dspam.options.spamaddresstooltip "Your SPAM report address">
+<!ENTITY dspam.options.hamaddresstooltip "Your HAM report address">
+<!ENTITY dspam.options.quickspamcop "Enable Quick SpamCop">
+<!ENTITY dspam.options.quickspamcoptooltip "Check to enable quick reporting to Spamcop">
+<!ENTITY dspam.options.spamaddressLabel "Your SPAM report address:">
+<!ENTITY dspam.options.hamaddressLabel "Your HAM report address:">
+<!ENTITY dspam.options.webuiurlLabel "WebUI URL:">
+<!ENTITY dspam.options.webuiurltooltip "Enter the WebUI link for message retraining">
+<!ENTITY dspam.options.webuiuserLabel "WebUI Username:">
+<!ENTITY dspam.options.webuiusertooltip "Enter your WebUI access username">
+<!ENTITY dspam.options.webuipassLabel "WebUI Password:">
+<!ENTITY dspam.options.webuipasstooltip "Enter your WebUI access password">
+<!ENTITY dspam.options.rememberwebuipass "Remember WebUI Password">
+<!ENTITY dspam.options.rememberwebuipasstooltip "Check to retain WebUI access password">
+<!ENTITY dspam.options.spamactionLabel "After reporting SPAM:">
+<!ENTITY dspam.options.spamactionLeave "Leave Message">
+<!ENTITY dspam.options.spamactionDelete "Delete Message">
+<!ENTITY dspam.options.spamfoldertooltip "After reporting, move messages to folder">
+<!ENTITY dspam.options.hamactionLabel "After reporting HAM:">
+<!ENTITY dspam.options.hamactionLeave "Leave Message">
+<!ENTITY dspam.options.hamfoldertooltip "After reporting, move messages to folder">
+<!ENTITY dspam.options.browsebutton "Browse...">
+<!ENTITY dspam.options.methodLabel "Report messages using:">
+<!ENTITY dspam.options.methodForward "Message forwarding">
+<!ENTITY dspam.options.methodWebUI "DSPAM WebUI">
+<!ENTITY dspam.options.gentab.label "General">
+<!ENTITY dspam.options.gentab.tooltip "General configuration options">
+<!ENTITY dspam.options.forwardtab.label "Forwarding">
+<!ENTITY dspam.options.forwardtab.tooltip "Forward reporting configuration options">
+<!ENTITY dspam.options.webuitab.label "WebUI">
+<!ENTITY dspam.options.webuitab.tooltip "WebUI reporting configuration options">
+<!ENTITY dspam.options.actiontab.label "Actions">
+<!ENTITY dspam.options.actiontab.tooltip "Actions to perform after reporting">
+<!ENTITY dspam. "">
diff --git a/chrome/locale/en-US/dspam.properties b/chrome/locale/en-US/dspam.properties
new file mode 100644 (file)
index 0000000..72b2327
--- /dev/null
@@ -0,0 +1,37 @@
+#   LOCALIZATION NOTE :\r
+#   do not localize "\n".  use "\n" to make the text fit nicely in the dialog.\r
+\r
+treeItemNone = None\r
+\r
+#\r
+# Failure Messages\r
+#\r
+\r
+#\r
+# Console Messages\r
+#\r
+\r
+#\r
+# Status Messages\r
+#\r
+\r
+#\r
+# Confirms and alerts\r
+#\r
+\r
+#\r
+# Pref Strings\r
+#\r
+\r
+dspam.options.changealert = The changes made will take effect the next time Thunderbird is started.\r
+dspam.options.errordefault = Please select an account to set as default.\r
+dspam.options.errormoveup = Please select an account to move up.\r
+dspam.options.errormovedown = Please select an account to move down.\r
+dspam.options.errormovetrash = Error while moving message to Trash Folder.
+dspam.options.errorgettrashsettings = Could not get Trash folder settings.\nMessage was not moved.
+dspam.options.errormovespam = Error while moving message to Spam Folder.
+dspam.options.errormoveham = Error while moving message to Ham Folder.
+dspam.options.unknownerror = Unknown Error.
+dspam.options.checkspamsettings = Please check your SPAM reporting options.
+dspam.options.checkhamsettings = Please check your HAM reporting options.
+dspam.options.nomessage = You need to select at least one message.
diff --git a/chrome/locale/pt-PT/contents.rdf b/chrome/locale/pt-PT/contents.rdf
new file mode 100644 (file)
index 0000000..ec8840d
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+         xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+  <!-- list all the skins being supplied by this package -->
+  <RDF:Seq about="urn:mozilla:locale:root">
+    <RDF:li resource="urn:mozilla:locale:pt-PT"/>
+  </RDF:Seq>
+
+  <!-- locale information -->
+  <RDF:Description about="urn:mozilla:locale:pt-PT">
+    <chrome:packages>
+      <RDF:Seq about="urn:mozilla:locale:pt-PT:packages">
+        <RDF:li resource="urn:mozilla:locale:pt-PT:dspam"/>
+      </RDF:Seq>
+    </chrome:packages>
+  </RDF:Description>
+</RDF:RDF>
diff --git a/chrome/locale/pt-PT/dspam.dtd b/chrome/locale/pt-PT/dspam.dtd
new file mode 100644 (file)
index 0000000..d392f36
--- /dev/null
@@ -0,0 +1,42 @@
+<!ENTITY dspam.options.selectspamfolder "Mover para a pasta:">
+<!ENTITY dspam.options.selectspamfolder.label "Selecionar pasta">
+<!ENTITY dspam.options.selectspamfolder.accesskey  "f">
+<!ENTITY dspam.options.selecthamfolder "Mover para a pasta::">
+<!ENTITY dspam.options.selecthamfolder.label "Selecionar pasta">
+<!ENTITY dspam.options.selecthamfolder.accesskey  "f">
+<!ENTITY dspam.spamreportbutton.label "Spam">
+<!ENTITY dspam.spamreportbutton.tooltiptext "Submeter as mensagens seleccionadas como sendo SPAM">
+<!ENTITY dspam.hamreportbutton.label "Não Spam">
+<!ENTITY dspam.hamreportbutton.tooltiptext "Submeter as mensagens seleccionadas como não sendo SPAM">
+<!ENTITY dspam.options.spamaddresstooltip "Endereço para submissão de SPAM">
+<!ENTITY dspam.options.hamaddresstooltip "Endereço para submissão de NÃO SPAM">
+<!ENTITY dspam.options.spamaddressLabel "Endereço para SPAM:">
+<!ENTITY dspam.options.hamaddressLabel "Endereço para NÃO SPAM:">
+<!ENTITY dspam.options.webuiurlLabel "Endereço WebUI:">
+<!ENTITY dspam.options.webuiurltooltip "Introduza o endereço do WebUIl para retreinamento de mensagens">
+<!ENTITY dspam.options.webuiuserLabel "Indetificador do WebUI:">
+<!ENTITY dspam.options.webuiusertooltip "Introduza o seu identificador de acesso ao WebUI">
+<!ENTITY dspam.options.webuipassLabel "Senha do WebUI:">
+<!ENTITY dspam.options.webuipasstooltip "Introduza a sua password de acesso ao WebUI">
+<!ENTITY dspam.options.rememberwebuipass "Memorizar Password">
+<!ENTITY dspam.options.rememberwebuipasstooltip "Seleccionar para memorizar a password de ascesso ao WebUI">
+<!ENTITY dspam.options.spamactionLabel "Depois de submeter SPAM:">
+<!ENTITY dspam.options.spamactionLeave "Fazer nada">
+<!ENTITY dspam.options.spamactionDelete "Apagar mensagem">
+<!ENTITY dspam.options.spamfoldertooltip "Depois de submeter como SPAM, mover messagens para a pasta">
+<!ENTITY dspam.options.hamactionLabel "Depois de submeter SPAM:">
+<!ENTITY dspam.options.hamactionLeave "Fazer nada">
+<!ENTITY dspam.options.hamfoldertooltip "Depois de submeter como NÃO SPAM, mover messagens para a pasta">
+<!ENTITY dspam.options.browsebutton "Procurar...">
+<!ENTITY dspam.options.methodLabel "Submeter as mensagens usando:">
+<!ENTITY dspam.options.methodForward "Reencaminhamento de mensagens">
+<!ENTITY dspam.options.methodWebUI "DSPAM WebUI">
+<!ENTITY dspam.options.gentab.label "Geral">
+<!ENTITY dspam.options.gentab.tooltip "Configurações Gerais">
+<!ENTITY dspam.options.forwardtab.label "Reencaminhamento">
+<!ENTITY dspam.options.forwardtab.tooltip "Configurações para a submissão via reencaminhamento de mensagens">
+<!ENTITY dspam.options.webuitab.label "WebUI">
+<!ENTITY dspam.options.webuitab.tooltip "Configurações para a submissão  via WebUI">
+<!ENTITY dspam.options.actiontab.label "Acções">
+<!ENTITY dspam.options.actiontab.tooltip "Acções a tomar após a submissão">
+<!ENTITY dspam. "">
diff --git a/chrome/locale/pt-PT/dspam.properties b/chrome/locale/pt-PT/dspam.properties
new file mode 100644 (file)
index 0000000..3bf83e3
--- /dev/null
@@ -0,0 +1,37 @@
+#   LOCALIZATION NOTE :\r
+#   do not localize "\n".  use "\n" to make the text fit nicely in the dialog.\r
+\r
+treeItemNone = None\r
+\r
+#\r
+# Failure Messages\r
+#\r
+\r
+#\r
+# Console Messages\r
+#\r
+\r
+#\r
+# Status Messages\r
+#\r
+\r
+#\r
+# Confirms and alerts\r
+#\r
+\r
+#\r
+# Pref Strings\r
+#\r
+\r
+dspam.options.changealert = As alterações só estarão disponíveis na próxima vez que utilizar o Thunderbird.\r
+dspam.options.errordefault = Seleccione a conta a que deseja associar a extensão.\r
+dspam.options.errormoveup = Seleccione uma conta para mover para cima.\r
+dspam.options.errormovedown = Seleccione uma conta para mover para baixo.\r
+dspam.options.errormovetrash = Erro inesperado ao mover a mensagem para a pasta de Lixo.
+dspam.options.errorgettrashsettings = Não foi possível obter as configurações para para de Lixo.\nA mensagem não foi movida.
+dspam.options.errormovespam = Erro inesperado ao mover a mensagem para a pasta de SPAM.
+dspam.options.errormoveham = Erro inesperado ao mover a mensagem para a pasta de NÃO SPAM .
+dspam.options.unknownerror = Erro inesperado.
+dspam.options.checkspamsettings = Por favor verifique as suas opção para submissão de SPAM:
+dspam.options.checkhamsettings = Por favor verifique as suas opção para submissão de NÃO SPAM:
+dspam.options.nomessage = Precisa escolher pelo menos uma mensagem.
diff --git a/chrome/skin/button2.gif b/chrome/skin/button2.gif
new file mode 100644 (file)
index 0000000..6880559
Binary files /dev/null and b/chrome/skin/button2.gif differ
diff --git a/chrome/skin/contents.rdf b/chrome/skin/contents.rdf
new file mode 100644 (file)
index 0000000..cb352a9
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+         xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
+
+  <RDF:Seq about="urn:mozilla:skin:root">
+    <RDF:li resource="urn:mozilla:skin:classic/1.0"/>
+  </RDF:Seq>
+
+  <RDF:Description about="urn:mozilla:skin:classic/1.0">
+    <chrome:packages>
+      <RDF:Seq about="urn:mozilla:skin:classic/1.0:packages">
+        <RDF:li resource="urn:mozilla:skin:classic/1.0:dspam"/>
+      </RDF:Seq>
+    </chrome:packages>
+  </RDF:Description>
+
+</RDF:RDF>
diff --git a/chrome/skin/dspam-logo-eyes-small.gif b/chrome/skin/dspam-logo-eyes-small.gif
new file mode 100644 (file)
index 0000000..29cd255
Binary files /dev/null and b/chrome/skin/dspam-logo-eyes-small.gif differ
diff --git a/chrome/skin/dspam-logo-eyes-transp-small.png b/chrome/skin/dspam-logo-eyes-transp-small.png
new file mode 100644 (file)
index 0000000..e98949f
Binary files /dev/null and b/chrome/skin/dspam-logo-eyes-transp-small.png differ
diff --git a/chrome/skin/dspam-logo-eyes.gif b/chrome/skin/dspam-logo-eyes.gif
new file mode 100644 (file)
index 0000000..82f9e74
Binary files /dev/null and b/chrome/skin/dspam-logo-eyes.gif differ
diff --git a/chrome/skin/dspam-logo-small.gif b/chrome/skin/dspam-logo-small.gif
new file mode 100644 (file)
index 0000000..855a612
Binary files /dev/null and b/chrome/skin/dspam-logo-small.gif differ
diff --git a/chrome/skin/dspam-logo-text.gif b/chrome/skin/dspam-logo-text.gif
new file mode 100644 (file)
index 0000000..16efb2e
Binary files /dev/null and b/chrome/skin/dspam-logo-text.gif differ
diff --git a/chrome/skin/dspam-logo.gif b/chrome/skin/dspam-logo.gif
new file mode 100644 (file)
index 0000000..855a612
Binary files /dev/null and b/chrome/skin/dspam-logo.gif differ
diff --git a/chrome/skin/dspam.css b/chrome/skin/dspam.css
new file mode 100644 (file)
index 0000000..1d08d48
--- /dev/null
@@ -0,0 +1,36 @@
+.dspamButtons {
+  -moz-image-region: rect(0px 24px 24px 0px);
+}
+.dspamButtons:hover {
+  -moz-image-region: rect(24px 24px 48px 0px);
+}
+.dspamButtons[disabled] {
+  -moz-image-region: rect(48px 24px 72px 0px);
+}
+
+toolbar[iconsize="small"] .dspamButtons {
+  -moz-image-region: rect(0px 16px 16px 0px);
+}
+toolbar[iconsize="small"] .dspamButtons:hover {
+  -moz-image-region: rect(16px 16px 32px 0px);
+}
+toolbar[iconsize="small"] .dspamButtons[disabled] {
+  -moz-image-region: rect(32px 16px 48px 0px);
+}
+
+/* Report Spam */
+#bReportSpam{ list-style-image: url("chrome://dspam/skin/reportspam-large.png"); }
+toolbar[iconsize="small"] #bReportSpam{ list-style-image: url("chrome://dspam/skin/reportspam-small.png"); }
+
+/* Report Ham */
+#bReportHam{ list-style-image: url("chrome://dspam/skin/reportham-large.png"); }
+toolbar[iconsize="small"] #bReportHam{ list-style-image: url("chrome://dspam/skin/reportham-small.png"); }
+
+#options_img {
+   list-style-image: url("chrome://dspam/skin/dspam-logo.gif");
+       width: 150px;
+       height: 44px;
+       background-position: bottom right;
+       background-repeat: no-repeat;
+}
+
diff --git a/chrome/skin/report-spam-orig.png b/chrome/skin/report-spam-orig.png
new file mode 100644 (file)
index 0000000..6de6fe0
Binary files /dev/null and b/chrome/skin/report-spam-orig.png differ
diff --git a/chrome/skin/reportham-large.png b/chrome/skin/reportham-large.png
new file mode 100644 (file)
index 0000000..3713d88
Binary files /dev/null and b/chrome/skin/reportham-large.png differ
diff --git a/chrome/skin/reportham-small.png b/chrome/skin/reportham-small.png
new file mode 100644 (file)
index 0000000..f5fcf12
Binary files /dev/null and b/chrome/skin/reportham-small.png differ
diff --git a/chrome/skin/reportspam-large.png b/chrome/skin/reportspam-large.png
new file mode 100644 (file)
index 0000000..ce5d98a
Binary files /dev/null and b/chrome/skin/reportspam-large.png differ
diff --git a/chrome/skin/reportspam-small.png b/chrome/skin/reportspam-small.png
new file mode 100644 (file)
index 0000000..aeb775f
Binary files /dev/null and b/chrome/skin/reportspam-small.png differ
diff --git a/install.rdf b/install.rdf
new file mode 100644 (file)
index 0000000..a3f48f5
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0"?>
+
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+
+  <Description about="urn:mozilla:install-manifest">
+    <!-- Target Application this extension can install into, 
+        with minimum and maximum supported versions. --> 
+    <em:targetApplication>
+    <!--Thunderbird -->
+      <Description>
+        <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
+        <em:minVersion>2.0</em:minVersion>
+        <em:maxVersion>2.1</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+    
+    <!-- Front End MetaData -->
+    <em:id>{f56de514-f1ab-4209-8ad5-05a378d0b24b}</em:id>
+    <em:name>dspam</em:name>
+    <em:version>0.7</em:version>
+    <em:description>DSPAM Extension for Thunderbird</em:description>
+    <em:iconURL>chrome://dspam/skin/dspam-logo-eyes-small.gif</em:iconURL>
+    <em:creator>Hugo Monteiro</em:creator>
+               <em:optionsURL>chrome://dspam/content/options.xul</em:optionsURL>
+    <em:homepageURL>http://pessoa.fct.unl.pt/hmmm/files/mozext/dspam/</em:homepageURL>
+    <!-- Front End Integration Hooks (used by Extension Manager)-->
+    
+    <!-- Packages, Skins and Locales that this extension registers -->
+    <em:file>
+      <Description about="urn:mozilla:extension:file:dspam.jar">
+        <em:package>content/</em:package>
+        <em:skin>skin/</em:skin>
+        <em:locale>locale/en-US/</em:locale>
+               <em:locale>locale/pt-PT/</em:locale>
+      </Description>
+    </em:file>
+  </Description>      
+  
+</RDF>
diff --git a/license.txt b/license.txt
new file mode 100644 (file)
index 0000000..dd1c71d
--- /dev/null
@@ -0,0 +1,18 @@
+Version: MPL 1.1
+
+The contents of this file are subject to the Mozilla Public License Version 
+1.1 (the "License"); you may not use this file except in compliance with 
+the License. You may obtain a copy of the License at 
+http://www.mozilla.org/MPL/
+
+Software distributed under the License is distributed on an "AS IS" basis,
+WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+for the specific language governing rights and limitations under the
+License.
+
+This License does not grant any rights to use any trademarks, logos
+or graphics of Blue Security, including, but not limited to, the
+"Do Not Intrude Registry", the "Blue Frog" images and the "Blue
+Security" logo (collectively referred to as the "Unlicensed
+Trademarks and Graphics"), even if the Unlicensed Trademarks and
+Graphics are included in the Original Code or Modifications.
\ No newline at end of file