Skip to content

Commit

Permalink
4.18.2 Maintenance Release 10/12/2020
Browse files Browse the repository at this point in the history
  • Loading branch information
RealRaven2000 committed Dec 10, 2020
1 parent 17c6e87 commit a65d982
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 55 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ rem "C:\Program Files\7-Zip\7z" a -xr!.svn quickFolders.zip install.rdf chrome.m
echo %quickFoldersRev% > revision.txt
move QuickFolders*.xpi "..\..\Release\_Test Versions\4.18\"
pwsh -Command "Start-Sleep -m 150"
rename QuickFoldersWeb.zip QuickFolders-wx-4.18.1pre%quickFoldersRev%.xpi
rename QuickFoldersWeb.zip QuickFolders-wx-4.18.2pre%quickFoldersRev%.xpi
11 changes: 11 additions & 0 deletions chrome/content/change-order.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ hbox.drag-image {
margin-bottom: 20px;
}

/* for some reason these buttons don't render labels */
#QuickFolders-change-order-grid button {
-moz-appearance: none;
border: 1px solid darkgray !important;
border-radius: 3px;
padding-left: 1em;
padding-bottom: 0.1em;
}
#QuickFolders-change-order-grid button:hover {
color: -moz-dialogtext;
}
button.order-button-up {
/* -moz-appearance: button-small; */
max-height: 1.9em !important;
Expand Down
2 changes: 1 addition & 1 deletion chrome/content/change-order.xul
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="change-order.css" type="text/css"?>
<?xml-stylesheet href="chrome://quickfolders/content/change-order.css" type="text/css"?>

<!DOCTYPE dialog SYSTEM "chrome://quickfolders/locale/change_order.dtd" >

Expand Down
6 changes: 0 additions & 6 deletions chrome/content/overlaySearchDialog.xul
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,4 @@
<script type="application/x-javascript" src="chrome://quickfolders/content/quickfolders-util.js" />
<script type="application/x-javascript" src="chrome://quickfolders/content/quickfolders-search.js" />

<window id="searchMailWindow">

<script type="text/javascript">
window.addEventListener("load", function(e) { QuickFolders.SearchDialog.onLoad(e);}, false);
</script>
</window>
</overlay>
25 changes: 23 additions & 2 deletions chrome/content/quickfolders-bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ QuickFolders.bookmarks = {
Cc = Components.classes,
nsMsgSearchScope = Ci.nsMsgSearchScope,
nsMsgSearchAttrib = Ci.nsMsgSearchAttrib,
nsMsgSearchOp = Ci.nsMsgSearchOp;
nsMsgSearchOp = Ci.nsMsgSearchOp,
util = QuickFolders.Util;
function setTermValue(term, attr, op, valStr) {
let val = term.value;
term.attrib = attr;
Expand All @@ -83,9 +84,26 @@ QuickFolders.bookmarks = {
function _getEmailAddress(a) {
return a.replace(/.*<(\S+)>.*/g, "$1");
}

// from test_bug404489.js
var hitCount,
searchListener = {
onSearchHit(dbHdr, folder) {
debugger;
hitCount++;
},
onSearchDone(status) {
util.logDebug("Search found " + hitCount + " matches.");
searchSession = null;
},
onNewSearch() {
hitCount = 0;
},
};


let getFolder = QuickFolders.Model.getMsgFolderFromUri,
folder = getFolder(entry.FolderUri),
util = QuickFolders.Util,
searchSession = Cc["@mozilla.org/messenger/searchSession;1"].createInstance(Ci.nsIMsgSearchSession),
searchTerms = [],
offlineScope = (folder.flags & util.FolderFlags.MSG_FOLDER_FLAG_OFFLINE) ? nsMsgSearchScope.offlineMail : nsMsgSearchScope.onlineManual, // Postbox doesn't like nsMsgFolderFlags.Offline?
Expand Down Expand Up @@ -125,9 +143,12 @@ QuickFolders.bookmarks = {
entry.date);
searchTerms.push(realTerm);
}

// we overlay the dialog - the actual work is done in quickfolders-search.js
window.openDialog("chrome://messenger/content/SearchDialog.xul", "_blank",
"chrome,resizable,status,centerscreen,dialog=no",
{ folder: targetFolder, searchTerms: searchTerms, searchSession: searchSession });

},

openMessage: function (entry, forceMethod) {
Expand Down
13 changes: 9 additions & 4 deletions chrome/content/quickfolders-change-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,27 @@ QuickFolders.ChangeOrder = {
this.downString = this.getUIstring("qfDown","Down");

let rows = this.$('QuickFolders-change-order-grid-rows'),
row = document.createXULElement ? document.createXULElement("row") : document.createElement("row"),
row = document.createXULElement("row"),
folderLabel = document.createXULElement("label");
folderLabel.appendChild(document.createTextNode(label));
// folderLabel.appendChild(document.createTextNode(label));
folderLabel.textContent = label;
row.appendChild(folderLabel);

let buttonUp = document.createXULElement ? document.createXULElement("button") : document.createElement("button");
let buttonUp = document.createXULElement("button");
buttonUp.className = "order-button-up";

buttonUp.setAttribute("label",this.upString);
buttonUp.textContent = this.upString; // ugly hack for borked Tb78, no idea why no label shows...

buttonUp.linkedFolder = folder;
QuickFolders.Interface.setEventAttribute(buttonUp, "oncommand","QuickFolders.ChangeOrder.onButtonClick(event.target, 'up','"+folder.URI+"');");
row.appendChild(buttonUp);

let buttonDown = document.createXULElement ? document.createXULElement("button") : document.createElement("button");
let buttonDown = document.createXULElement("button");
buttonDown.className = "order-button-down";
buttonDown.setAttribute("label",this.downString);
buttonDown.textContent = this.downString; // ugly hack for borked Tb78, no idea why no label shows...

buttonDown.linkedFolder = folder;
QuickFolders.Interface.setEventAttribute(buttonDown, "oncommand","QuickFolders.ChangeOrder.onButtonClick(event.target, 'down','"+folder.URI+"');");
row.appendChild(buttonDown);
Expand Down
19 changes: 12 additions & 7 deletions chrome/content/quickfolders-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ QuickFolders.Interface = {
if (QuickFolders.Model.selectedFolders.length)
sDebug += ' - Number of Folders = ' + QuickFolders.Model.selectedFolders.length;

util.logDebug(sDebug);
util.logDebugOptional("interface", sDebug);

if (!minimalUpdate) {
this.buttonsByOffset = [];
Expand Down Expand Up @@ -5916,7 +5916,7 @@ QuickFolders.Interface = {
let btn = element.folder ? element : targetElement, // menu item
entry = QuickFolders.Model.getButtonEntry(btn);
if (entry && entry.customPalette) {
paletteToken = this.getPaletteClassToken(entry.customPalette);
paletteToken = this.getPaletteClassToken(entry.customPalette).trim();
}
}

Expand All @@ -5929,10 +5929,10 @@ QuickFolders.Interface = {

// remove palette name(s)
element.className = this.stripPaletteClasses(element.className, paletteToken);
let hasClass = (paletteToken && element.classList.contains(paletteToken));
let hasClass = (paletteToken && element.classList.contains(paletteToken.trim()));
if (!hasClass) {
if (paletteToken)
element.className += paletteToken;
element.classList.add(paletteToken.trim());
}
} ,

Expand Down Expand Up @@ -6769,6 +6769,9 @@ QuickFolders.Interface = {
||
selector == 'messageWindow'
) {

// currentFolderBar.style.display = visible ? '-moz-box' : 'none';
currentFolderBar.collapsed = !visible;
currentFolderBar.style.display = visible ? '-moz-box' : 'none';
if (visible && selector != 'messageWindow') {
let rect = currentFolderBar.getBoundingClientRect();
Expand Down Expand Up @@ -7003,8 +7006,8 @@ QuickFolders.Interface = {

toolbar = this.Toolbar;
if(active) {
let tabColor = 1;
let folder = util.CurrentFolder;
let tabColor = 1,
folder = util.CurrentFolder;
if (folder) {
let folderEntry = QuickFolders.Model.getFolderEntry(folder.URI);
tabColor = folderEntry && folderEntry.tabColor ? folderEntry.tabColor : tabColor;
Expand All @@ -7025,8 +7028,10 @@ QuickFolders.Interface = {
menupopup.insertBefore(this.createIconicElement('menuseparator','*'), menupopup.firstChild);
menupopup.insertBefore(mItem, menupopup.firstChild);
}
else
else {
util.logDebugOptional("interface","palette already built (firstChild exists)");
}

util.logDebugOptional("interface","initElementPaletteClass…");
this.initElementPaletteClass(menupopup);
}
Expand Down
19 changes: 12 additions & 7 deletions chrome/content/quickfolders-quickMove.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,18 @@ QuickFolders.quickMove = {
rememberLastFolder: function rememberLastFolder(URIorFolder, parentName) {
const prefs = QuickFolders.Preferences,
util = QuickFolders.Util;
if (prefs.isDebugOption('quickMove')) {
util.logDebugOptional('quickMove',"rememberLastFolder(" + URIorFolder + ", " + parentName + ")")
}
let fld = (URIorFolder.name) ? URIorFolder : QuickFolders.Model.getMsgFolderFromUri(URIorFolder),
sRememberFolder = (parentName) ? parentName + "/" + fld.prettyName : fld.prettyName;
prefs.setStringPref("quickMove.lastFolderName", sRememberFolder);
util.logDebugOptional('quickMove',"Storing: " + sRememberFolder)
try {
if (prefs.isDebugOption('quickMove')) {
util.logDebugOptional('quickMove',"rememberLastFolder(" + URIorFolder + ", " + parentName + ")")
}
let fld = (URIorFolder.name) ? URIorFolder : QuickFolders.Model.getMsgFolderFromUri(URIorFolder),
sRememberFolder = (parentName) ? parentName + "/" + fld.prettyName : fld.prettyName;
prefs.setStringPref("quickMove.lastFolderName", sRememberFolder);
util.logDebugOptional('quickMove',"Storing: " + sRememberFolder);
}
catch (ex) {
util.logException("rememberLastFolder( " + URIorFolder + ", " + parentName + ")", ex);
}
},

// move or copy mails (or both at the same time!)
Expand Down
5 changes: 4 additions & 1 deletion chrome/content/quickfolders-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,7 @@ QuickFolders.SearchDialog = {

}

}
}

/* removed from xul overlay */
window.addEventListener("load", function(e) { QuickFolders.SearchDialog.onLoad(e);}, false);
7 changes: 6 additions & 1 deletion chrome/content/quickfolders-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,13 @@ QuickFolders.Util = {

// Set the MRU time for a folder to make it appear in recent folders list
touch: function touch(folder) {
const util = QuickFolders.Util;
const util = QuickFolders.Util,
FLAGS = util.FolderFlags;
try {
// special folders we do not want / need in recent history:
if (folder.flags &
(FLAGS.MSG_FOLDER_FLAG_TRASH | FLAGS.MSG_FOLDER_FLAG_SENTMAIL | FLAGS.MSG_FOLDER_FLAG_QUEUE |
FLAGS.MSG_FOLDER_FLAG_JUNK | FLAGS.MSG_FOLDER_FLAG_ARCHIVES | FLAGS.MSG_FOLDER_FLAG_DRAFTS)) return;
if (folder.SetMRUTime)
folder.SetMRUTime();
else {
Expand Down
45 changes: 34 additions & 11 deletions chrome/content/quickfolders.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ END LICENSE BLOCK */
4.18.2 QuickFolders Pro - WIP
## [issue 35] "Skip Unread Folder" hides "Add star" function... #
## [issue 41] Esc key to cancel quickMove also clears Cmd-Shift-K search box
## [issue 80] Recent Folders list not updated when moving email using drag and drop
## improved dropmarker behavior when dragging tabs over multiple rows
## in the dialog "change order of tabs" the up and down labels on the buttons are not rendered for some reason
this is now worked around by removing the button styling from these elements
Expand Down Expand Up @@ -1537,16 +1541,24 @@ var QuickFolders = {

// find out whether drop target button is right or left from source button:
if (node.hasAttributes()) {
let box = node.boxObject;
if (box) {
let dx = (box.x - button.boxObject.x);
if (dx !== 0) {
let sDirection=(dx>0 ? "dragLEFT" : "dragRIGHT"),
sOther=(dx>0 ? "dragRIGHT" : "dragLEFT");
button.classList.add(sDirection); // add style for drop arrow (remove onDragEnd)
button.classList.remove(sOther);
// check previous siblings to see if target button is found - then it's to the left. otherwise it's to the right
let i = null,
sib = node;
let sDirection="",
sOther="";
while( (sib = sib.previousSibling) != null ) {
if (sib == button) {
sDirection = "dragLEFT";
sOther = "dragRIGHT";
break;
}
}
if(!sDirection) {
sDirection = "dragRIGHT";
sOther = "dragLEFT";
}
button.classList.add(sDirection); // add style for drop arrow (remove onDragEnd)
button.classList.remove(sOther);
}
}
}
Expand Down Expand Up @@ -2554,18 +2566,29 @@ QuickFolders.FolderListener = {
try {
if (typeof QuickFolders === 'undefined')
return;
const util = QuickFolders.Util;
let prop = property ? property.toString() : '',
log = QuickFolders.Util.logDebugOptional.bind(QuickFolders.Util);
log = util.logDebugOptional.bind(util),
isTouch = false;
log("listeners.folder", "OnItemIntPropertyChanged - property = " + prop);
if (prop === "TotalUnreadMessages" ||
(QuickFolders.Preferences.isShowTotalCount
&& prop === "TotalMessages")) {
(QuickFolders.Preferences.isShowTotalCount && prop === "TotalMessages")) {
QuickFolders.Interface.setFolderUpdateTimer(item);
let cF = QuickFolders.Interface.CurrentFolderTab;
if (cF && cF.folder && cF.folder==item) { // quick update of CurrentFolder tab:
QuickFolders.Interface.initCurrentFolderTab(cF, item);
}
if (newValue > oldValue)
isTouch = true;
}
if (prop === "TotalMessages" && (newValue > oldValue)) {
isTouch = true;
}
// [issue 80] add folder to recent list if item was added (via d+d)
if (isTouch) {
util.touch(item);
}

if (QuickFolders.compactReportFolderCompacted && prop === "FolderSize") {
try
{
Expand Down
2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
em:icon64URL="chrome://quickfolders/skin/ico/QF64x64.png"
em:optionsURL="chrome://quickfolders/content/options.xul">
<em:type>2</em:type>
<em:version>4.18.2pre2</em:version>
<em:version>4.18.2</em:version>
<em:homepageURL>http://quickfolders.mozdev.org/index.html</em:homepageURL>
<em:targetApplication RDF:resource="rdf:#$Vsomz2"/>
<em:targetApplication RDF:resource="rdf:#$Vsomt2"/>
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"manifest_version": 2,
"name": "QuickFolders",
"description": "Bookmark your favorite mail folders in Thunderbird.",
"version": "4.18.2pre2",
"version": "4.18.2",
"developer": {
"name": "Axel Grude",
"url": "http://quickfolders.org/index.html"
Expand Down
24 changes: 12 additions & 12 deletions release-notes.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<ul>
<li class="psa"> I am currently paying somebody to migrate all my Add-on support sites away from the free host on mozdev.org, which is going to close operation end of June. To keep having support sites and ongoing development, please <a href="http://sites.fastspring.com/quickfolders/product/quickfolders?referrer=qf-version-page">buy a license</a> (the migration will cost around $500, so there are some expense I hope to recover from the user community).

I will also have to rewrite all mail Add-ons as web extensions, which is currently not yet possible as all necessary APIs to replace the deprecated tech has not been implemented. As in between step I plan to release QuickFolders as a "web experiment" for Thunderbird 78+ but this will take a few weeks of work. If you are interested in using a version of QuickFolders that works with Thunderbird 78, <a href="http://sites.fastspring.com/quickfolders/product/quickfolders?referrer=qf-version-page">buy a license</a> to support the project.</li>

<li> IMPROVEMENT IN 4.18:<a target="_blank" href="https://github.com/RealRaven2000/QuickFolders/issues/27">[issue 27]</a> Drag to Create New Subfolders from tab could create unexpected results, if the entered folder name contained spaces. The space (and possibly other non-ASCII characters, such as Umlauts / diacritics), would be url encoded (Space = <code>%20</code>) and could lead to failure of moving the mail or duplicated folders or non-working QuickFolders tabs.
Release 4.18.2

This problem was reported during the thunderbird 68.* release cycle so the fix may affect older versions of Thunderbird negatively. For user of older Thunderbird versions the behavior can be reverted by using the configuration setting: <code>extensions.quickfolders.newFolderCallback.encodeURI = true</code></li>
This release backports some of the fixes that were also done in the new version for Thunderbird 78. If you want to get the latest features, it is recommended to update Thunderbird to the current 78 release version.

<li> FIXED IN 4.18.1:<br><a target="_blank" href="https://github.com/RealRaven2000/QuickFolders/issues/34">[issue 34]</a> Option to make QuickFolders appear at the Bottom of Other Toolbars

The new setting <i>Advanced / QuickFolders Bar Position</i> can be used to change the order of toolbars to push the QuickFolders bar further up / down in case other 3rd party toolbars are used. Set to 0 to have the toolbar at the top, 100 should work to push it below all other toolbars.

The default is now set to make QuickFolders appear at the bottom of the mail tools again.</li>
<ul>
<li> <a target="_blank" href="https://github.com/RealRaven2000/QuickFolders/issues/80">[issue 80]</a> Recent Folders list not updated when moving email using drag and drop to the folder tree. I have made the updating of this folder time stamp somewhat more aggressive, but avoiding to add folders like Inbox, Sent, Archives, Drafts, Junk, Trash and Templates because they would always end up on top.</li>
<li> <a target="_blank" href="https://github.com/RealRaven2000/QuickFolders/issues/35">[issue 35]</a> "Skip Unread Folder" hides "Add star" function...

the Shortcut for skipping unread folders works even without pressing the Shift key</li>
<li> Reading list: jumping to a missing mail brings up a search dialog. The conditions were not automatically filled - this version fixes that
in Thunderbird 68.12. I am not sure from which version forward this stopped working.</li>
<li> In the dialog "change order of tabs" the up and down labels on the buttons are not rendered for some reason - this is now worked around by removing the button styling from these elements</li>
<li> improve dropmarker behavior when dragging tabs over multiple rows </li>
<li> Thunderbird 78: QuickFolders is now also compatible with the new Thunderbird ESR</li>
</ul>

0 comments on commit a65d982

Please sign in to comment.