mkiol / GNotifier

Thunderbird add-on that replaces built-in notifications with the OS native notifications
https://addons.mozilla.org/thunderbird/addon/gnotifier/
GNU General Public License v3.0
164 stars 25 forks source link

GNotifier not working in new Firefox 57 #197

Closed ivnish closed 6 years ago

ivnish commented 6 years ago

GNotifier not working in new Firefox 57. Firefox disable it.

mkiol commented 6 years ago

GNotifier is not a WebExtension, so it was disabled in FF 57. Unfortunately due to few constrains - see #162 - it is not possible to "fix" it to be compatible with the newest FF release.

I've decided to continue development only focusing on Thunderbird.

ivnish commented 6 years ago

It's a pity! :(

tooomm commented 6 years ago

Just curious @mkiol. What kind of dll files are needed to make this work on windows? What do they provide?

mkiol commented 6 years ago

@tooomm

DLL is here and the sources are here.

Unlike Linux, on Windows GNotifier interacts with OS notification API not directly (using javascript code) but via "adaptor" implemented in C++ and provided as a DLL. GNotifier calls relatively simple js function: notify (iconURL, title, text, notifier, closeHandler, clickHandler) and DLL transforms it to something understandable by Windows API.

This crafty implementation was entirely done by @kabili207.

tooomm commented 6 years ago

@mkiol Are you sure you still rely on that if you would start using WebExtensions? https://developer.mozilla.org/en-US/Add-ons/WebExtensions/user_interface/Notifications https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/notifications

mkiol commented 6 years ago

@tooomm Unfortunately it is not so simple. Yes, there is WebExtension API for triggering notifications but this API doesn't produce "native" integration on Windows. When you call notifications.create() FF will show ugly HTML thing instead nice action center ToastNotification.

To sum up, there are following blockers for re-implementation GNotifier as a WebExtension:

  1. no DLLs and js-ctypes API -> add-on is not able to interact with native binaries in the OS*
  2. no API that allows add-on to change the default notification engine in the browser
  3. Thunderbird, SeaMonkey and PaleMoon doesn't support WebExtensions

*) Actually there is a possibility to use Native messaging API. It is ugly solution because it requires user to install EXE file in the system. This EXE file can not be distributed with the add-on via AMO. I really dislike this approach.

tooomm commented 6 years ago

Thanks for investigating further.

So we are basically dependent on mozilla to support native notification systems at one point... @kabili207 posted the tracking issue at mozilla for windows toast notifications here: https://github.com/mkiol/GNotifier/issues/162#issuecomment-345523359

No idea about other operating systems. :/

ViBE-HU commented 6 years ago

feels bad. this is one of my daily driver extensions.

Forage commented 6 years ago

Who cares about Windows support? We only need it to work in Firefox for Linux! ;)

RaEyE commented 6 years ago

@mkiol Thank you for your elaborate answer. Thats really nice to know. urrently I'm using Thunderbird Beta (58b2), would you say, there is a possibility to run GNotifier with that release? I'm asking since you also published a release for Beta 56.