Skip to content

Commit ac43360

Browse files
committed
4.19.1 - released 20/01/2021
1 parent a65d982 commit ac43360

15 files changed

+324
-218
lines changed

build-minimal.bat

Lines changed: 0 additions & 14 deletions
This file was deleted.

build.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ pwsh -Command "(gc -en UTF8NoBOM manifest.json) -replace 'pre%oldRev%', 'pre%qui
88
rem "C:\Program Files\7-Zip\7z" a -xr!.svn quickFolders.zip install.rdf chrome.manifest chrome defaults license.txt
99
"C:\Program Files\7-Zip\7z" a -xr!.svn QuickFoldersWeb.zip manifest.json install.rdf chrome.manifest chrome defaults license.txt
1010
echo %quickFoldersRev% > revision.txt
11-
move QuickFolders*.xpi "..\..\Release\_Test Versions\4.18\"
11+
move QuickFolders*.xpi "..\..\Release\_Test Versions\4.19\"
1212
pwsh -Command "Start-Sleep -m 150"
13-
rename QuickFoldersWeb.zip QuickFolders-wx-4.18.2pre%quickFoldersRev%.xpi
13+
rename QuickFoldersWeb.zip QuickFolders-wx-4.19.1pre%quickFoldersRev%.xpi

chrome/content/filterTemplate.xul

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
buttonlabelextra1="&qf.continueFilter.label;"
1919
buttonaccesskeyextra1="&qf.continueFilter.shortcut;"
2020
buttonlabelextra2="&qf.label.donate;"
21-
ondialogextra2="QuickFolders.Util.openLinkInBrowser(event,'http://quickfolders.org/donate.html')"
21+
ondialogextra2="QuickFolders.Util.openLinkInBrowser(event,'https://quickfolders.org/donate.html')"
2222
ondialogcancel="return QuickFolders.FilterWorker.cancelTemplate();"
2323
ondialogextra1="return QuickFolders.FilterWorker.acceptTemplate();"
2424
onload="QuickFolders.FilterWorker.loadTemplate();"

chrome/content/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ else
1717
var QuickFolders_TabURIregexp = {
1818
get _thunderbirdRegExp() {
1919
delete this._thunderbirdRegExp;
20-
return this._thunderbirdRegExp = new RegExp("^http://quickfolders.org/");
20+
return this._thunderbirdRegExp = new RegExp("^https://quickfolders.org/");
2121
}
2222
};
2323

@@ -1561,7 +1561,7 @@ QuickFolders.Options = {
15611561
sPrompt = util.getBundleString("qfConfirmVersionLink", "Display version history for QuickFolders");
15621562
if (!ask || confirm(sPrompt + " " + pureVersion + "?")) {
15631563
util.openURL(null,
1564-
util.makeUriPremium("http://quickfolders.org/version.html")
1564+
util.makeUriPremium("https://quickfolders.org/version.html")
15651565
+ "#" + pureVersion);
15661566
return true;
15671567
}

chrome/content/options.xul

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -990,9 +990,9 @@
990990
</description>
991991
<vbox height="70">
992992
<button id="L0"
993-
href="http://quickfolders.org/"
993+
href="https://quickfolders.org/"
994994
tooltiptext="quickfolders.org"
995-
onclick="util.openURL(event,'http://quickfolders.org/'); setTimeout(function() { window.close(); });">
995+
onclick="util.openURL(event,'https://quickfolders.org/'); setTimeout(function() { window.close(); });">
996996
<label width="270">&qf.label.homePage;</label>
997997
</button>
998998
</vbox>
@@ -1032,7 +1032,7 @@
10321032
<div id="L2"
10331033
class="button"
10341034
tooltiptext="quickfolders.org/bugs.html"
1035-
onclick="util.openURL(event,'http://quickfolders.org/bugs.html')">
1035+
onclick="util.openURL(event,'https://quickfolders.org/bugs.html')">
10361036
<label>&qf.label.bugzilla;</label>
10371037
</div>
10381038
</row>
@@ -1044,7 +1044,7 @@
10441044
</description>
10451045
<div id="L3"
10461046
class="button"
1047-
tooltiptext="http://quickfolders.org/version.html"
1047+
tooltiptext="https://quickfolders.org/version.html"
10481048
onclick="options.showVersionHistory(this, false);
10491049
setTimeout(function() { window.close(); });
10501050
return true;">

chrome/content/qf-styles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ QuickFolders.Styles = {
190190
st.setProperty(attribute, value, ((important) ? "important" : ""));
191191
}
192192
else {
193-
if (origProperty=="");
193+
// if (origProperty=="");
194194
st.setProperty(attribute, value, ((important) ? "important" : ""));
195195
foundRule = true;
196196
}

chrome/content/quickfolders-filterList.js

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -444,38 +444,7 @@ QuickFolders.FilterList = {
444444
if (focusSearchBox)
445445
searchBox.focus();
446446

447-
} ,
448-
449-
validateFilterTargets: function(sourceURI, targetURI) {
450-
// fix any filters that might still point to the moved folder.
451-
// 1. nsIMsgAccountManager loop through list of servers
452-
try {
453-
const Ci = Components.interfaces,
454-
util = QuickFolders.Util;
455-
let Accounts = util.Accounts,
456-
acctMgr = Components.classes["@mozilla.org/messenger/account-manager;1"]
457-
.getService(Ci.nsIMsgAccountManager);
458-
for (let a=0; a<Accounts.length; a++) {
459-
let account = Accounts[a];
460-
if (account.incomingServer && account.incomingServer.canHaveFilters )
461-
{
462-
let srv = account.incomingServer.QueryInterface(Ci.nsIMsgIncomingServer);
463-
QuickFolders.Util.logDebugOptional("filters", "checking account for filter changes: " + srv.prettyName);
464-
// 2. getFilterList
465-
let filterList = srv.getFilterList(msgWindow).QueryInterface(Ci.nsIMsgFilterList);
466-
// 3. use nsIMsgFilterList.matchOrChangeFilterTarget(oldUri, newUri, false)
467-
if (filterList) {
468-
filterList.matchOrChangeFilterTarget(sourceURI, targetURI, false)
469-
}
470-
}
471-
}
472-
}
473-
catch(ex) {
474-
QuickFolders.Util.logException("Exception in QuickFolders.FilterList.validateFilterTargets ", ex);
475-
}
476-
477-
}
478-
447+
}
479448

