Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Thunderbird v68.0? #47

Open
qcybb opened this issue Sep 6, 2019 · 72 comments
Open

Support for Thunderbird v68.0? #47

qcybb opened this issue Sep 6, 2019 · 72 comments

Comments

@qcybb
Copy link

qcybb commented Sep 6, 2019

Could you please add support for Thunderbird v68.0?

https://www.thunderbird.net/en-US/thunderbird/68.0/releasenotes/

@afettouhi
Copy link

If this doesn't get Thunderbird 68 support try looking at birdtray as an alternative.

@DissCent
Copy link

DissCent commented Sep 8, 2019

I highly doubt that this extension will be working for TB 68+. If I understand the release notes correctly, only webextension based addons will be supported from now on.

Still a shame that the TB devs don't want to support this feature natively.

@koroki
Copy link

koroki commented Sep 11, 2019

Seams that there is some posibilities...

https://developer.thunderbird.net/add-ons/updates

@katonagl
Copy link

Birdtray also does not work with Thunderbird 68.

Is there any chance it will get updated for Tb68?

@afettouhi
Copy link

Birdtray also does not work with Thunderbird 68.

Is there any chance it will get updated for Tb68?

Yes, it does I am using it right now with Tb68 and it works.

@katonagl
Copy link

Does birdtray show unread count?
Additionally birdtray says, it does not work with Tb68: https://github.com/gyunaev/birdtray
also see this bug submitted by me: gyunaev/birdtray#127

@afettouhi
Copy link

Yes, in my case birdtray shows uncount for my two mail accounts (one gmail the other one is an exchange account).

@katonagl
Copy link

Could you notify gyunaev about it?
I hope firetray will work, but birdtray is also a nice solution.

@afettouhi
Copy link

Ok, I will.

@koroki
Copy link

koroki commented Sep 30, 2019

I prefer to have only 1 addon instead to have two programs...

@afettouhi
Copy link

I prefer to have only 1 addon instead to have two programs...

I agree with you there but all the current addons that used to work don't work or are either abandoned. I still don't understand why Thunderbird never implemented this feature. The original bug report for that issue is now closed with the argument that tray icons are a thing of the past.

@katonagl
Copy link

Could you link the original bug report for Tb?

@afettouhi
Copy link

This should be it.

https://bugzilla.mozilla.org/show_bug.cgi?id=208923

@koroki
Copy link

koroki commented Sep 30, 2019

A topic from 16 years old...

@afettouhi
Copy link

Yes, it is a very very old issue.

@koroki
Copy link

koroki commented Sep 30, 2019

I really I don't understand why is not an available feature.
In fact, I didn't find any other email client that has it.

@afettouhi
Copy link

Yup, I can only agree with you there.

@lgbaldoni
Copy link

So, to anyone in the know: is this extension actually portable to 68+?

@agasoft
Copy link

agasoft commented Oct 8, 2019

SO sad because this project dyeing once again...

@lgbaldoni
Copy link

@agasoft there's a branch where the work has apparently started.

@knobsam
Copy link

knobsam commented Oct 8, 2019

@Ximi1970
Hey there, a small update for your work:
I'm on Fedora 30 with Gnome and have Thunderbird 68.1.0 (64bit) installed. I can build and install the plugin, but I do not have any symbol/tray icon.
Can I produce debug output or something else to help?

Best,

Samuel

@lbratch
Copy link

lbratch commented Oct 8, 2019

You can see error output both in Tools > Developer Tools > Error Console, and just in the terminal if you launched Thunderbird from one.

I get errors relating to the logging system. Disabling logging (change all log.foo() to console.log()) seems to let the addon load, but it then causes Thunderbird to segfault. It did get as far as creating the tray icon once, but still segfaulted even in that case.

@Ximi1970
Copy link
Owner

@knobsam, @lbratch I am trying to pickup the project again. The TB developers removed some XUL elements (and some API calls (log)) again. This causes the plugin to exit in the initialization phase so it skips the code that is crashing TB in the other versions.
I refactored the missing parts but now the plugin is crashing TB again,
There is some kind of problem in the plugins windows management functions (since TB64) I have not found yet.

