Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Move from Menu Bar to ?

14 views
Skip to first unread message

Marc Patermann

unread,
May 15, 2013, 5:10:05 AM5/15/13
to dev-ext...@lists.mozilla.org
Hi,

the third party extension we still currently use with Thunderbird 2 is
located in the menu bar.
File ... Foo
|- Bar 1
|- Bar 2
|- Bar 3

The menu bar is hidden in recent Thunderbird versions by default.
(It can be unhidden, I know.)

What is the way to include the UI elements to the Thunderbird UI
nowadays (outside the hidden menu bar)?

Any pointer may help.


Marc

gNeandr

unread,
May 15, 2013, 8:59:37 AM5/15/13
to
You can use toolbaritem/XUL.
See here: https://developer.mozilla.org/en-US/docs/XUL/toolbaritem

Arivald

unread,
May 15, 2013, 9:11:33 AM5/15/13
to
W dniu 2013-05-15 14:59, gNeandr pisze:
BTW there is also new toolbar button (looks like 3 horizontal bars) that
opens menu similar to Firefox main menu.
Sad that it does not automatically reflect changes in menu bar, You need
to add second menutiems there.

--
Arivald

Marc Patermann

unread,
May 15, 2013, 9:53:11 AM5/15/13
to dev-ext...@lists.mozilla.org
Hi,

gNeandr schrieb (15.05.2013 14:59 Uhr):
> On 15.05.2013 11:10, Marc Patermann wrote:
>> the third party extension we still currently use with Thunderbird 2 is
>> located in the menu bar.
>> File ... Foo
>> |- Bar 1
>> |- Bar 2
>> |- Bar 3
>>
>> The menu bar is hidden in recent Thunderbird versions by default.
>> (It can be unhidden, I know.)
>>
>> What is the way to include the UI elements to the Thunderbird UI
>> nowadays (outside the hidden menu bar)?
>>
>> Any pointer may help.

> You can use toolbaritem/XUL.
> See here: https://developer.mozilla.org/en-US/docs/XUL/toolbaritem
This starts with "Firefox only".
So it is no use for Thunderbird, is it?


Marc

gNeandr

unread,
May 15, 2013, 10:00:35 AM5/15/13
to
I'm just building that with Thunderbird .. no problem ;)

Arivald

unread,
May 15, 2013, 10:08:19 AM5/15/13
to
W dniu 2013-05-15 15:53, Marc Patermann pisze:
It is not only for Firefox.

Anyway for You probably better will be toolbarbutton, probably with [
type="menu" ] attribute, and menupopup inside.

https://developer.mozilla.org/en-US/docs/XUL/toolbarbutton
https://developer.mozilla.org/en-US/docs/XUL/Attribute/toolbarbutton.type

--
Arivald

Marc Patermann

unread,
May 15, 2013, 11:22:52 AM5/15/13
to dev-ext...@lists.mozilla.org
Arivald,

Arivald schrieb (15.05.2013 16:08 Uhr):
> W dniu 2013-05-15 15:53, Marc Patermann pisze:
>> gNeandr schrieb (15.05.2013 14:59 Uhr):
>>> On 15.05.2013 11:10, Marc Patermann wrote:
>>>> the third party extension we still currently use with Thunderbird 2 is
>>>> located in the menu bar.
>>>> File ... Foo
>>>> |- Bar 1
>>>> |- Bar 2
>>>> |- Bar 3
>>>>
>>>> The menu bar is hidden in recent Thunderbird versions by default.
>>>> (It can be unhidden, I know.)
>>>>
>>>> What is the way to include the UI elements to the Thunderbird UI
>>>> nowadays (outside the hidden menu bar)?
>>>>
>>>> Any pointer may help.

> Anyway for You probably better will be toolbarbutton, probably with [
> type="menu" ] attribute, and menupopup inside.
>
> https://developer.mozilla.org/en-US/docs/XUL/toolbarbutton
> https://developer.mozilla.org/en-US/docs/XUL/Attribute/toolbarbutton.type
OK, this looks fine, thank you.

However I cannot get it work.
I found
https://developer.mozilla.org/en-US/docs/XUL/School_tutorial/Adding_Toolbars_and_Toolbar_Buttons
about adding the new toolbox to the UI.
Combining the two documents I'm at this (based on the existing
overlay.xul with menubar, which still works):

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://fooextension/skin/overlay.css"
type="text/css"?>
<overlay id="fooextension-overlay"

xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="Overlay.js"/>

<menubar id="mail-menubar">

<menu id="foomenu" label="foo Werkzeuge">
<menupopup id="foomenuitems">
<menuitem id="foomenu-password" label="Passwort ändern"
oncommand="fooOverlay.openfoopassword(event);"/>
<menuitem id="foomenu-delegate" label="Abwesenheitsnotiz"
oncommand="fooOverlay.openfoovacation(event);"/>
<menuitem id="foomenu-delegate" label="Vertreter-Zugriff"
oncommand="fooOverlay.openfoodelegate(event);"/>
</menupopup>
</menu>
</menubar>

