mirror of
https://github.com/Ximi1970/systray-x.git
synced 2026-05-07 10:15:27 +02:00
WIP new tb91 api test
This commit is contained in:
2
dist/arch/gnome/PKGBUILD
vendored
2
dist/arch/gnome/PKGBUILD
vendored
@@ -12,7 +12,7 @@ depends=(
|
||||
'qt5-base'
|
||||
'gnome-shell-extension-appindicator'
|
||||
'thunderbird>=68'
|
||||
'thunderbird<=89'
|
||||
'thunderbird<=91'
|
||||
)
|
||||
makedepends=(
|
||||
'git'
|
||||
|
||||
2
dist/arch/kde/PKGBUILD
vendored
2
dist/arch/kde/PKGBUILD
vendored
@@ -12,7 +12,7 @@ depends=(
|
||||
'qt5-base'
|
||||
'knotifications'
|
||||
'thunderbird>=68'
|
||||
'thunderbird<=89'
|
||||
'thunderbird<=91'
|
||||
)
|
||||
makedepends=(
|
||||
'git'
|
||||
|
||||
2
dist/arch/minimal/PKGBUILD
vendored
2
dist/arch/minimal/PKGBUILD
vendored
@@ -11,7 +11,7 @@ license=(MPL-2.0)
|
||||
depends=(
|
||||
'qt5-base'
|
||||
'thunderbird>=68'
|
||||
'thunderbird<=89'
|
||||
'thunderbird<=91'
|
||||
)
|
||||
makedepends=(
|
||||
'git'
|
||||
|
||||
2
dist/deb/gnome/debian.control
vendored
2
dist/deb/gnome/debian.control
vendored
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-d
|
||||
|
||||
Package: systray-x-gnome
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, gnome-shell-extension-appindicator, thunderbird (>= 1:68), thunderbird (<= 1:89)
|
||||
Depends: ${shlibs:Depends}, gnome-shell-extension-appindicator, thunderbird (>= 1:68), thunderbird (<= 1:91)
|
||||
Description: SysTray-X is a system tray extension for Thunderbird 68+ (GNOME).
|
||||
This version is optimized for the GNOME desktop.
|
||||
The add-on uses the WebExtension API's to control an external system
|
||||
|
||||
2
dist/deb/kde/debian.control
vendored
2
dist/deb/kde/debian.control
vendored
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-d
|
||||
|
||||
Package: systray-x
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, thunderbird (>= 1:68), thunderbird (<= 1:89)
|
||||
Depends: ${shlibs:Depends}, thunderbird (>= 1:68), thunderbird (<= 1:91)
|
||||
Description: SysTray-X is a system tray extension for Thunderbird 68+ (KDE).
|
||||
This version is optimized for the KDE desktop.
|
||||
The add-on uses the WebExtension API's to control an external system
|
||||
|
||||
2
dist/deb/minimal/debian.control
vendored
2
dist/deb/minimal/debian.control
vendored
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 4.1.16), zip, g++, libx11-dev, qt5-qmake, qtbase5-d
|
||||
|
||||
Package: systray-x-minimal
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, thunderbird (>= 1:68), thunderbird (<= 1:89)
|
||||
Depends: ${shlibs:Depends}, thunderbird (>= 1:68), thunderbird (<= 1:91)
|
||||
Description: SysTray-X is a system tray extension for Thunderbird 68+ (non-GNOME,non-KDE).
|
||||
This version is for non-KDE and non-GNOME desktops.
|
||||
The add-on uses the WebExtension API's to control an external system
|
||||
|
||||
4
dist/rpm/gnome/systray-x-gnome.spec
vendored
4
dist/rpm/gnome/systray-x-gnome.spec
vendored
@@ -33,10 +33,10 @@ BuildRequires: pkgconfig(x11)
|
||||
Requires: gnome-shell-extension-appindicator
|
||||
%if 0%{?fedora_version} || 0%{?centos_version}
|
||||
Requires: thunderbird >= 68
|
||||
Requires: thunderbird <= 89
|
||||
Requires: thunderbird <= 91
|
||||
%else
|
||||
Requires: MozillaThunderbird >= 68
|
||||
Requires: MozillaThunderbird <= 89
|
||||
Requires: MozillaThunderbird <= 91
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
4
dist/rpm/kde/systray-x.spec
vendored
4
dist/rpm/kde/systray-x.spec
vendored
@@ -34,12 +34,12 @@ BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: kf5-knotifications-devel
|
||||
Requires: kf5-knotifications
|
||||
Requires: thunderbird >= 68
|
||||
Requires: thunderbird <= 89
|
||||
Requires: thunderbird <= 91
|
||||
%else
|
||||
BuildRequires: knotifications-devel
|
||||
Requires: libKF5Notifications5
|
||||
Requires: MozillaThunderbird >= 68
|
||||
Requires: MozillaThunderbird <= 89
|
||||
Requires: MozillaThunderbird <= 91
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
4
dist/rpm/minimal/systray-x-minimal.spec
vendored
4
dist/rpm/minimal/systray-x-minimal.spec
vendored
@@ -32,10 +32,10 @@ BuildRequires: pkgconfig(Qt5DBus)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
%if 0%{?fedora_version} || 0%{?centos_version}
|
||||
Requires: thunderbird >= 68
|
||||
Requires: thunderbird <= 89
|
||||
Requires: thunderbird <= 91
|
||||
%else
|
||||
Requires: MozillaThunderbird >= 68
|
||||
Requires: MozillaThunderbird <= 89
|
||||
Requires: MozillaThunderbird <= 91
|
||||
%endif
|
||||
|
||||
%description
|
||||
|
||||
@@ -82,6 +82,16 @@ SysTrayX.Messaging = {
|
||||
|
||||
// Try to catch the window state
|
||||
browser.windows.onFocusChanged.addListener(SysTrayX.Window.focusChanged);
|
||||
|
||||
// Test new API from TB91
|
||||
browser.folders.onFolderInfoChanged.addListener(
|
||||
SysTrayX.Messaging.listenerTest
|
||||
);
|
||||
},
|
||||
|
||||
listenerTest: function (folder, folderInfo) {
|
||||
console.debug("Folder: " + JSON.stringify(folder));
|
||||
console.debug("FolderInfo: " + JSON.stringify(folderInfo));
|
||||
},
|
||||
|
||||
onCloseButton: function () {
|
||||
@@ -656,7 +666,14 @@ async function start() {
|
||||
await getIcon();
|
||||
|
||||
// Get all accounts
|
||||
SysTrayX.Messaging.accounts = await browser.accounts.list();
|
||||
if (SysTrayX.browserInfo.majorVersion < 91) {
|
||||
SysTrayX.Messaging.accounts = await browser.accounts.list();
|
||||
} else {
|
||||
console.debug("Getting accounts with folders");
|
||||
|
||||
const includeFolders = true;
|
||||
SysTrayX.Messaging.accounts = await browser.accounts.list(includeFolders);
|
||||
}
|
||||
|
||||
// Get folder tree
|
||||
SysTrayX.Messaging.folderTree = getFolderTree(
|
||||
@@ -670,6 +687,30 @@ async function start() {
|
||||
// Get the count type
|
||||
SysTrayX.Messaging.countType = await getCountType();
|
||||
|
||||
// Test new API calls TB91
|
||||
|
||||
/*
|
||||
const folder = {
|
||||
accountId: "account1",
|
||||
path: "/Inbox",
|
||||
};
|
||||
*/
|
||||
|
||||
/*
|
||||
const folder = {
|
||||
accountId: "account1",
|
||||
name: "Inbox",
|
||||
path: "/Inbox",
|
||||
type: "inbox",
|
||||
subFolders: [],
|
||||
};
|
||||
*/
|
||||
|
||||
/*
|
||||
const mailFolderInfo = await browser.folders.getFolderInfo(folder);
|
||||
console.debug("MailFolderInfo: " + JSON.stringify(mailFolderInfo));
|
||||
*/
|
||||
|
||||
// Setup the link first
|
||||
SysTrayX.Link.init();
|
||||
|
||||
|
||||
@@ -460,8 +460,9 @@ async function getFilters() {
|
||||
|
||||
console.debug("Checked filters: " + JSON.stringify(newFilters));
|
||||
|
||||
return newFilters;
|
||||
}
|
||||
// return newFilters;
|
||||
return filters;
|
||||
}
|
||||
|
||||
function onFiltersError() {
|
||||
return undefined;
|
||||
|
||||
@@ -18,7 +18,18 @@ SysTrayX.Accounts = {
|
||||
* Be aware that the data is only avaiable inside the callback
|
||||
*/
|
||||
getAccounts: async function () {
|
||||
return await browser.accounts.list();
|
||||
if (BrowserInfo.version.split(".")[0] < 91) {
|
||||
return await browser.accounts.list();
|
||||
} else {
|
||||
console.debug("Get account with folders");
|
||||
|
||||
const includeFolders = true;
|
||||
const accounts = await browser.accounts.list(includeFolders);
|
||||
|
||||
console.debug("Options accounts: " + JSON.stringify(accounts));
|
||||
|
||||
return accounts;
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"gecko": {
|
||||
"id": "systray-x@Ximi1970",
|
||||
"strict_min_version": "68.0",
|
||||
"strict_max_version": "89.*"
|
||||
"strict_max_version": "91.*"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user