Skip to content

Commit

Permalink
4.19.1 - released 20/01/2021
Browse files Browse the repository at this point in the history
  • Loading branch information
RealRaven2000 committed Jan 20, 2021
1 parent a65d982 commit ac43360
Show file tree
Hide file tree
Showing 15 changed files with 324 additions and 218 deletions.
14 changes: 0 additions & 14 deletions build-minimal.bat

This file was deleted.

4 changes: 2 additions & 2 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ pwsh -Command "(gc -en UTF8NoBOM manifest.json) -replace 'pre%oldRev%', 'pre%qui
rem "C:\Program Files\7-Zip\7z" a -xr!.svn quickFolders.zip install.rdf chrome.manifest chrome defaults license.txt
"C:\Program Files\7-Zip\7z" a -xr!.svn QuickFoldersWeb.zip manifest.json install.rdf chrome.manifest chrome defaults license.txt
echo %quickFoldersRev% > revision.txt
move QuickFolders*.xpi "..\..\Release\_Test Versions\4.18\"
move QuickFolders*.xpi "..\..\Release\_Test Versions\4.19\"
pwsh -Command "Start-Sleep -m 150"
rename QuickFoldersWeb.zip QuickFolders-wx-4.18.2pre%quickFoldersRev%.xpi
rename QuickFoldersWeb.zip QuickFolders-wx-4.19.1pre%quickFoldersRev%.xpi
2 changes: 1 addition & 1 deletion chrome/content/filterTemplate.xul
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
buttonlabelextra1="&qf.continueFilter.label;"
buttonaccesskeyextra1="&qf.continueFilter.shortcut;"
buttonlabelextra2="&qf.label.donate;"
ondialogextra2="QuickFolders.Util.openLinkInBrowser(event,'http://quickfolders.org/donate.html')"
ondialogextra2="QuickFolders.Util.openLinkInBrowser(event,'https://quickfolders.org/donate.html')"
ondialogcancel="return QuickFolders.FilterWorker.cancelTemplate();"
ondialogextra1="return QuickFolders.FilterWorker.acceptTemplate();"
onload="QuickFolders.FilterWorker.loadTemplate();"
Expand Down
4 changes: 2 additions & 2 deletions chrome/content/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
var QuickFolders_TabURIregexp = {
get _thunderbirdRegExp() {
delete this._thunderbirdRegExp;
return this._thunderbirdRegExp = new RegExp("^http://quickfolders.org/");
return this._thunderbirdRegExp = new RegExp("^https://quickfolders.org/");
}
};

Expand Down Expand Up @@ -1561,7 +1561,7 @@ QuickFolders.Options = {
sPrompt = util.getBundleString("qfConfirmVersionLink", "Display version history for QuickFolders");
if (!ask || confirm(sPrompt + " " + pureVersion + "?")) {
util.openURL(null,
util.makeUriPremium("http://quickfolders.org/version.html")
util.makeUriPremium("https://quickfolders.org/version.html")
+ "#" + pureVersion);
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions chrome/content/options.xul
Original file line number Diff line number Diff line change
Expand Up @@ -990,9 +990,9 @@
</description>
<vbox height="70">
<button id="L0"
href="http://quickfolders.org/"
href="https://quickfolders.org/"
tooltiptext="quickfolders.org"
onclick="util.openURL(event,'http://quickfolders.org/'); setTimeout(function() { window.close(); });">
onclick="util.openURL(event,'https://quickfolders.org/'); setTimeout(function() { window.close(); });">
<label width="270">&qf.label.homePage;</label>
</button>
</vbox>
Expand Down Expand Up @@ -1032,7 +1032,7 @@
<div id="L2"
class="button"
tooltiptext="quickfolders.org/bugs.html"
onclick="util.openURL(event,'http://quickfolders.org/bugs.html')">
onclick="util.openURL(event,'https://quickfolders.org/bugs.html')">
<label>&qf.label.bugzilla;</label>
</div>
</row>
Expand All @@ -1044,7 +1044,7 @@
</description>
<div id="L3"
class="button"
tooltiptext="http://quickfolders.org/version.html"
tooltiptext="https://quickfolders.org/version.html"
onclick="options.showVersionHistory(this, false);
setTimeout(function() { window.close(); });
return true;">
Expand Down
2 changes: 1 addition & 1 deletion chrome/content/qf-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ QuickFolders.Styles = {
st.setProperty(attribute, value, ((important) ? "important" : ""));
}
else {
if (origProperty=="");
// if (origProperty=="");
st.setProperty(attribute, value, ((important) ? "important" : ""));
foundRule = true;
}
Expand Down
33 changes: 1 addition & 32 deletions chrome/content/quickfolders-filterList.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,38 +444,7 @@ QuickFolders.FilterList = {
if (focusSearchBox)
searchBox.focus();

} ,

validateFilterTargets: function(sourceURI, targetURI) {
// fix any filters that might still point to the moved folder.
// 1. nsIMsgAccountManager loop through list of servers
try {
const Ci = Components.interfaces,
util = QuickFolders.Util;
let Accounts = util.Accounts,
acctMgr = Components.classes["@mozilla.org/messenger/account-manager;1"]
.getService(Ci.nsIMsgAccountManager);
for (let a=0; a<Accounts.length; a++) {
let account = Accounts[a];
if (account.incomingServer && account.incomingServer.canHaveFilters )
{
let srv = account.incomingServer.QueryInterface(Ci.nsIMsgIncomingServer);
QuickFolders.Util.logDebugOptional("filters", "checking account for filter changes: " + srv.prettyName);
// 2. getFilterList
let filterList = srv.getFilterList(msgWindow).QueryInterface(Ci.nsIMsgFilterList);
// 3. use nsIMsgFilterList.matchOrChangeFilterTarget(oldUri, newUri, false)
if (filterList) {
filterList.matchOrChangeFilterTarget(sourceURI, targetURI, false)
}
}
}
}
catch(ex) {
QuickFolders.Util.logException("Exception in QuickFolders.FilterList.validateFilterTargets ", ex);
}

}

}

};

