Toolbar Frustration

I’m trying to build a toolbar icon for Firefox. The strange thing is that I can create the toolbar icon itself (ie, when I drag it out of the pallete of potential toolbar items to put it on the toolbar), in both small and large varieties, but I can’t seem to get the icon in the toolbar palette display to work. It just shows a jumble of icons – looks like the default icons for the browser (arrows, print, etc, but all in one image).

I’ve looked at a handful of other extensions, and I don’t think I’m missing anything, but I’ve got to be overlooking something stupid. How can I create the toolbar icons, but the one in the palette doesn’t work? If anyone has any ideas, please drop me a line. I’m going to pull the rest of my hair out, and that means that I’d have to redo my avatar down there in the corner. That’s just something that I don’t have time to do.

Update: Got it. The final step was to make sure that the XUL was being registered with the CustomizeToolbar XUL. The CSS alone may work as well, but I used the XUL, which contains the reference to the CSS. Something like this should work:

<RDF:Seq about="urn:mozilla:overlays">
 <RDF:li resource="chrome://global/content/customizeToolbar.xul"/>
</RDF:Seq>

Along with this…

<RDF:Seq about="chrome://global/content/customizeToolbar.xul">
 <RDF:li>chrome://btoolkit/content/btoolkitOverlay.xul</RDF:li>
</RDF:Seq>

Added to the appropriate contents.rdf, and packaged back up – and then installed again – does the trick. Phew. For those who like reading into things, this does mean that the Bloglines Toolkit will have a toolbar icon in the near future. I just need to figure out some more code, and then hit up Mark for some new icons, and it’ll be ready.


Posted

in

Comments

2 responses to “Toolbar Frustration”

  1. John Raezer Avatar

    I inserted the following code into skin/contents.rdf and it fixed the issue:

      <RDF:Seq about="urn:mozilla:stylesheets">
        <RDF:li resource="chrome://browser/content/browser.xul"/>
        <RDF:li resource="chrome://global/content/customizeToolbar.xul"/>
        <RDF:li resource="chrome://navigator/content/navigator.xul"/>
      </RDF:Seq>
    
      <RDF:Seq about="chrome://browser/content/browser.xul">
        <RDF:li>chrome://philoitoolbarbutton/skin/toolbar-button.css</RDF:li>
      </RDF:Seq>
    
      <RDF:Seq about="chrome://global/content/customizeToolbar.xul">
        <RDF:li>chrome://philoitoolbarbutton/skin/toolbar-button.css</RDF:li>
      </RDF:Seq>
    
      <RDF:Seq about="chrome://navigator/content/navigator.xul">
        <RDF:li>chrome://philoitoolbarbutton/skin/toolbar-button.css</RDF:li>
      </RDF:Seq>
    
  2. onemen Avatar
    onemen

    i’m haveing the same problem but i can’t get it to work……….??