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

Suppressing Context Menu Items

0 views
Skip to first unread message

nolybab

unread,
Nov 7, 2009, 10:53:11 PM11/7/09
to
Basically, I have just about everything working in my initial browser
extension, but there are two things I'd really like to know...

First, I have two items added to the context menu, but what I want to
do is to suppress the menu items if the page is not pointing to a
specific host...any quick suggestions on a good approach to solve this
problem?

Second, on both of these menu items, I'd really like to be able to add
an image next to the menu label...any suggestions on how to accomplish
this?

one more thing, in my status-bar panel that I added, it works perfect,
but when I hover over the panel image, I just get a regular mouse-
pointer, what I'd like to have is a hand cursor...

These seem like simple enough issues, I hope someone has some quick
advice :)

Thanks in advance for any help :)

dr.Vitall

unread,
Nov 8, 2009, 4:33:55 AM11/8/09
to
For question #2 just add
image="chrome://myextension/skin/ext-small.png"
inside <menuitem tag.

Per question #1, I'm really wondering same thing right at the moment.
Hopefully will figure it out next half an hour...

TestPilot

Gijs Kruitbosch

unread,
Nov 8, 2009, 4:45:29 AM11/8/09
to

You can add a listener on the popup for the "popupshowing" event. See:

https://developer.mozilla.org/en/XUL/PopupGuide/ContextMenus#Hiding_and_Showing_Menu_Items_based_on_Context

~ Gijs

Neil

unread,
Nov 11, 2009, 11:05:23 AM11/11/09
to
nolybab wrote:

>Second, on both of these menu items, I'd really like to be able to add an image next to the menu label...any suggestions on how to accomplish this?
>

>one more thing, in my status-bar panel that I added, it works perfect, but when I hover over the panel image, I just get a regular mouse-pointer, what I'd like to have is a hand cursor...
>
>
Use CSS to solve both of these. Add an xml-stylesheet processing
instruction to your overlay to load a CSS file in your skin, then in
that file use CSS rules to apply a list-style-image to the menuitem and
a cursor to the statusbarpanel.

--
Warning: May contain traces of nuts.

0 new messages