开发者

Adding node in Account settings tree of Thunderbirds account settings dialogue

开发者 https://www.devze.com 2023-04-08 11:07 出处:网络
I am developing a Thunderbird add-on in which I want to add a node to every mail account in the account manager (opens when the user clicks on Tools->Account Settings). This node should show a panel w

I am developing a Thunderbird add-on in which I want to add a node to every mail account in the account manager (opens when the user clicks on Tools->Account Settings). This node should show a panel with additional settings for the account.

I have seen that the tree in this dialog is not using XUL but JavaScript instead. So i did some changes to the JavaScript file but if tomorrow a new version comes out then their will be issues with my add-on. So I nee开发者_如何转开发d to add the node as a XUL overlay but this doesn't see possible.


You cannot use XUL overlays to overlay content that is built dynamically. But fortunately, the account manager is explicitly extensible. There is even some documentation covering your exact case. In short, you need to create an XPCOM component and register it in mailnews-accountmanager-extensions category. The account manager will then load your component and call showPanel() method for each account to determine whether you want your panel to be displayed for this account. You need to set chromePackageName and name properties appropriately, the panel will be loaded from chrome://chromePackageName/content/am-name.xul and panel name from chrome://chromePackageName/locale/am-name.properties. Please note that starting with Thunderbird 4 XPCOM components need to be registered in chrome.manifest.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号