Skip to content

Commit

Permalink
debugger logs commented out
Browse files Browse the repository at this point in the history
  • Loading branch information
micz committed Mar 12, 2018
1 parent 0e5d554 commit 670ec8e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 27 deletions.
30 changes: 15 additions & 15 deletions chrome/content/mzcw-msgutils.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var miczColumnsWizard_MsgUtils = {
miczColumnsWizard_MsgUtils.win=win;
miczColumnsWizard_MsgUtils.mailServices=MailServices;
miczColumnsWizard_MsgUtils.tags=miczColumnsWizard_MsgUtils.msgHdrGetTags(miczColumnsWizard_MsgUtils.hdr)
miczLogger.log('miczColumnsWizard_MsgUtils.init miczColumnsWizard_MsgUtils.msgHdrGetTags: '+miczColumnsWizard_MsgUtils.tags);
//miczLogger.log('miczColumnsWizard_MsgUtils.init miczColumnsWizard_MsgUtils.msgHdrGetTags: '+miczColumnsWizard_MsgUtils.tags);
},

setCurrentHeader:function(header){
Expand Down Expand Up @@ -91,23 +91,23 @@ var miczColumnsWizard_MsgUtils = {
},

postActions:function(key){
miczLogger.log('miczColumnsWizard_MsgUtils.postActions START');
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions START');
miczColumnsWizard_MsgUtils.gDBView.selectMsgByKey(key); // select message with modified headers/source
let hdr = miczColumnsWizard_MsgUtils.folder.GetMessageHeader(key);
miczLogger.log('miczColumnsWizard_MsgUtils.postActions HDR DONE');
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions HDR DONE');
if(hdr.flags & 2){
miczColumnsWizard_MsgUtils.folder.addMessageDispositionState(hdr,0); //set replied if necessary
miczLogger.log('miczColumnsWizard_MsgUtils.postActions REPLIED SET');
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions REPLIED SET');
}
if(hdr.flags & 4096){
miczColumnsWizard_MsgUtils.folder.addMessageDispositionState(hdr,1); //set fowarded if necessary
miczLogger.log('miczColumnsWizard_MsgUtils.postActions FORWARDED SET');
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions FORWARDED SET');
}
//set labels if needed
miczLogger.log('miczColumnsWizard_MsgUtils.postActions SETTING LABELS');
miczLogger.log('miczColumnsWizard_MsgUtils.postActions miczColumnsWizard_MsgUtils.tags: '+miczColumnsWizard_MsgUtils.tags.join(" "));
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions SETTING LABELS');
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions miczColumnsWizard_MsgUtils.tags: '+miczColumnsWizard_MsgUtils.tags.join(" "));
miczColumnsWizard_MsgUtils.folder.addKeywordsToMessages(toXPCOMArray([hdr], Components.interfaces.nsIMutableArray),miczColumnsWizard_MsgUtils.tags.join(" "));
miczLogger.log('miczColumnsWizard_MsgUtils.postActions LABELS SET');
//miczLogger.log('miczColumnsWizard_MsgUtils.postActions LABELS SET');
},

/**
Expand All @@ -118,8 +118,8 @@ var miczColumnsWizard_MsgUtils = {
msgHdrGetTags:function(aMsgHdr){
let keywords = aMsgHdr.getStringProperty("keywords");
let keywordList = keywords.split(' ');
miczLogger.log('miczColumnsWizard_MsgUtils.msgHdrGetTags keywords: '+keywords);
miczLogger.log('miczColumnsWizard_MsgUtils.msgHdrGetTags keywordList: '+keywordList);
//miczLogger.log('miczColumnsWizard_MsgUtils.msgHdrGetTags keywords: '+keywords);
//miczLogger.log('miczColumnsWizard_MsgUtils.msgHdrGetTags keywordList: '+keywordList);
return keywordList;
},
};
Expand Down Expand Up @@ -279,9 +279,9 @@ miczColumnsWizard_MsgUtils.copyListener={
SetMessageKey:function(key){
// at this point, the message is already stored in local folders, but not yet in remote folders,
// so for remote folders we use a folderListener
miczLogger.log('miczColumnsWizard_MsgUtils.SetMessageKey START');
//miczLogger.log('miczColumnsWizard_MsgUtils.SetMessageKey START');
if (miczColumnsWizard_MsgUtils.folder.server.type == "imap" || miczColumnsWizard_MsgUtils.folder.server.type == "news") {
miczLogger.log('miczColumnsWizard_MsgUtils.SetMessageKey IMAP');
//miczLogger.log('miczColumnsWizard_MsgUtils.SetMessageKey IMAP');
Components.classes["@mozilla.org/messenger/services/session;1"]
.getService(Components.interfaces.nsIMsgMailSession)
.AddFolderListener(miczColumnsWizard_MsgUtils.folderListener, Components.interfaces.nsIFolderListener.all);
Expand All @@ -290,7 +290,7 @@ miczColumnsWizard_MsgUtils.copyListener={
}
else
{
miczLogger.log('miczColumnsWizard_MsgUtils.SetMessageKey NOT IMAP');
//miczLogger.log('miczColumnsWizard_MsgUtils.SetMessageKey NOT IMAP');
miczColumnsWizard_MsgUtils.win.setTimeout(function(){miczColumnsWizard_MsgUtils.postActions(key);},500);
}
}
Expand All @@ -299,13 +299,13 @@ miczColumnsWizard_MsgUtils.copyListener={
// used just for remote folders
miczColumnsWizard_MsgUtils.folderListener={
OnItemAdded:function(parentItem, item, view){
miczLogger.log('miczColumnsWizard_MsgUtils.folderListener.OnItemAdded START');
//miczLogger.log('miczColumnsWizard_MsgUtils.folderListener.OnItemAdded START');
let hdr = null;
try{
hdr = item.QueryInterface(Components.interfaces.nsIMsgDBHdr);
}catch(e){return;}
if (miczColumnsWizard_MsgUtils.folderListener.key == hdr.messageKey && miczColumnsWizard_MsgUtils.folderListener.URI == hdr.folder.URI){
miczLogger.log('miczColumnsWizard_MsgUtils.folderListener.OnItemAdded DOING POSTACTION');
//miczLogger.log('miczColumnsWizard_MsgUtils.folderListener.OnItemAdded DOING POSTACTION');
miczColumnsWizard_MsgUtils.postActions(miczColumnsWizard_MsgUtils.folderListener.key);
// we don't need anymore the folderListener
Components.classes["@mozilla.org/messenger/services/session;1"].getService(Components.interfaces.nsIMsgMailSession).RemoveFolderListener(miczColumnsWizard_MsgUtils.folderListener);
Expand Down
24 changes: 12 additions & 12 deletions chrome/content/mzcw-overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,32 +326,32 @@ var miczColumnsWizard = {
document.getElementById("cw_edit_main_menu").setAttribute("hidden",false);
document.getElementById("cw_edit_context_menu").setAttribute("hidden",false);
document.getElementById("cw_edit_newmain_menu").setAttribute("hidden",false);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [initHeadersEditingMenu]: Menu UPDATED! \r\n");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [initHeadersEditingMenu]: Menu UPDATED! \r\n");
}else{
document.getElementById("cw_edit_main_menu").setAttribute("hidden",true);
document.getElementById("cw_edit_context_menu").setAttribute("hidden",true);
document.getElementById("cw_edit_newmain_menu").setAttribute("hidden",true);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [initHeadersEditingMenu]: Menu HIDDEN! \r\n");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [initHeadersEditingMenu]: Menu HIDDEN! \r\n");
}
},

checkHeadersEditingMenuList:function(element){
let current_header=element.parentElement.getAttribute("mail_header");
let current_header_value=gFolderDisplay.selectedMessage.getStringProperty(current_header);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [checkHeadersEditingMenuList] current_header=current_header_value: "+current_header+"="+current_header_value+" \r\n");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [checkHeadersEditingMenuList] current_header=current_header_value: "+current_header+"="+current_header_value+" \r\n");
for(let sub_el of Array.from(element.children)){
if(current_header_value==sub_el.getAttribute("label")){
sub_el.setAttribute('checked',true);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [checkHeadersEditingMenuList] sub_el: "+sub_el.getAttribute("label")+" FOUND!!! \r\n");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [checkHeadersEditingMenuList] sub_el: "+sub_el.getAttribute("label")+" FOUND!!! \r\n");
}else{
sub_el.setAttribute('checked',false);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [checkHeadersEditingMenuList] sub_el: "+sub_el.getAttribute("label")+" \r\n");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard [checkHeadersEditingMenuList] sub_el: "+sub_el.getAttribute("label")+" \r\n");
}
}
},

editHeaderMenu_OnClick:function(event){
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderMenu_OnClick] colidx: "+JSON.stringify(event.target.getAttribute("colidx"))+"\r\n");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderMenu_OnClick] colidx: "+JSON.stringify(event.target.getAttribute("colidx"))+"\r\n");
let colidx=event.target.getAttribute("colidx")
let mail_header=event.target.getAttribute("mail_header");
let edit_type=event.target.getAttribute("edit_type");
Expand All @@ -374,7 +374,7 @@ var miczColumnsWizard = {
},

editHeaderSubMenu_OnClick:function(event){ //Here editType is always Fixed List
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] colidx: "+JSON.stringify(event.target.getAttribute("colidx")));
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] colidx: "+JSON.stringify(event.target.getAttribute("colidx")));
let colidx=event.target.getAttribute("colidx")
let mail_header=event.target.getAttribute("mail_header");
let header_value=event.target.getAttribute("label");
Expand All @@ -383,15 +383,15 @@ var miczColumnsWizard = {
header_value='';
}
let msgURI = gFolderDisplay.selectedMessageUris[0];
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] msgURI SELECTED");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] msgURI SELECTED");
miczColumnsWizard_MsgUtils.init(messenger,msgURI,gDBView,msgWindow,window);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] miczColumnsWizard_MsgUtils.init DONE");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] miczColumnsWizard_MsgUtils.init DONE");
miczColumnsWizard_MsgUtils.setCurrentHeader(mail_header);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] mail_header SET");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] mail_header SET");
//Save the message with the new value
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] miczColumnsWizard_MsgUtils.saveMsg CALLING");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] miczColumnsWizard_MsgUtils.saveMsg CALLING");
miczColumnsWizard_MsgUtils.saveMsg(header_value,msgURI,miczColumnsWizard_MsgUtils.listener);
miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] miczColumnsWizard_MsgUtils.saveMsg DONE");
//miczLogger.log(">>>>>>>>>>>>> miczColumnsWizard: [editHeaderSubMenu_OnClick] miczColumnsWizard_MsgUtils.saveMsg DONE");
},

updateHeaderEditingMenuObserver:function(ObserverService){
Expand Down

0 comments on commit 670ec8e

Please sign in to comment.