If you remove this line in the FireTray/src/chrome/content/overlay.js in the experimental-next branch
this.winId = firetray.Handler.registerWindow(win);,
the plugin can be installed without instantly crashing TB but it crashes as soon as one clicks on an item of the tray icon.

@indigoxela
Copy link

indigoxela commented Oct 16, 2019

@Ximi1970 many thanks for trying!

I tried myself to bring it up again, but failed (and gave up and switched to BirdTray for now, which works for me). My javascript skills just aren't sufficient for this project.

I succeeded in getting FireTray recognized and installed on Linux with following steps:

  1. create a manifest.json with legacy type "xul"
  "default_locale": "en",
  "legacy": {
    "type": "xul",
    "options": {
      "page": "chrome://firetray/content/options.xul"
    }
  }
  1. adding the requrired _locales directory, containing at least one language (en/messages.json)

  2. Replaced all those custom logging thingies with console.log() throughout the code

  3. Tried to adapt the src/chrome/content/options.xul as required (all xul files need some changes).

It installs fine but doesn't work at all (settings page loads, but no settings get saved, no tray icon at all). At least it doesn't crash on Linux.
Unfortunately I wasn't able to understand, how all this ctypes stuff works in TB68. As far as I can tell, it needs a ChromeWorker now, which has access to ctypes by default. ("resource://gre/modules/ctypes.jsm" is totally gone deprecated in TB68).

@Ximi1970
Copy link
Owner

@indigoxela thank you for trying. All extra info is welcome.
But luckily ctypes.jsm is still there but it is deprecated and could be removed any time. Also the GTK tray icon is already declared obsolete for many years...
If they decide to remove it, this plugin is dead. Unless there is another way to connect to external libraries (GTK, libappindicator) to get the tray icon functions and window management functions.

We really need a new way to get the tray icon. Was even thinking in creating a patch for TB itself and solve a TB issue of 16 years old.
@afettouhi, thanks for posting the link, I did see it when I started patching Firetray a year ago ;-)
There is already a tray icon for Windows but it needs to be enhanced. It is a nice starting point for me to add more functionality and more platforms.

@afettouhi
Copy link

afettouhi commented Oct 17, 2019

Yeah it would be awesome if Thunderbird finally got that 16 bug report implemented. But read the comments in the original report it is IMHO moronic almost to state that tray icons a thing of the past more less because Gnome now removes every fricking feature it can. Apologizing for being a bit inflammatory here.

@ivnish
Copy link

ivnish commented Oct 18, 2019

Today I had upgraded my Kubuntu from 19.04 to 19.10. Thunderbird was upgraded from 60.9 to 68. FireTray stopped work. I downgrade Thunderbird to 60.9 and I'm happy again :)

https://ubuntu.pkgs.org/19.04/ubuntu-updates-main-amd64/thunderbird_60.9.0+build1-0ubuntu0.19.04.1_amd64.deb.html

@Ri0n
Copy link

Ri0n commented Jan 2, 2020

I don't know what current TB API allows to do in extensions but in any case I think it pretty easy to implement a few applications which will use whatever frameworks they want and capable to show something in system tray. And this application then can communicate with TB extension via files/unix sockets/tcp/http/whatever is available for extensions.

as for me, I'm fine with Qt. As a KDE user I always have it loaded into memory and tray-only app should be quite tiny anyway.

And I believe this approach doesn't need any changes to TB itself.

Currently with KDE I have a kind of workaround. I set up TB window to minimize and hide from taskbar on close button and also keep its icon pinned to taskbar. Of course this icon doesn't show me amount of unread emails but at least I can see notifications.

@Ximi1970
Copy link
Owner

Ximi1970 commented Jan 2, 2020

@Ri0n this is the construction the TB developers want. And I do not like it very much.You need to take care of the distribution of two apps. One part that is in the TB store and the other part on github?
For the majority of users this is impossible to install and use.
It would be a lot easier if TB would also offer a system for the distribution of the second part. But I think that is not possible ATM.

@Ximi1970
Copy link
Owner

Ximi1970 commented Jan 2, 2020

@Ri0n maybe I will do both 😄

@loveless90
Copy link

I prefer something with Qt (lots of experience) but that would add an extra Qt dependency in TB which will not be accepted I think by the TB developers.
Gtk is used by TB so that would be acceptable but the GtkstatusIcon is officially obsolete.