<toolbarpalette id="fooWerkzeuge">
<toolbarbutton label="foo Werkzeuge" type="menu">
<menuitem label="Passwort ändern"
oncommand="fooOverlay.openfoopassword(event);" />
<menuitem label="Abwesenheitsnotiz"
oncommand="fooOverlay.openfoovacation(event);"/>
<menuitem label="Vertreter-Zugriff"
oncommand="fooOverlay.openfoodelegate(event);"/>
</toolbarbutton>
</toolbarpalette>
<window id="main-window">
<toolbox id="footoolbox">
<toolbar id="footoolbar" toolbarname="foo Werkzeuge"
customizable="true"
context="toolbar-context-menu" />
</toolbox>
</window>
</overlay>


Is there something missing or wrong?
The toolbar is not available anywhere in the UI.

Marc

Neil

unread,
May 15, 2013, 7:18:04 PM5/15/13
to
Marc Patermann wrote:

> Arivald schrieb (15.05.2013 16:08 Uhr):
>
>> Anyway for You probably better will be toolbarbutton, probably with [
>> type="menu" ] attribute, and menupopup inside.
>>
>> https://developer.mozilla.org/en-US/docs/XUL/toolbarbutton
>> https://developer.mozilla.org/en-US/docs/XUL/Attribute/toolbarbutton.type
>>
>
> ...
> <toolbarbutton label="foo Werkzeuge" type="menu">
> <menuitem label="Passwort ändern"
> oncommand="fooOverlay.openfoopassword(event);" />
> <menuitem label="Abwesenheitsnotiz"
> oncommand="fooOverlay.openfoovacation(event);"/>
> <menuitem label="Vertreter-Zugriff"
> oncommand="fooOverlay.openfoodelegate(event);"/>

You seem to have forgotten the menupopup.

--
Warning: May contain traces of nuts.

Marc Patermann

unread,
May 16, 2013, 6:40:55 AM5/16/13
to dev-ext...@lists.mozilla.org, Neil
Niel,

Neil schrieb (16.05.2013 01:18 Uhr):
> Marc Patermann wrote:
>> Arivald schrieb (15.05.2013 16:08 Uhr):
>>
>>> Anyway for You probably better will be toolbarbutton, probably with [
>>> type="menu" ] attribute, and menupopup inside.
>>>
>>> https://developer.mozilla.org/en-US/docs/XUL/toolbarbutton
>>> https://developer.mozilla.org/en-US/docs/XUL/Attribute/toolbarbutton.type
>>>
>>
>> ...
>> <toolbarbutton label="foo Werkzeuge" type="menu">
<menupopup>
>> <menuitem label="Passwort ändern"
>> oncommand="fooOverlay.openfoopassword(event);" />
>> <menuitem label="Abwesenheitsnotiz"
>> oncommand="fooOverlay.openfoovacation(event);"/>
>> <menuitem label="Vertreter-Zugriff"
>> oncommand="fooOverlay.openfoodelegate(event);"/>
</menupopup>
</toolbarbutton>

> You seem to have forgotten the menupopup.
Yes, you are right, I missed that.

After I fixed this, nothing changed. I cannot find the new tool bar
anywhere.


Marc

gNeandr

unread,
May 16, 2013, 9:30:16 AM5/16/13
to
On 16.05.2013 12:40, Marc Patermann wrote:
> Yes, you are right, I missed that.
>
> After I fixed this, nothing changed. I cannot find the new tool bar
> anywhere.
>
>
> Marc
Not followed completely .. but I guess you have just made it possible to
add a toolbarbutton from the Customize Dialog.
On any toolbar used context menu (rmouse) and select "Customize". Do you
see "your" defined button? If yes you can drag that to any toolbar.
Hope that's you had look for !?

Marc Patermann

unread,
May 16, 2013, 10:57:12 AM5/16/13
to gNeandr, dev-ext...@lists.mozilla.org
gNeandr schrieb (16.05.2013 15:30 Uhr):
> On 16.05.2013 12:40, Marc Patermann wrote:
>> Yes, you are right, I missed that.
>>
>> After I fixed this, nothing changed. I cannot find the new tool bar
>> anywhere.

> Not followed completely .. but I guess you have just made it possible to
> add a toolbarbutton from the Customize Dialog.
> On any toolbar used context menu (rmouse) and select "Customize". Do you
> see "your" defined button? If yes you can drag that to any toolbar.
> Hope that's you had look for !?
That's what I expected, but it is not there. :(


Marc

gNeandr

unread,
May 16, 2013, 12:43:57 PM5/16/13
to
If you don't find the defined toolbarbutton on the Customize dialog take
a look at an example I try to send to you directly.

If the menu doesn't show up, I guess my very first comment maybe valid,
try with toolbaritem to hold the menu.

0 new messages