diff --git a/content/filtaquilla-util.js b/content/filtaquilla-util.js index e5d13df..28ea610 100644 --- a/content/filtaquilla-util.js +++ b/content/filtaquilla-util.js @@ -331,7 +331,7 @@ FiltaQuilla.Util = { showAboutConfig: function(clickedElement, filter, readOnly) { const name = "Preferences:ConfigManager", util = FiltaQuilla.Util; - let uri = "chrome://global/content/config.xul"; + let uri = "chrome://global/content/config.xhtml"; if (util.Application) uri += "?debug"; diff --git a/content/filtaquilla.js b/content/filtaquilla.js index 30c598c..066fbca 100644 --- a/content/filtaquilla.js +++ b/content/filtaquilla.js @@ -297,7 +297,7 @@ apply: function(aMsgHdrs, aActionValue, aListener, aType, aMsgWindow) { _aListener = aListener; var srcFolder = aMsgHdrs.queryElementAt(0, Ci.nsIMsgDBHdr).folder; - _dstFolder = MailUtils.getFolderForURI(aActionValue, false); + _dstFolder = MailUtils.getExistingFolder(aActionValue, false); // store the messages Ids to use post-copy _messageIds = []; for (var i = 0; i < aMsgHdrs.length; i++) @@ -312,7 +312,7 @@ }, isValidForType: function(type, scope) { return type == Ci.nsMsgFilterType.Manual && copyAsReadEnabled;}, validateActionValue: function(aActionValue, aFilterFolder, type) { - var msgFolder = MailUtils.getFolderForURI(aActionValue, false); + var msgFolder = MailUtils.getExistingFolder(aActionValue, false); if (!msgFolder || !msgFolder.canFileMessages) { return self.strings.GetStringFromName("filtaquilla.mustSelectFolder"); @@ -535,7 +535,7 @@ let uri = hdr.folder.generateMessageURI(hdr.messageKey); Services.console.logStringMessage("Queue filter request to print message: " + hdr.subject); let printDialog = - window.openDialog("chrome://messenger/content/msgPrintEngine.xul", "", + window.openDialog("chrome://messenger/content/msgPrintEngine.xhtml", "", "chrome,dialog=no,all,centerscreen", 1, [uri], statusFeedback, false, Ci.nsIMsgPrintEngine.MNAB_PRINT_MSG, window); @@ -831,11 +831,14 @@ name: self.strings.GetStringFromName("filtaquilla.moveLater.name"), apply: function(aMsgHdrs, aActionValue, copyListener, filterType, msgWindow) { let srcFolder = aMsgHdrs.queryElementAt(0, Ci.nsIMsgDBHdr).folder; - let dstFolder = MailUtils.getFolderForURI(aActionValue, false); + let dstFolder = MailUtils.getExistingFolder(aActionValue, false); // store the messages uris to use later let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); let currentIndex = moveLaterIndex++; moveLaterTimers[currentIndex] = timer; + // the message headers array gets cleared by Thunderbird 78! we need to save it elswhere + + let callback = new MoveLaterNotify(aMsgHdrs, srcFolder, dstFolder, currentIndex); timer.initWithCallback(callback, MOVE_LATER_DELAY, Ci.nsITimer.TYPE_ONE_SHOT); }, @@ -1565,9 +1568,14 @@ }; // local private functions - + // constructor for the MoveLaterNotify object function MoveLaterNotify(aMessages, aSource, aDestination, aTimerIndex) { - this.messages = aMessages; + // thunderbird 78 tidies up the aMessages array during apply, so we need to make a copy: + this.messages = Cc["@mozilla.org/array;1"].createInstance(Ci.nsIMutableArray) + // clone the messages array + for (let i=0; i