126 changes: 90 additions & 36 deletions chrome/content/quickfolders-interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,6 @@ QuickFolders.Interface = {
model = QuickFolders.Model;
let cat = this.CategoryMenu,
showToolIcon = prefs.isShowToolIcon && !QuickFolders.FilterWorker.FilterMode;
if (prefs.isDebugOption("categories")) debugger;
if (cat) {
// don't show if ALWAYS and NEVER are the only ones that are references by tabs
let catArray = model.Categories,
Expand All @@ -918,10 +917,17 @@ QuickFolders.Interface = {
}
cat.style.display = (showToolIcon || isCustomCat) ? '-moz-inline-box' : 'none';
cat.collapsed = (!isCustomCat);
if (this.currentActiveCategories && !catArray.includes(this.currentActiveCategories)) {
// make sure all tabs are visible in case we delete the last category!
this.selectCategory(FCat.ALL);
}

if (this.currentActiveCategories) {
if (this.currentActiveCategories == FCat.UNCATEGORIZED) // [issue 72] Category "_Uncategorized" will show all categories after moving a folder to another
this.selectCategory(FCat.UNCATEGORIZED);
else {
if (!catArray.includes(this.currentActiveCategories)) {
// make sure all tabs are visible in case we delete the last category!
this.selectCategory(FCat.ALL);
}
}
}


if (prefs.getBoolPref('collapseCategories'))
Expand Down Expand Up @@ -952,7 +958,8 @@ QuickFolders.Interface = {
try {
if (lCatCount > 0 && menuList && menuPopup) {
let activeCatsList = this.currentActiveCategories,
cats = activeCatsList ? activeCatsList.split('|') : [];
cats = activeCatsList ? activeCatsList.split('|') : [],
isMultiCategories = prefs.getBoolPref('premium.categories.multiSelect');
util.clearChildren(menuPopup,true);

menuPopup.appendChild(this.createMenuItem(
Expand All @@ -964,12 +971,13 @@ QuickFolders.Interface = {
if (category!=FCat.ALWAYS && category!=FCat.NEVER) {
let menuItem = this.createMenuItem(category, category, 'menuitem-iconic');
// add checkbox for multiple category selection
if (prefs.getBoolPref('premium.categories.multiSelect')) {
if (isMultiCategories) {
// multi selection
if (cats.includes(category))
if (cats.includes(category)) {
menuItem.setAttribute("checked", true);
if (isPostbox)
menuItem.setAttribute("type","checkbox");
if (isPostbox)
menuItem.setAttribute("type","checkbox");
}
}
menuPopup.appendChild(menuItem);
}
Expand All @@ -991,8 +999,14 @@ QuickFolders.Interface = {
menuPopup.appendChild(this.createIconicElement('menuseparator','*'));
}
if (isUncat) {
let s = this.getUIstring("qfUncategorized","(Uncategorized)");
menuPopup.appendChild(this.createMenuItem(FCat.UNCATEGORIZED , s, 'menuitem-iconic'));
let s = this.getUIstring("qfUncategorized","(Uncategorized)"),
itemUncat = this.createMenuItem(FCat.UNCATEGORIZED , s, 'menuitem-iconic');
menuPopup.appendChild(itemUncat);
if (cats.includes(FCat.UNCATEGORIZED) && isMultiCategories) {
itemUncat.setAttribute("checked", true);
if (isPostbox)
menuItem.setAttribute("type","checkbox");
}
}
if (isNever) {
let s = this.getUIstring("qfShowNever","Never Show (Folder Alias)");
Expand Down Expand Up @@ -1636,13 +1650,24 @@ QuickFolders.Interface = {
// first let's reset anything in the quickMove if we are in single message mode:
QuickMove.resetList();
}
let messageUris = util.getSelectedMsgUris();
if (messageUris) {
let currentFolder = util.CurrentFolder;
while (messageUris.length) {
QuickMove.add(messageUris.pop(), currentFolder, iscopy);
// is the folder tree highlighted?
// [issue 75] support moving folders through quickMove
if (eventTarget && eventTarget.getAttribute("id") == "folderTree") {
let folders = gFolderTreeView.getSelectedFolders();
if (folders.length) {
QuickMove.addFolders(folders, iscopy);
QuickMove.update();
}
QuickMove.update();
}
else {
let messageUris = util.getSelectedMsgUris();
if (messageUris) {
let currentFolder = util.CurrentFolder;
while (messageUris.length) {
QuickMove.add(messageUris.pop(), currentFolder, iscopy);
}
QuickMove.update();
}
}
isHandled = true;
}
Expand Down Expand Up @@ -3106,8 +3131,12 @@ QuickFolders.Interface = {
}
folder.updateFolder(msgWindow);
if (isCurrent) {
if (typeof(gFolderDisplay.show) != 'undefined')
gFolderDisplay.show(folder);
if (typeof(gFolderDisplay.show) != 'undefined') {
setTimeout(
function() {gFolderDisplay.show(folder);},
100
);
}
}
}
else { // Postbox / SeaMonkey
Expand Down Expand Up @@ -5522,7 +5551,7 @@ QuickFolders.Interface = {

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

lastTabSelected: null,
Expand Down Expand Up @@ -6903,16 +6932,37 @@ QuickFolders.Interface = {
QuickFolders.FilterWorker.toggle_FilterMode(active);
} ,

moveFolder: function moveFolder(fromFolder, targetFolder, arrCount) {
// [Bug 26517] support multiple folder moves - addeed "count" and transmitting URIs
moveFolders: function moveFolders(fromFolders, targetFolder) {
// [Bug 26517] support multiple folder moves - added "count" and transmitting URIs
const Cc = Components.classes,
Ci = Components.interfaces,
util = QuickFolders.Util;

let arrCount = fromFolders.length;

function isChildFolder(f) {
for (let i=0; i<fromFolders.length; i++) {
if (f == fromFolders[i]) continue;
let p = f;
while (p = p.parent) {
if (p == fromFolders[i]) return true;
}
}
return false;
}
// make sure this is not a child of previous folders!
// in this case, it will be moved anyway through its parent
// and may lead to a problem (remaining folders are not moved)
let newFolders = [];
for (let j=0; j<arrCount; j++) {
let fld = fromFolders[j];
if (isChildFolder(fld)) continue; // skip
newFolders.push(fld);
}
arrCount = newFolders.length;

let lastFolder,
sPrompt = util.getBundleString("qfConfirmMoveFolder", "Really move folder {0} to {1}?"),
whatIsMoved = arrCount ?
(arrCount==1 ? fromFolder[0].prettyName : "[" + arrCount + " folders]") : fromFolder.prettyName;
whatIsMoved = (arrCount==1 ? newFolders[0].prettyName : "[" + arrCount + " folders]");

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

let cs = Cc["@mozilla.org/messenger/messagecopyservice;1"].getService(Ci.nsIMsgCopyService);
try {
let toCount = arrCount || 1, // for the moment only support dragging one folder.
ap = util.Application,
isNewArray = (ap == 'Thunderbird' || ap == 'SeaMonkey');
for (let i = 0; i < toCount; i++) {
let ap = util.Application,
isNewArray = (ap == 'Thunderbird' || ap == 'SeaMonkey'),
countChanges = 0;
for (let i = 0; i < newFolders.length; i++) {
let folders = new Array,
fld = arrCount ? fromFolder[i] : fromFolder,
fld = newFolders[i],
fromURI = fld.URI;

lastFolder = fld; // keep track of last folder in case of a problem.
folders.push(fld); // dt.mozGetDataAt("text/x-moz-folder", i).QueryInterface(Ci.nsIMsgFolder)
let array = isNewArray ?
Expand All @@ -6936,6 +6987,9 @@ QuickFolders.Interface = {

if (!isNewArray)
array.AppendElement(fld);
if (util.CurrentFolder == fld) {
this.goUpFolder();
}

// cannot move if the target Folder is in a different account?
// folders[0]\ == targetFolder.server
Expand All @@ -6953,14 +7007,14 @@ QuickFolders.Interface = {
// get encoded folder Name:
let slash = fromURI.lastIndexOf('/'),
encName = fromURI.substring(slash),
newURI = targetFolder.URI + encName,
countChanges = QuickFolders.Model.moveFolderURI(fromURI, newURI);
if (countChanges)
this.updateFolders(true, true);
newURI = targetFolder.URI + encName;
countChanges += QuickFolders.Model.moveFolderURI(fromURI, newURI);

// Filter Validation!
setTimeout(function() { QuickFolders.FilterList.validateFilterTargets(fromURI, newURI); });
setTimeout(function() { QuickFolders.Util.validateFilterTargets(fromURI, newURI); });
}
if (countChanges)
this.updateFolders(true, true);
}
catch(ex) {
sPrompt = util.getBundleString("qfCantMoveFolder", "Folder {0} cannot be moved.");
Expand Down
Loading

0 comments on commit ac43360

Please sign in to comment.