You could register your own "StatusNotifierItem" and notify the user if there isn't a registered "StatusNotifierHost" and tell him how to fix it. So you should be independent of the respective implementations (libappindicator, kstatusnotifieritem). If it does really work this way.

https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/

@Ximi1970
Copy link
Owner

Ximi1970 commented Feb 6, 2020

I started the new plugin using the recommended TB solution. So it is going to be an add-on AND a companion app. Hopefully I can translate most of the features from the FireTray add-on to the new setup.
You can find the new add-on in this repository:

SysTray-X

Still very experimental and still needs a lot of work and research on how to solve / implement missing functionality.
No executables / packages will be provided for now. Package is not yet visible in the TB store.
The code is only tested on openSuSE Leap 15.1 and I am looking into the Windows build / install problems now.
Things that should work:

  • Icon selection
  • Mail box selection
  • System tray icon with unread mail number.
  • Show / hide to taskbar when the icon is clicked / icon menu is selected.

Things not working:

  • Full minimize into the tray
  • Starting new mail
  • etc

@lgbaldoni
Copy link

I packaged systray-x for openSUSE if anyone is interested.

@askembris
Copy link

I packaged systray-x for openSUSE if anyone is interested.

Thank you very much for this. I tried it on tumbleweed with KDE (19.12 apps, 5.66 frameworks).

It pulled in Thunderbird 68.5. It's recognised in the add-ons list but doesn't seem to show a tray icon. Closing the window exits Thunderbird as well.

Let me know if I can provide further debug info.

@Ximi1970
Copy link
Owner

Ximi1970 commented Feb 17, 2020

@lgbaldoni thanks for setting up the package. Did not have time to setup it yet (Ximi1970)

PS: Will implement your patch.

@Ximi1970
Copy link
Owner

@lgbaldoni Added the OBS files to the repo and patched the .pro.

@lgbaldoni
Copy link

@askembris my bad, please try it now

@askembris
Copy link

@askembris my bad, please try it now

OK, tried it. Here's what I got:
a) The tray icon appeared. Yay!
b) I have two IMAP accounts (both from Google). The number of unread emails only appears if I have unread messages in the second account. If I deactivate it from the preferences, no number is shown (even when there is unread e-mail in the first account).
c) The message count is always 1, regardless of how many unread messages there are in the mailbox.
d) Clicking on the icon minimises the window to the task bar (like clicking on the minimise button). It should close the window and remove it from the taskbar while running in the background, I guess.
e) Closing the window exits the program (and the tray icon disappears), where it should keep running in the background.
f) At a couple of points I lost the tray icon (I supposed something crashed), but I am not sure what transpired to reproduce it consistently.

I think it's a great start and you should keep up the good work!

Let me know once you update the package if you need more testing.

@Katarn
Copy link

Katarn commented Feb 19, 2020

@Ximi1970 Will SysTray-X support multiple Thunderbird instances (e.g. running different profiles)? It seems to me that this moment should be foreseen at the stage of architectural design.

@Ximi1970
Copy link
Owner

@Katarn I was already partially looking into the multiple instances. There is one big problem....
I can only get the TB window handle by (sub)-title search atm and all the instances have the same title, ending in "- Mozilla Thunderbird". The icon cannot make any distinction between the instances. Solution could be finding the correct window by PID (it is already in the experimental code but not used yet) but I still need to develop a nice way to parse the processes.
Other problem is starting multiple TBs. I tried starting two different version together but one got shot down somehow. Need to investigate the problem a bit more. Hopefully it is still allowed to start multiple instances.

But the first task is to get the main functionality back for Linux and Windows. Then I will hopefully be able to expand the basics to as much old functionality as possible ( and maybe extend with some new features )

If anybody has special wishes, please put them in the issue list of the new repository SysTray-X issues so I can easily track all problems, wishes and other remarks.

@Myppomeu
Copy link

@Ximi1970 Thanks for your work? Will you write patch for Thunderbird or only new addon + companion app?

@Ximi1970
Copy link
Owner

