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

Detect on install which os the addon gets installed to #135

Open tooomm opened 7 years ago

tooomm commented 7 years ago

Display/hide settings in options accordingly and don't mess around with the user too much. :D On Firefox (win+mac) for example 80% of settings are not relevant...

settings_limitations

mkiol commented 7 years ago

I agree. It is a mess. Unfortunately, there is no super easy way how to make it more clear. Let's keep it open and maybe I will figure something out in the near future...

tooomm commented 7 years ago

Detecting the needed information should be possible regarding this: https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/system

console.log(system.env.PATH);
// operating system

and

console.log("id = " + system.id);
// host application name


I'm not a developer or such... you need to double check and validate for sure. But it sounds reasonable, there are many more variables listed on that page which might be helpful in that case.

The addon then would need to display only options which are relevant to the app and os the addon is installed to (which equals to hiding others). That might be a different problem. I don't know.

What do you think?

Anyway, I appreciate that you are aware of this and that you keep it in mind.^^

mkiol commented 7 years ago

Thank you for the hints. The problem is that for the preferences I decided to use built-in FF mechanism. I just defined various options using package.json file and FF is responsible for the presentation. Unfortunately with this approach, there is no place where I can insert some code that will hide/show options etc. :-(

I see two potential solutions:

tooomm commented 7 years ago

Oh, ok. That makes sense...

The second options sounds like a mess though, and much work to maintain and supply properly. I can imagine that it wouldn't be too helpful for the project either. Splitting comments, ratings, user/download count and such.

I have several small addons that have their own settings dialog. It's pretty straight forward to use from a user point of view. You get the settings menu once you hit the Options button in the "Extensions" tab, and the details about the addon, infos about the version, screenshots etc. if you hit More. Otherwise both bring you to the same page... which has both contents somehow combined. But I guess you know how that works.^^ ;)


I found this on how to create such a options dialog window:

rcmero commented 7 years ago

About this issue, maybe you could ask for help from the developer of the Classic Toolbar Buttons extension? That extension also uses the built-in FF mechanism, and the options are diferent depending on whether the addon is installed on Firefox, Thunderbird or SeaMonkey.

tooomm commented 7 years ago

Now with this add-on beeing Thunderbird only (#162) you can remove a lot of the (Thunderbird only) hints for future versions!