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

[FF+TB] no app icons in notifications (Win 10) #104

Closed tooomm closed 7 years ago

tooomm commented 8 years ago

I upgraded to Windows 10 today. While notifications used to don't work at all on Windows 8.1, they now work... that's great!!

But I can't get them to show the application icons. default, firefox or thunderbird... all the same.

mkiol commented 8 years ago

While notifications used to don't work at all on Windows 8.1

I tested it couple of times and didn't have any problems on W8.1. What was the exact configuration of your environment? TB, FF versions, addon version, win patches, etc. ?

But I can't get them to show the application icons. default, firefox or thunderbird... all the same.

You right. This works only on Linux.

tooomm commented 8 years ago

I was running TB 38.7.2 and FF 45.0.2 (both portable), addon version was 1.9.6 and Win 8.1 with most recent updates (at least very close to). I can tell because I just updated 2 days ago and checked the TB/FF versions today, just installed new TB/FF updates right now - no updates in between.

You right. This works only on Linux.

Do you know what the problem on Win is about?

In your picture it looks like icons are shown for Win 8.1 - is this just an issue on Win 10?

mkiol commented 8 years ago

Do you know what the problem on Win is about? In your picture it looks like icons are shown for Win 8.1 - is this just an issue on Win 10?

On Linux, you can change the default icon for the "Download complete" and "New Message" notifications using "Notification icon" option. Windows automatically attaches the program icon to the notification, so there is no need to set the app icon in GNotifier's code.

I tested GNotifier both on Win8.1 and Win10 and never had any problems with icons. Maybe the problem occurs only on "portable" versions of FF or TB... I will do some tests and let you know.

tooomm commented 8 years ago

I just installed Firefox 46.0 (32bit) on my Windows 10 Pro (64bit). I started with a fresh profile, installed GNotifier 1.9.6 and did a picture download... (changed no settings at all) untitled

No app icon for me even with a regular Firefox installation!

mkiol commented 8 years ago

It should look like pic below.. I have no idea what is wrong :-/ virtualbox_win 10_29_04_2016_20_18_46

Could you please test web notifications as well? Here is a my test tool - simple html page that generates notifications.

tooomm commented 8 years ago

It's working on your test page... (I used portable Firefox)

webtest

tooomm commented 8 years ago

Ha, got it! (hopefully...)

While reading this link posted in https://github.com/mkiol/GNotifier/issues/65#issuecomment-209639876 I found this:

Be aware that for a desktop app to be able to display toast notifications, that app must have a shortcut on the start menu. That shortcut must have an AppUserModelID.

This made me test the notifications again... I was pretty sure that I disabled "Add entry to start menu" during the Firefox installation. I reinstalled version 46 again with the shortcut in the start menu enabled this time and the app icon was present on the Download finished notification! (but with the same "bad" background as on your picture here) The notification on your testpage however use a nice app icon with transparent background.

mkiol commented 8 years ago

Ha, got it! (hopefully...), I found this...

Thanks for the troubleshooting that you've done!

but with the same "bad" background as on your picture

Oh yes, I also noticed it. When icon is automatically added, background is not transparent. That is odd, but this is something that happens inside Windows notification engine, not in GNotifier. In case of web notification, URL for icon is provided by my add-on and the icon's file has transparency and this transparency is displayed correctly.

tooomm commented 8 years ago

In case of web notification, URL for icon is provided by my add-on and the icon's file has transparency and this transparency is displayed correctly.

Couldn't you provide transparent icons with gnotifier as well to make them look nice? ;)

mkiol commented 8 years ago

Couldn't you provide transparent icons with gnotifier

Yes, obviously this comes to my mind but there are following obstacles:

tooomm commented 8 years ago

Do these other product run into the same problem with their icons? Maybe they provide/include already properly working versions of their icons? I would have to check...

Mozilla icons are not free. They are protected by trademark policy. GNotifier is released under GPL, and it could be an issue.

I'm not too much into the topic, but this is a addon for Mozilla applications and you're not using it out of context, I saw other addons using the official icons to minimize the apps to the tray for example. Some links that I gathered regarding that, they also provide a contact email for questions.

Another idea, couldn't you just link to a web version of the icon (like you do with your html test notification) and cache/save + reuse it within your addon? Maybe it would do the trick to circumvent the need to provide them in your xpi. Not sure if that changes any legal stuff though.
I also realized that the "bad" (not transparent) TB or FF icons that get displayed are way smaller than the ones usually shown by other applications (or your HTML Notification Tester), too!

tooomm commented 7 years ago

Any news on this? Especially on including icons to finally get nice and shiny notifications, since I saw you working with your app icon. :P 👍

mkiol commented 7 years ago

Ok, you convinced me. Will be in the next release.

tooomm commented 7 years ago

Glad to hear. I'm more than happy to see the next release now, and enjoy good-looking notifications! Awesome. 😃


Two additional & related things that I realized...

mkiol commented 7 years ago

I've uploaded new 1.9.8-pre6 XPI. Please try it.

I was wondering about your Iceweasel and Icedove

Oo, I didn't know that. Thanks for updating me. Finally, they will stop with this "rebranding" stupidity :-) Maybe I will keep Iceweasel/Icedove in the code for a while just to have backward compatibility.

tooomm commented 7 years ago

Gorgeous! :)

(Btw, is there a reason because you don't close issues once you have resolved them?)

mkiol commented 7 years ago

is there a reason because you don't close issues once you have resolved them

I usually close the issue when release that provides fix is available on AMO, so probably next week.