@Myppomeu I created a new add-on and companion app for Thunderbird: SysTray-X.
The add-on is functioning fine for Linux KDE platforms (openSuSE Leap 15.1, Kubuntu 19.10) and Windows 10 and has most of the basic features. You could compile it yourself but be aware that I only tested it on a small number of systems. You probably need to tweak the build somehow.

Sadly enough one of my favorite features is a bit difficult to implement with this new API: minimize when you click on the close button. The plugin does not "own" the TB window anymore and it is impossible to install handler to catch the "close".
Also "minimize on startup" is not as it should be but also here it is impossible to intercept or run code before TB is started completly. So you see probably a small flash of TB before the minimize is activated.

At the moment I am working on an extendable build farm at home to generate and distribute all the needed binaries automaticaly. Compiling everything for all systems by hand is just impossible to manage and would take a lot of my time to prepare every release.

Maybe I will look at the special patch after this add-on is up and running. I still do not know for sure. There are no decent libraries except Qt that support a system tray interface. So I would need to integrate the Qt library into Thundebird. And I do not know what the developers think about adding another lib to the Mozilla mess...
Do not get me wrong, I just LOVE Firefox and Thunderbird but after digging a bit into the code, I am still amazed it is working...

If you want to look at the state of the SysTray-X project, please have a look here:

Project Status

If you want to try out the plugin, these are complete packages (add-on and comapanion app):

openSuSE and (K)Ubuntu

For Windows an other platforms you still need to compiling it your self, but be warned: installing the tools will take hours and hours of work.

Thank you for your patience and stay tuned.

@duguyipiao
Copy link

@Ximi1970 I think there is a workaround for the close issue. At the moment, the minimize-on-close function works as expected when the Minimize on Close addon is installed
https://addons.thunderbird.net/en-us/thunderbird/addon/minimize-on-close/
Maybe you can integrate it into the new addon.

@Ximi1970
Copy link
Owner

Ximi1970 commented Mar 15, 2020

@duguyipiao No there is not. This is a legacy plugin. See also prev
It uses the same intercept as FireTray

See also: https://developer.thunderbird.net/add-ons/tb78

@dpolivaev
Copy link

Thunderbird devs have written they fixed it for upcoming Thunderbird 76
see https://bugzilla.mozilla.org/show_bug.cgi?id=208923

@afettouhi
Copy link

Holy crap they actually fixed it after 17 years???

@lgbaldoni
Copy link

Does this mean Firetray could be back on track?

@Ximi1970
Copy link
Owner

Ximi1970 commented Apr 3, 2020

Firetray is never going to work...It is a legacy addon and all legacy plugins will be terminated in 76+

@Ximi1970
Copy link
Owner

Ximi1970 commented Apr 3, 2020

But you can try my new addon:

https://github.com/Ximi1970/systray-x/releases

@lgbaldoni
Copy link

@Ximi1970 will this be of any help to systray-x?

@Ximi1970
Copy link
Owner

Ximi1970 commented Apr 3, 2020

Depends on how they implemented the minimize and what the icon will show...
Maybe somebody got smart and copied my new addon 😄
We need to wait for the beta release.
It is still not on the ftp site (and I am not going to setup their repos, takes to much time to setup and compile)

@qcybb
Copy link
Author

qcybb commented Apr 3, 2020

But you can try my new addon:
https://github.com/Ximi1970/systray-x/releases

Yours works great! The only issue I see is when you close TB, the tray icon does not disappear. If I hover my mouse pointer over it, then it goes away.

This was tested on Windows 10 / TB 68.6.0 (32 Bit)

@Ximi1970
Copy link
Owner

Ximi1970 commented Apr 3, 2020

Yes I saw that too..Will add it to the todo list. I think it is a Windows bug but I will look for a workaround.

@Chealer
Copy link

Chealer commented Apr 4, 2020

Holy crap they actually fixed it after 17 years???

It's not a bug. But comment 142 (yes) suggests it was solved for Microsoft Windows but not GNU/Linux. In any case, issue #18732 remains open, so I assume Thunderbird is still far from matching FireTray's basics on GNU/Linux.

@YamashitaRen
Copy link

Yes, I think Windows already had a "new mail indicator".
They just fixed it so that Thunderbird would go to the indicator when you close it I think... But since TB does not have a Linux indicator... Ahahah !
Mozilla devs just hate Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests