[Project_owners] mozilla/seamonkey and toolbar buttons

Eric Jung grimholtz at yahoo.com
Tue Jun 21 15:14:17 EDT 2005


OK, when I type chrome://passwdmaker/skin/passwdmaker.png into FF,
the image appears fine (and it also works on the toolbar)

But in Mozilla/SeaMonkey, the same path doesn't seem to work -- even
when I use the <image/> element underneath <toolbarbutton/>. The full
path to the image is (inside the jar):
chrome/passwdmaker.jar/skin/classic/passwdmaker/passwdmaker.png

What could I be missing?

2. This makes sense I guess, but what a pain! I'm spoiled with FF
extension development :) Is that how most Mozilla extensions do it
(by creating a menupopup on the button to show/hide the button?

Thank you,
Eric

--- Michael Vincent van Rantwijk <mv_van_rantwijk at SPAMFREEyahoo.com>
wrote:

> Eric Jung wrote:
> > Hi,
> > I've added a toolbar button to the Mozilla navbar like so:
> > 
> > <hbox id="nav-bar-buttons">
> >   <toolbarbutton id="pwdmaker-btn" tooltiptext="Open
> PasswordMaker"
> >     oncommand="passwordMaker.open();" persist="hidden"
> >     class="toolbarbutton-1"
> >     image="chrome://passwdmaker/skin/passwdmaker.png"/>
> > </hbox>
> > 
> > But I have two problems:
> > 
> > 1. the image doesn't appear
> 
> Try this:
> 
> <hbox id="nav-bar-buttons">
>    <toolbarbutton id="pwdmaker-btn" class="toolbarbutton-1" 
> tooltiptext="Open PasswordMaker"
>                   oncommand="passwordMaker.open();"
> persist="hidden">
>      <image src="chrome://passwdmaker/skin/passwdmaker.png"/>
>    </toolbarbutton>
> </hbox>
> 
> But you better use something like this:
> 
> #pwdmaker-btn {
>    list-style-image:
> url("chrome://passwdmaker/skin/passwdmaker.png")
> }
> 
> in your stylsheet, instead of the hard coded URI.
> 
> BTW; is 'passwdmaker' the exact chrome name?
> Also, what happens when you paste the URI in the location bar?
> 
> > 2. when I right-click on the navbar, there's no open to hide the
> > button.
> 
> You must add context="someMenupopupID" or add you're own JS code to
> 
> display the popup, which is exactly what we do btw.
> 
> Michael
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 



		
____________________________________________________ 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com


More information about the Project_owners mailing list