480449
};
481450

chrome/content/quickfolders-interface.js

Lines changed: 90 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,6 @@ QuickFolders.Interface = {
905905
model = QuickFolders.Model;
906906
let cat = this.CategoryMenu,
907907
showToolIcon = prefs.isShowToolIcon && !QuickFolders.FilterWorker.FilterMode;
908-
if (prefs.isDebugOption("categories")) debugger;
909908
if (cat) {
910909
// don't show if ALWAYS and NEVER are the only ones that are references by tabs
911910
let catArray = model.Categories,
@@ -918,10 +917,17 @@ QuickFolders.Interface = {
918917
}
919918
cat.style.display = (showToolIcon || isCustomCat) ? '-moz-inline-box' : 'none';
920919
cat.collapsed = (!isCustomCat);
921-
if (this.currentActiveCategories && !catArray.includes(this.currentActiveCategories)) {
922-
// make sure all tabs are visible in case we delete the last category!
923-
this.selectCategory(FCat.ALL);
924-
}
920+
921+
if (this.currentActiveCategories) {
922+
if (this.currentActiveCategories == FCat.UNCATEGORIZED) // [issue 72] Category "_Uncategorized" will show all categories after moving a folder to another
923+
this.selectCategory(FCat.UNCATEGORIZED);
924+
else {
925+
if (!catArray.includes(this.currentActiveCategories)) {
926+
// make sure all tabs are visible in case we delete the last category!
927+
this.selectCategory(FCat.ALL);
928+
}
929+
}
930+
}
925931

926932

927933
if (prefs.getBoolPref('collapseCategories'))
@@ -952,7 +958,8 @@ QuickFolders.Interface = {
952958
try {
953959
if (lCatCount > 0 && menuList && menuPopup) {
954960
let activeCatsList = this.currentActiveCategories,
955-
cats = activeCatsList ? activeCatsList.split('|') : [];
961+
cats = activeCatsList ? activeCatsList.split('|') : [],
962+
isMultiCategories = prefs.getBoolPref('premium.categories.multiSelect');
956963
util.clearChildren(menuPopup,true);
957964

958965
menuPopup.appendChild(this.createMenuItem(
@@ -964,12 +971,13 @@ QuickFolders.Interface = {
964971
if (category!=FCat.ALWAYS && category!=FCat.NEVER) {
965972
let menuItem = this.createMenuItem(category, category, 'menuitem-iconic');
966973
// add checkbox for multiple category selection
967-
if (prefs.getBoolPref('premium.categories.multiSelect')) {
974+
if (isMultiCategories) {
968975
// multi selection
969-
if (cats.includes(category))
976+
if (cats.includes(category)) {
970977
menuItem.setAttribute("checked", true);
971-
if (isPostbox)
972-
menuItem.setAttribute("type","checkbox");
978+
if (isPostbox)
979+
menuItem.setAttribute("type","checkbox");
980+
}
973981
}
974982
menuPopup.appendChild(menuItem);
975983
}
@@ -991,8 +999,14 @@ QuickFolders.Interface = {
991999
menuPopup.appendChild(this.createIconicElement('menuseparator','*'));
9921000
}
9931001
if (isUncat) {
994-
let s = this.getUIstring("qfUncategorized","(Uncategorized)");
995-
menuPopup.appendChild(this.createMenuItem(FCat.UNCATEGORIZED , s, 'menuitem-iconic'));
1002+
let s = this.getUIstring("qfUncategorized","(Uncategorized)"),
1003+
itemUncat = this.createMenuItem(FCat.UNCATEGORIZED , s, 'menuitem-iconic');
1004+
menuPopup.appendChild(itemUncat);
1005+
if (cats.includes(FCat.UNCATEGORIZED) && isMultiCategories) {
1006+
itemUncat.setAttribute("checked", true);
1007+
if (isPostbox)
1008+
menuItem.setAttribute("type","checkbox");
1009+
}
9961010
}
9971011
if (isNever) {
9981012
let s = this.getUIstring("qfShowNever","Never Show (Folder Alias)");
@@ -1636,13 +1650,24 @@ QuickFolders.Interface = {
16361650
// first let's reset anything in the quickMove if we are in single message mode:
16371651
QuickMove.resetList();
16381652
}
1639-
let messageUris = util.getSelectedMsgUris();
1640-
if (messageUris) {
1641-
let currentFolder = util.CurrentFolder;
1642-
while (messageUris.length) {
1643-
QuickMove.add(messageUris.pop(), currentFolder, iscopy);
1653+
// is the folder tree highlighted?
1654+
// [issue 75] support moving folders through quickMove
1655+
if (eventTarget && eventTarget.getAttribute("id") == "folderTree") {
1656+
let folders = gFolderTreeView.getSelectedFolders();
1657+
if (folders.length) {
1658+
QuickMove.addFolders(folders, iscopy);
1659+
QuickMove.update();
16441660
}
1645-
QuickMove.update();
1661+
}
1662+
else {
1663+
let messageUris = util.getSelectedMsgUris();
1664+
if (messageUris) {
1665+
let currentFolder = util.CurrentFolder;
1666+
while (messageUris.length) {
1667+
QuickMove.add(messageUris.pop(), currentFolder, iscopy);
1668+
}
1669+
QuickMove.update();
1670+
}
16461671
}
16471672
isHandled = true;
16481673
}
@@ -3106,8 +3131,12 @@ QuickFolders.Interface = {
31063131
}
31073132
folder.updateFolder(msgWindow);
31083133
if (isCurrent) {
3109-
if (typeof(gFolderDisplay.show) != 'undefined')
3110-
gFolderDisplay.show(folder);
3134+
if (typeof(gFolderDisplay.show) != 'undefined') {
3135+
setTimeout(
3136+
function() {gFolderDisplay.show(folder);},
3137+
100
3138+
);
3139+
}
31113140
}
31123141
}
31133142
else { // Postbox / SeaMonkey
@@ -5522,7 +5551,7 @@ QuickFolders.Interface = {
55225551

55235552
viewChangeOrder: function viewChangeOrder() {
55245553
window.openDialog('chrome://quickfolders/content/change-order.xul','quickfolders-change-order',
5525-
'chrome,titlebar,toolbar,centerscreen,resizable,dependent', QuickFolders); // dependent = modeless
5554+
'chrome,titlebar,centerscreen,resizable,dependent', QuickFolders); // dependent = modeless
55265555
} ,
55275556

55285557
lastTabSelected: null,
@@ -6903,16 +6932,37 @@ QuickFolders.Interface = {
69036932
QuickFolders.FilterWorker.toggle_FilterMode(active);
69046933
} ,
69056934

6906-
moveFolder: function moveFolder(fromFolder, targetFolder, arrCount) {
6907-
// [Bug 26517] support multiple folder moves - addeed "count" and transmitting URIs
6935+
moveFolders: function moveFolders(fromFolders, targetFolder) {
6936+
// [Bug 26517] support multiple folder moves - added "count" and transmitting URIs
69086937
const Cc = Components.classes,
69096938
Ci = Components.interfaces,
69106939
util = QuickFolders.Util;
6911-
6940+
let arrCount = fromFolders.length;
6941+
6942+
function isChildFolder(f) {
6943+
for (let i=0; i<fromFolders.length; i++) {
6944+
if (f == fromFolders[i]) continue;
6945+
let p = f;
6946+
while (p = p.parent) {
6947+
if (p == fromFolders[i]) return true;
6948+
}
6949+
}
6950+
return false;
6951+
}
6952+
// make sure this is not a child of previous folders!
6953+
// in this case, it will be moved anyway through its parent
6954+
// and may lead to a problem (remaining folders are not moved)
6955+
let newFolders = [];
6956+
for (let j=0; j<arrCount; j++) {
6957+
let fld = fromFolders[j];
6958+
if (isChildFolder(fld)) continue; // skip
6959+
newFolders.push(fld);
6960+
}
6961+
arrCount = newFolders.length;
6962+
69126963
let lastFolder,
69136964
sPrompt = util.getBundleString("qfConfirmMoveFolder", "Really move folder {0} to {1}?"),
6914-
whatIsMoved = arrCount ?
6915-
(arrCount==1 ? fromFolder[0].prettyName : "[" + arrCount + " folders]") : fromFolder.prettyName;
6965+
whatIsMoved = (arrCount==1 ? newFolders[0].prettyName : "[" + arrCount + " folders]");
69166966

69176967
sPrompt = sPrompt.replace("{0}", whatIsMoved);
69186968
sPrompt = sPrompt.replace("{1}", targetFolder.prettyName);
@@ -6921,13 +6971,14 @@ QuickFolders.Interface = {
69216971

69226972
let cs = Cc["@mozilla.org/messenger/messagecopyservice;1"].getService(Ci.nsIMsgCopyService);
69236973
try {
6924-
let toCount = arrCount || 1, // for the moment only support dragging one folder.
6925-
ap = util.Application,
6926-
isNewArray = (ap == 'Thunderbird' || ap == 'SeaMonkey');
6927-
for (let i = 0; i < toCount; i++) {
6974+
let ap = util.Application,
6975+
isNewArray = (ap == 'Thunderbird' || ap == 'SeaMonkey'),
6976+
countChanges = 0;
6977+
for (let i = 0; i < newFolders.length; i++) {
69286978
let folders = new Array,
6929-
fld = arrCount ? fromFolder[i] : fromFolder,
6979+
fld = newFolders[i],
69306980
fromURI = fld.URI;
6981+
69316982
lastFolder = fld; // keep track of last folder in case of a problem.
69326983
folders.push(fld); // dt.mozGetDataAt("text/x-moz-folder", i).QueryInterface(Ci.nsIMsgFolder)
69336984
let array = isNewArray ?
@@ -6936,6 +6987,9 @@ QuickFolders.Interface = {
69366987

69376988
if (!isNewArray)
69386989
array.AppendElement(fld);
6990+
if (util.CurrentFolder == fld) {
6991+
this.goUpFolder();
6992+
}
69396993

69406994
// cannot move if the target Folder is in a different account?
69416995
// folders[0]\ == targetFolder.server
@@ -6953,14 +7007,14 @@ QuickFolders.Interface = {
69537007
// get encoded folder Name:
69547008
let slash = fromURI.lastIndexOf('/'),
69557009
encName = fromURI.substring(slash),
6956-
newURI = targetFolder.URI + encName,
6957-
countChanges = QuickFolders.Model.moveFolderURI(fromURI, newURI);
6958-
if (countChanges)
6959-
this.updateFolders(true, true);
7010+
newURI = targetFolder.URI + encName;
7011+
countChanges += QuickFolders.Model.moveFolderURI(fromURI, newURI);
69607012

69617013
// Filter Validation!
6962-
setTimeout(function() { QuickFolders.FilterList.validateFilterTargets(fromURI, newURI); });
7014+
setTimeout(function() { QuickFolders.Util.validateFilterTargets(fromURI, newURI); });
69637015
}
7016+
if (countChanges)
7017+
this.updateFolders(true, true);
69647018
}
69657019
catch(ex) {
69667020
sPrompt = util.getBundleString("qfCantMoveFolder", "Folder {0} cannot be moved.");

0 commit comments

Comments
 (0)