Skip to content

Commit d6d8194

Browse files
committed
4.21.2
1 parent 6a4eb68 commit d6d8194

File tree

12 files changed

+126
-13
lines changed

12 files changed

+126
-13
lines changed

build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ rem "C:\Program Files\7-Zip\7z" a -xr!.svn quickFolders.zip install.rdf chrome.m
1010
echo %quickFoldersRev% > revision.txt
1111
move QuickFolders*.xpi "..\..\Release\_Test Versions\4.21\"
1212
pwsh -Command "Start-Sleep -m 150"
13-
rename QuickFoldersWeb.zip QuickFolders-wx-4.21.1pre%quickFoldersRev%.xpi
13+
rename QuickFoldersWeb.zip QuickFolders-wx-4.21.2pre%quickFoldersRev%.xpi

chrome/content/quickfolders-interface.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5778,7 +5778,7 @@ QuickFolders.Interface = {
57785778
const util = QuickFolders.Util,
57795779
prefs = QuickFolders.Preferences;
57805780
try {
5781-
let tabMode = tabInfo ? util.getTabMode(tabInfo) : this.CurrentTabMode
5781+
let tabMode = tabInfo ? util.getTabMode(tabInfo) : this.CurrentTabMode;
57825782
util.logDebugOptional("interface.currentFolderBar", 'initCurrentFolderTab(' + (folder ? folder.prettyName : 'null') + ')\n'
57835783
+ "tabMode: " + tabMode);
57845784
this.hoistCurrentFolderBar(currentFolderTab, tabInfo);
@@ -6822,7 +6822,8 @@ QuickFolders.Interface = {
68226822
if (selectedTab>=0) {
68236823
let tab = util.getTabInfoByIndex(tabmail, selectedTab);
68246824
if (tab) {
6825-
tabMode = util.getTabMode(tab); // test in Postbox
6825+
tabMode = util.getTabMode(tab);
6826+
util.logDebug("CurrentTabMode() \n selectedTab = " + selectedTab + "\n tabMode = " + tabMode);
68266827
if (tabMode == "glodaSearch" && tab.collection) { //distinguish gloda search result
68276828
tabMode = "glodaSearch-result";
68286829
}

chrome/content/quickfolders-util.js

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ QuickFolders.Util = {
6666
_isCSSGradients: -1,
6767
_isCSSRadius: -1,
6868
_isCSSShadow: true,
69-
HARDCODED_CURRENTVERSION : "4.21.1", // will later be overriden call to AddonManager
69+
HARDCODED_CURRENTVERSION : "4.21.2", // will later be overriden call to AddonManager
7070
HARDCODED_EXTENSION_TOKEN : ".hc",
7171
ADDON_ID: "quickfolders@curious.be",
7272
FolderFlags : { // nsMsgFolderFlags
@@ -702,7 +702,7 @@ QuickFolders.Util = {
702702
} ,
703703

704704
// find the first mail tab representing a folder and open it
705-
ensureFolderViewTab: function ensureFolderViewTab() {
705+
ensureFolderViewTab: function ensureFolderViewTab(folder) {
706706
const util = QuickFolders.Util;
707707
// TB 3 bug 22295 - if a single mail tab is opened this appears to close it!
708708
let found=false,
@@ -718,15 +718,28 @@ QuickFolders.Util = {
718718
// switchToTab
719719
// iterate tabs
720720
let tabInfoCount = util.getTabInfoLength(tabmail);
721+
let firstFound = -1;
721722
for (let i = 0; i < tabInfoCount; i++) {
722723
let info = util.getTabInfoByIndex(tabmail, i);
723724
if (info && this.getTabMode(info) == util.mailFolderTypeName) {
724725
util.logDebugOptional ("mailTabs","switching to tab: " + info.title);
725-
tabmail.switchToTab(i);
726-
found = true;
727-
break;
726+
if (firstFound<0) firstFound = i;
727+
if (!folder)
728+
break;
729+
else {
730+
let fD = info ? info.folderDisplay : null;
731+
if (fD.view && fD.view.displayedFolder && folder.URI == fD.view.displayedFolder.URI) {
732+
firstFound = i;
733+
break; // this is the one we want
734+
}
735+
}
728736
}
729737
}
738+
if (firstFound>=0) {
739+
tabmail.switchToTab(firstFound);
740+
found = true;
741+
}
742+
730743
// if it can't find a tab with folders ideally it should call openTab to display a new folder tab
731744
for (let i=0;(!found) && i < tabInfoCount; i++) {
732745
let info = util.getTabInfoByIndex(tabmail, i);
@@ -919,12 +932,23 @@ QuickFolders.Util = {
919932
return null;
920933
}
921934

935+
922936
// [issue 132] Shift-M opens a new tab after moving the message...
923937
// if we move the email and are in a single message window, we need to jump to the next unread mail first!
938+
let tabMail = document.getElementById("tabmail"),
939+
currentTabInfo = tabMail.tabInfo[QuickFolders.tabContainer.selectedIndex],
940+
// currentTabId = currentTabInfo.tabId,
941+
currentTabSelIdx = QuickFolders.tabContainer.selectedIndex,
942+
moveFromSingleMailTab = false,
943+
isGoNext = prefs.getBoolPref("quickMove.gotoNextMsgAfterMove");
924944
if (!makeCopy && QuickFolders.Interface.CurrentTabMode == "message") {
945+
moveFromSingleMailTab = true;
925946
// either go to the next mail... or close the tab
926-
if (prefs.getBoolPref("quickMove.gotoNextMsgAfterMove"))
947+
if (isGoNext) {
927948
goDoCommand('cmd_nextMsg');
949+
QuickFolders.Interface.ensureCurrentFolder();
950+
}
951+
document.getElementById('messagepane').focus();
928952
}
929953

930954
step = 5;
@@ -941,9 +965,20 @@ QuickFolders.Util = {
941965
'listener = QuickFolders.CopyListener\n' +
942966
'msgWindow = ' + msgWindow + '\n' +
943967
'allowUndo = true)');
968+
let currentTab = tabMail.selectedTab;
944969
cs.CopyMessages(sourceFolder, messageList, targetFolder, isMove, QuickFolders.CopyListener, msgWindow, true);
945970
step = 8;
946971
util.touch(targetFolder); // set MRUTime
972+
if (moveFromSingleMailTab && currentTabSelIdx > 0 && !isGoNext) {
973+
// close single message tab:
974+
util.logDebug("moveMessages: currentTabSelIdx = " + currentTabSelIdx);
975+
if (currentTabSelIdx == QuickFolders.tabContainer.selectedIndex) {
976+
// TO DO: goto corresponding folder tab or at least tab 0
977+
util.ensureFolderViewTab(sourceFolder);
978+
// now close the tab Tb opened.
979+
tabMail.closeTab(currentTab, false);
980+
}
981+
}
947982
return messageIdList; // we need the first element for further processing
948983
}
949984
catch(e) {
@@ -999,6 +1034,7 @@ QuickFolders.Util = {
9991034
} ,
10001035

10011036
getTabInfoByIndex: function getTabInfoByIndex(tabmail, idx) {
1037+
this.logDebug("getTabInfoByIndex(tabmail, " + idx + ") tabInfo: " + tabmail.tabInfo);
10021038
if (tabmail.tabInfo && tabmail.tabInfo.length)
10031039
return tabmail.tabInfo[idx];
10041040
if (tabmail.tabOwners)

chrome/content/quickfolders.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ var QuickFolders_PrepareSessionStore = function () {
535535
orgRestore(aTabmail, aPersistedState);
536536
let txt;
537537
try {
538-
aPersistedState.QuickFoldersCategory || "(no category)";
538+
txt = aPersistedState.QuickFoldersCategory || "(no category)";
539539
} catch(ex) {;}
540540
util.logDebug("restored tabs: " + txt);
541541
let rdf = Components.classes['@mozilla.org/rdf/rdf-service;1'].getService(CI.nsIRDFService),

chrome/skin/mac/style.css

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/* platform styles - Mac */
2+
#qf-header-container {
3+
padding-bottom: 0.9em;
4+
}
5+
#QuickFolders-Options-Tabbox tab {
6+
padding: 2px 0;
7+
margin-bottom: -3px;
8+
}
9+
10+
#QuickFolders-Options-quickhelp {
11+
font-size: 10pt !important;
12+
}
13+
14+
/* #btnLicense - note this will get special rules for Mac */
15+
.niceFont,
16+
.niceFont * {
17+
font-family: initial !important; /* or inherit ? */
18+
font-size: 10pt !important;
19+
}
20+
21+
#firstName, #lastName {
22+
width: 12em;
23+
}
24+
/*
25+
#QuickFolders-Options-Tabbox tab .tab-text {
26+
margin-top: -6px;
27+
}
28+
#QuickFolders-Options-Tabbox tab .tab-icon {
29+
margin-top: -3px;
30+
}
31+
#QuickFolders-Options-Tabbox tabpanels {
32+
padding-top: 1em;
33+
}
34+
#QuickFolders-Options-Tabbox tab .tab-icon {
35+
margin: -15px 0px -6px 0px;
36+
}
37+
*/
38+
39+
#QuickFolders-CurrentFolderTools toolbarbutton {
40+
max-width: 20px;
41+
padding-left: 0px;
42+
padding-right: 0px;
43+
}
44+
/** make sure empty labels don't take up space **/
45+
#QuickFolders-CurrentFolderTools toolbarbutton > .toolbarbutton-text,
46+
#QuickFolders-oneButtonPanel toolbarbutton > .toolbarbutton-text {
47+
visibility: collapse;
48+
margin: 0 !important;
49+
}
50+
51+
/* Mac width fix */
52+
#QuickFolders-Options-Tabbox tab:not([selected="true"]) .tab-text{
53+
max-width:80px;
54+
text-overflow: ellipsis;
55+
}

chrome/skin/unix/style.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* platform styles - Linux */
2+
#QuickFolders-Options-Tabbox tab {
3+
padding: 0.2em 0.6em;
4+
}
5+
6+
toolbar.quickfolders-flat ,
7+
toolbar.quickfolders-pills {
8+
/* in linux -moz-appearance is 'toolbar' and this overrides any coloring of background / borders */
9+
-moz-appearance: none !important;
10+
}
11+
12+
#qf-options {
13+
min-height: 640px;
14+
}

chrome/skin/win/about.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* fix a problem in about dialog: double contributorsBox */
2+
#contributorsBox.indent { display:none; }

chrome/skin/win/qf-platform.xul

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?xml version="1.0" encoding="UTF-8"?>

chrome/skin/win/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/* platform styles - Windows */
2+
#QuickFolders-Options-Tabbox tab {
3+
padding: 0.2em 0.6em;
4+
}

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"manifest_version": 2,
44
"name": "QuickFolders",
55
"description": "Bookmark your favorite mail folders in Thunderbird.",
6-
"version": "4.21.1",
6+
"version": "4.21.2",
77
"developer": {
88
"name": "Axel Grude",
99
"url": "https://quickfolders.org/index.html"

0 commit comments

Comments
 (0)