Skip to content

Commit

Permalink
Only 2 warnings left from the validator, thats fine by me. Time to su…
Browse files Browse the repository at this point in the history
…bmit to Mozilla
  • Loading branch information
Jonas authored and Jonas committed Feb 19, 2014
1 parent 3337c0d commit c0341cb
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion chrome/content/composeOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ function msSendMsg() {
* Format is x-stampprotocols: <algo1>/<max-supported-ver>/<min-cost>[/<other-params>][/<params>];<algo2>/<max-supported-ver>/<min-cost>[/<params>][/<other-params>]
*/
function getStampProtocolHeader(){
var mb = 'mbound:'+Services.prefs.getIntPref('extensions.ppost.mbound.maxver')+':'+Services.prefs.getIntPref('extensions.ppost.mbound.minvalue')+':'+Services.prefs.getIntPref('ppost.mbound.minpath')+':'+Services.prefs.getIntPref('ppost.mbound.maxpath');
var mb = 'mbound:'+Services.prefs.getIntPref('extensions.ppost.mbound.maxver')+':'+Services.prefs.getIntPref('extensions.ppost.mbound.minvalue')+':'+Services.prefs.getIntPref('extensions.ppost.mbound.minpath')+':'+Services.prefs.getIntPref('extensions.ppost.mbound.maxpath');
var hc = 'hashcash:'+Services.prefs.getIntPref('extensions.ppost.hashcash.maxver')+':'+Services.prefs.getIntPref('extensions.ppost.hashcash.minvalue');
var rv='';
var defalgo=Services.prefs.getCharPref('extensions.ppost.defalgo');
Expand Down
16 changes: 8 additions & 8 deletions chrome/content/messageWindowOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ function verifyStamp()
//Read all prefs
var hcminval=Services.prefs.getIntPref('extensions.ppost.hashcash.minvalue');
var mbminval=Services.prefs.getIntPref('extensions.ppost.mbound.minvalue');
var minpath=Services.prefs.getIntPref('ppost.mbound.minpath');
var maxpath=Services.prefs.getIntPref('ppost.mbound.maxpath');
var minpath=Services.prefs.getIntPref('extensions.ppost.mbound.minpath');
var maxpath=Services.prefs.getIntPref('extensions.ppost.mbound.maxpath');

var elmIcon=document.getElementById('ppostIcon');

Expand Down Expand Up @@ -160,7 +160,7 @@ function verifyStamp()
elmIcon.src="chrome://ppost/skin/wrpostage.png";
elmIcon.tooltipText = gStrBundle.getString("error_invalidtip");

var autojunk=Services.prefs.getBoolPref('ppost.automarkjunk');
var autojunk=Services.prefs.getBoolPref('extensions.ppost.automarkjunk');
//message is junk
if(!SelectedMessagesAreJunk() && autojunk){
JunkSelectedMessages(true);
Expand Down Expand Up @@ -263,8 +263,8 @@ function localVerify(sHeaderDate){
//check if stamp values match our preferences
var hcminval=Services.prefs.getIntPref('extensions.ppost.hashcash.minvalue');
var mbminval=Services.prefs.getIntPref('extensions.ppost.mbound.minvalue');
var minpath=Services.prefs.getIntPref('ppost.mbound.minpath');
var maxpath=Services.prefs.getIntPref('ppost.mbound.maxpath');
var minpath=Services.prefs.getIntPref('extensions.ppost.mbound.minpath');
var maxpath=Services.prefs.getIntPref('extensions.ppost.mbound.maxpath');

switch(gobStamp.iType){
case gStampTypes.HASHCASH:
Expand All @@ -283,7 +283,7 @@ function localVerify(sHeaderDate){
break;
}

var skipchkdate=Services.prefs.getBoolPref('ppost.skip_date_verification2');
var skipchkdate=Services.prefs.getBoolPref('extensions.ppost.skip_date_verification2');

if(!skipchkdate){

Expand Down Expand Up @@ -311,7 +311,7 @@ function localVerify(sHeaderDate){
localDt.setUTCMilliseconds(0);

//check if stamp is recent
if(Math.round(Math.abs(gobStamp.dtGen-localDt)/86400000)>Services.prefs.getIntPref('ppost.maxagedays')){
if(Math.round(Math.abs(gobStamp.dtGen-localDt)/86400000)>Services.prefs.getIntPref('extensions.ppost.maxagedays')){
gobStamp.bError=true;
gobStamp.sError = gStrBundle.getString("error_stale");
return true;
Expand Down Expand Up @@ -520,7 +520,7 @@ function updateStamp(){
if(gobStamp.bError){
elmIcon.src = "chrome://ppost/skin/wrpostage.png";
elmIcon.tooltipText=gobStamp.sError;
var autojunk=Services.prefs.getBoolPref('ppost.automarkjunk');
var autojunk=Services.prefs.getBoolPref('extensions.ppost.automarkjunk');
//message is junk as the stamp is invalid
if(!SelectedMessagesAreJunk() && autojunk){
JunkSelectedMessages(true);
Expand Down
4 changes: 2 additions & 2 deletions chrome/content/pennyPostOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function initDlg() {
dialog = new Object;

dialog.ppost = document.getElementById("extensions.ppost.path.box");
dialog.javapath = document.getElementById("ppost.javapath.box");
dialog.javapath = document.getElementById("extensions.ppost.javapath.box");
dialog.hc_enable = document.getElementById("extensions.ppost.hashcash.enable");
dialog.mb_enable = document.getElementById("extensions.ppost.mbound.enable");
dialog.def_algo = document.getElementById("extensions.ppost.defalgo");
Expand Down Expand Up @@ -146,7 +146,7 @@ function onBrowseJava(){
var rv=filePickerDlg.show();
if (rv == nsIFilePicker.returnOK || rv == nsIFilePicker.returnReplace) {
dialog.javapath.value=filePickerDlg.file.path;
prefs.setCharPref('ppost.javapath', dialog.javapath.value);
prefs.setCharPref('extensions.ppost.javapath', dialog.javapath.value);
}
}

Expand Down
52 changes: 26 additions & 26 deletions chrome/content/pennyPostOptions.xul
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
<preference id="mail.headerScroll.maxheight"
name="mail.headerScroll.maxheight" type="int">
</preference>
<preference id="ppost.maxagedays" name="ppost.maxagedays"
<preference id="extensions.ppost.maxagedays" name="extensions.ppost.maxagedays"
type="int">
</preference>
<preference id="ppost.skip_date_verification2"
name="ppost.skip_date_verification2" type="bool">
<preference id="extensions.ppost.skip_date_verification2"
name="extensions.ppost.skip_date_verification2" type="bool">
</preference>
<!-- <preference id="ppost.addheaderscroll"
name="ppost.addheaderscroll" type="bool">
Expand All @@ -52,8 +52,8 @@
<preference id="extensions.ppost.addsignature"
name="extensions.ppost.addsignature" type="bool">
</preference>
<preference id="ppost.automarkjunk"
name="ppost.automarkjunk" type="bool">
<preference id="extensions.ppost.automarkjunk"
name="extensions.ppost.automarkjunk" type="bool">
</preference>
</preferences>
<vbox>
Expand All @@ -79,7 +79,7 @@
</hbox>
<hbox align="center">
<label value="&ppost.opt.stamp_age_label;:"></label>
<menulist preference="ppost.maxagedays"
<menulist preference="extensions.ppost.maxagedays"
tooltiptext="&ppost.opt.stamp_age_tip;">
<menupopup>
<menuitem label="1" value="1"></menuitem>
Expand All @@ -91,15 +91,15 @@
</menulist>
</hbox>
<hbox align="center">
<checkbox id="ppost.automarkjunk"
preference="ppost.automarkjunk" label="&ppost.automarkjunk;"
<checkbox id="extensions.ppost.automarkjunk"
preference="extensions.ppost.automarkjunk" label="&ppost.automarkjunk;"
accesskey="&ppost.automarkjunk.key;"
tooltiptext="&ppost.automarkjunk.tip;">
</checkbox>
</hbox>
<hbox align="center">
<checkbox id="ppost.skip_date_verification2"
preference="ppost.skip_date_verification2"
<checkbox id="extensions.ppost.skip_date_verification2"
preference="extensions.ppost.skip_date_verification2"
label="&ppost.opt.skipdateveri;"
accesskey="&ppost.opt.skipdateveri.key;"
tooltiptext="&ppost.opt.skipdateveri.tip;">
Expand Down Expand Up @@ -199,10 +199,10 @@
<prefpane id="msExProgPaths" label="&ppost.opt.exprog;"
image="chrome://ppost/skin/exprog.png">
<preferences>
<preference id="ppost.usejavalaunch"
name="ppost.usejavalaunch" type="bool">
<preference id="extensions.ppost.usejavalaunch"
name="extensions.ppost.usejavalaunch" type="bool">
</preference>
<preference id="ppost.javapath" name="ppost.javapath"
<preference id="extensions.ppost.javapath" name="extensions.ppost.javapath"
type="string">
</preference>
<preference id="extensions.ppost.path" name="extensions.ppost.path"
Expand Down Expand Up @@ -234,15 +234,15 @@
</groupbox>
<groupbox>
<caption label="&ppost.exprog.javasetup;"></caption>
<checkbox id="ppost.usejavalaunch"
preference="ppost.usejavalaunch" label="&ppost.exprog.usejava;"
<checkbox id="extensions.ppost.usejavalaunch"
preference="extensions.ppost.usejavalaunch" label="&ppost.exprog.usejava;"
accesskey="&ppost.exprog.usejava.key;"
tooltiptext="&ppost.exprog.usejava.tip;">
</checkbox>
<label value="&ppost.exprog.javapath;"></label>
<hbox>
<textbox preference="ppost.javapath" flex="1"
id="ppost.javapath.box">
<textbox preference="extensions.ppost.javapath" flex="1"
id="extensions.ppost.javapath.box">
</textbox>
<button label="..." id="browseJava"
oncommand="onBrowseJava();">
Expand Down Expand Up @@ -338,17 +338,17 @@
<preference id="extensions.ppost.mbound.minvalue"
name="extensions.ppost.mbound.minvalue" type="int">
</preference>
<preference id="ppost.mbound.minpath"
name="ppost.mbound.minpath" type="int">
<preference id="extensions.ppost.mbound.minpath"
name="extensions.ppost.mbound.minpath" type="int">
</preference>
<preference id="ppost.mbound.maxpath"
name="ppost.mbound.maxpath" type="int">
<preference id="extensions.ppost.mbound.maxpath"
name="extensions.ppost.mbound.maxpath" type="int">
</preference>
<preference id="extensions.ppost.mbound.mintvalue"
name="extensions.ppost.mbound.mintvalue" type="int">
</preference>
<preference id="ppost.mbound.mintpath"
name="ppost.mbound.mintpath" type="int">
<preference id="extensions.ppost.mbound.mintpath"
name="extensions.ppost.mbound.mintpath" type="int">
</preference>
<preference id="extensions.ppost.mbound.mintver"
name="extensions.ppost.mbound.mintver" type="int">
Expand Down Expand Up @@ -386,7 +386,7 @@
value="&ppost.opt.mb.stampdepth; (&ppost.opt.mb.stampdepth.note;):">
</label>
<textbox size="4"
preference="ppost.mbound.mintpath">
preference="extensions.ppost.mbound.mintpath">
</textbox>
</hbox>
</groupbox>
Expand Down Expand Up @@ -415,15 +415,15 @@
<hbox align="center">
<label value="&ppost.opt.mb.stampmndepth;:"></label>
<textbox size="4"
preference="ppost.mbound.minpath"
preference="extensions.ppost.mbound.minpath"
tooltiptext="&ppost.opt.mb.stampmndepth.note;">
</textbox>
</hbox>
<spacer flex="1"></spacer>
<hbox align="center">
<label value="&ppost.opt.mb.stampmxdepth;:"></label>
<textbox size="4"
preference="ppost.mbound.maxpath"
preference="extensions.ppost.mbound.maxpath"
tooltiptext="&ppost.opt.mb.stampmxdepth.note;">
</textbox>
</hbox>
Expand Down
8 changes: 4 additions & 4 deletions chrome/content/ppost.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ function readFromProgram(pref, outputParams, handler)
{
try{
var javapath=null;
var path=pref.getCharPref('ppost.path');
var useJava=pref.getBoolPref('ppost.usejavalaunch');
var path=pref.getCharPref('extensions.ppost.path');
var useJava=pref.getBoolPref('extensions.ppost.usejavalaunch');
if(useJava){
if(path.length==0){
path=getJarPath();
pref.setCharPref('ppost.path',path);
pref.setCharPref('extensions.ppost.path',path);
}
javapath=pref.getCharPref('ppost.javapath');
javapath=pref.getCharPref('extensions.ppost.javapath');
}

if((useJava && javapath.length==0) || path.length==0){
Expand Down
2 changes: 1 addition & 1 deletion chrome/content/stampProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function getMBStamps()
var status=gStrBundle.getString("genstamp")+': ';
dialog.status.setAttribute("value", status);
var mbval=sPrefs.getIntPref('extensions.ppost.mbound.mintvalue');
var mbpath=sPrefs.getIntPref('ppost.mbound.mintpath');
var mbpath=sPrefs.getIntPref('extensions.ppost.mbound.mintpath');
var mbver=sPrefs.getIntPref('extensions.ppost.mbound.mintver');

//args to be passed to ex program
Expand Down
20 changes: 10 additions & 10 deletions defaults/preferences/ppost.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ pref('extensions.ppost.hashcash.enable',true);

pref('extensions.ppost.mbound.enable',true);
pref('extensions.ppost.mbound.minvalue',10);
pref('ppost.mbound.minpath',3000);
pref('ppost.mbound.maxpath',5000);
pref('extensions.ppost.mbound.minpath',3000);
pref('extensions.ppost.mbound.maxpath',5000);
pref('extensions.ppost.mbound.mintvalue',12);
pref('ppost.mbound.mintpath',3000);
pref('extensions.ppost.mbound.mintpath',3000);
pref('extensions.ppost.mbound.mintver',0);
pref('extensions.ppost.mbound.maxver',0);

pref('ppost.maxagedays',1);
pref('extensions.ppost.maxagedays',1);
pref('extensions.ppost.defalgo','hashcash');
pref('extensions.ppost.myemail','');
pref('ppost.usejavalaunch',true);
pref('ppost.javapath','');
pref('extensions.ppost.usejavalaunch',true);
pref('extensions.ppost.javapath','');
pref('extensions.ppost.path','');
pref('ppost.exdata','');

pref('extensions.ppost.addsignature',true);
pref('ppost.addheaderscroll',false);
pref('ppost.automarkjunk',false);
pref('ppost.skip_date_verification2',false);

pref('extensions.ppost.automarkjunk',false);
pref('extensions.ppost.skip_date_verification2',false);

0 comments on commit c0341cb

Please sign in to comment.