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

Context click on status bar item

2 views
Skip to first unread message

Eric Shepherd

unread,
Nov 8, 2006, 12:25:52 PM11/8/06
to dev-ext...@lists.mozilla.org
I'm updating an extension I wrote for Firefox to work in the status
bar in Thunderbird, and everything's working except that when I right-
click it, the context menu isn't popping up.

The XUL for the status bar item looks like this:

<statusbar id="status-bar">
<statusbarpanel id="stockwatcher2"
label="Loading..."
context="stockmenu"
onclick="StockWatcher.refreshInformation()"
/>
</statusbar>

The XUL for the menu is:

<popupset id="mainPopupSet">
<popup id="stockmenu" position="after_start">
<menuitem label="Refresh Now" default="true"
oncommand="StockWatcher.refreshInformation()"/>
<menuseparator/>
<menuitem label="Apple (AAPL)" oncommand="StockWatcher.watchStock
('AAPL')"/>
... (more menu items)
</popup>
</popupset>

This works in Firefox but not in Thunderbird. Any idea what's up?

Eric Shepherd
Developer Documentation Lead
she...@mozilla.com

mark bokil

unread,
Nov 8, 2006, 12:44:40 PM11/8/06
to dev-ext...@lists.mozilla.org
Eric Shepherd wrote:
> I'm updating an extension I wrote for Firefox to work in the status
> bar in Thunderbird, and everything's working except that when I
> right-click it, the context menu isn't popping up.

>
>
>
> This works in Firefox but not in Thunderbird. Any idea what's up?
>
>
>
I am guessing the ID's for the status bar in both applications are not
the same. id="status-bar". If it works in Firefox but not Thunderbird
then I bet thunderbird uses a slightly different ID. Inspect it in the
DOM Inspector to determine the exact ID. The extension would have to
have two overlays one for each statusbar ID.

-Mark


Eric Shepherd

unread,
Nov 8, 2006, 12:47:47 PM11/8/06
to mark bokil, dev-ext...@lists.mozilla.org
Well, the item shows up in the status bar, and clicking it works, but
context-clicking does not. That tells me that the status bar ID is
correct, I would think.


Eric Shepherd
Developer Documentation Lead
she...@mozilla.com

mark bokil

unread,
Nov 8, 2006, 2:32:21 PM11/8/06
to Eric Shepherd, dev-ext...@lists.mozilla.org
Eric Shepherd wrote:
> Well, the item shows up in the status bar, and clicking it works, but
> context-clicking does not. That tells me that the status bar ID is
> correct, I would think.
>
>
Okay, I think I know what is wrong. Try nesting your popupmenu inside
your overlay for <statusbar id="status-bar">

It could be a scope problem.

-mark

Eric Shepherd

unread,
Nov 8, 2006, 2:39:34 PM11/8/06
to mark bokil, dev-ext...@lists.mozilla.org
You nailed it. Thanks!


Eric Shepherd
Developer Documentation Lead
she...@mozilla.com

Nickolay Ponomarev

unread,
Nov 8, 2006, 3:18:37 PM11/8/06
to Eric Shepherd, dev-ext...@lists.mozilla.org
The problem probably was that in thunderbird there is no popupset with that id.

On 11/8/06, Eric Shepherd <eshe...@mozilla.com> wrote:
> I'm updating an extension I wrote for Firefox to work in the status
> bar in Thunderbird, and everything's working except that when I right-
> click it, the context menu isn't popping up.
>

> The XUL for the status bar item looks like this:
>
> <statusbar id="status-bar">
> <statusbarpanel id="stockwatcher2"
> label="Loading..."
> context="stockmenu"
> onclick="StockWatcher.refreshInformation()"
> />
> </statusbar>
>
> The XUL for the menu is:
>
> <popupset id="mainPopupSet">
> <popup id="stockmenu" position="after_start">
> <menuitem label="Refresh Now" default="true"
> oncommand="StockWatcher.refreshInformation()"/>
> <menuseparator/>
> <menuitem label="Apple (AAPL)" oncommand="StockWatcher.watchStock
> ('AAPL')"/>
> ... (more menu items)
> </popup>
> </popupset>
>

> This works in Firefox but not in Thunderbird. Any idea what's up?
>

> Eric Shepherd
> Developer Documentation Lead
> she...@mozilla.com
>
>
>

> _______________________________________________
> dev-extensions mailing list
> dev-ext...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-extensions
>

0 new messages