This commit is contained in:
foudfou 2014-05-24 16:04:27 +02:00
parent 0bdf8a03a0
commit b49dac77db
2 changed files with 8 additions and 10 deletions

View File

@ -102,7 +102,7 @@ var firetrayChrome = { // each new window gets a new firetrayChrome !
replaceCommand: function(eltId, func) {
let elt = document.getElementById(eltId);
if (!elt) {
firetray_log.info("Element '"+eltId+"' not found. Command not replaced.");
firetray_log.debug("Element '"+eltId+"' not found. Command not replaced.");
return null;
}

View File

@ -502,23 +502,21 @@ firetray.Handler = {
branch: "mail.biff.", pref: "show_tray_icon", bak:null}
],
disablePrefsTmp: function() {
for (let i=0, len=this.prefsDisable.length; i<len; ++i) {
let pref = this.prefsDisable[i];
if (!pref.cond()) continue;
this.prefsDisable.forEach(function(pref){
if (!pref.cond()) return;
let branch = Services.prefs.getBranch(pref.branch);
pref.bak = branch.getBoolPref(pref.pref);
log.debug(pref.pref+" saved. was: "+pref.bak);
log.warn(pref.pref+" saved. was: "+pref.bak);
branch.setBoolPref(pref.pref, false);
}
});
},
restorePrefsTmp: function() {
for (let i=0, len=this.prefsDisable.length; i<len; ++i) {
let pref = this.prefsDisable[i];
if (!pref.cond() || !pref.bak) continue;
this.prefsDisable.forEach(function(pref){
if (!pref.cond() || !pref.bak) return;
let branch = Services.prefs.getBranch(pref.branch);
branch.setBoolPref(pref.pref, pref.bak);
log.debug(pref.pref+" restored to: "+pref.bak);
}
});
}
}; // firetray.Handler