Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

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

Open
tooomm opened this issue Sep 18, 2016 · 6 comments
Open

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

tooomm opened this issue Sep 18, 2016 · 6 comments
Labels

Comments

@tooomm
Copy link
Contributor

tooomm commented Sep 18, 2016

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
Copy link
Owner

mkiol commented Sep 19, 2016

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
Copy link
Contributor Author

tooomm commented Sep 19, 2016

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
Copy link
Owner

mkiol commented Sep 20, 2016

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:

  • create my own preferences window where I can code whatever I want, or
  • create many XPIs with different package.json for: Linux, Window, Firefox, Thunderbird, Seamonkey

@tooomm
Copy link
Contributor Author

tooomm commented Sep 23, 2016

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
Copy link

rcmero commented Dec 24, 2016

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.

@mkiol mkiol added the wontfix label Apr 10, 2017
@tooomm
Copy link
Contributor Author

tooomm commented May 13, 2017

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

@tooomm tooomm changed the title Detect on install which system/os and app the addon gets installed to Detect on install which os the addon gets installed to May 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants