views:

401

answers:

1

I'm adding this:

   <prefwindow id="BrowserPreferences">
      <!-- Create a new pane (tab)  -->
      <prefpane id="whateverPrefs" label="yes!" 
      onpaneload="alert('hey')" 
                image="chrome://helloworld/content/images/man.png">

        <!-- Intermediary between GUI and preferences system -->
        <preferences>
           <!-- see the next section for more information -->
        </preferences>

        <!-- GUI Elements... -->
      </prefpane>
    </prefwindow>

to my overlay.xul. It doesn't work whatsoever, though it is suggested here. I do have wonderful success with this code, though:

  <menupopup id="menu_ToolsPopup">
    <menuitem id="helloworld-hello2" label="frigger!" 
              oncommand="HelloWorld.onMenuItemCommand(event);"/>
  </menupopup>

Is this a version problem (e.g., Firefox 3.x will not do it)? I am unable to find the string BrowserPreferences in browser.xul, which seems to be part of the problem. How can I add tabs to the preference pane in Firefox?

[Sorry if this question is really simple, but searching for help on Firefox Extensions is like searching for help on the word "is."]

+1  A: 

I don't think your code is wrong, but it should be overlaying preferences.xul not browser.xul - I'm guessing your overlay is registering with browser.xul and that's why your menu item works fine.

Check the section 'Register an Overlay' about half way down the MDC article Building an Extension

robertc
Excellent, I'll do that forthwith and report back... I mean tomorrow, it's 3am here :) THANKS.
Yar
Apparently I have to "get reading" on that MDC article. I'll mark this best answer when I get some stuff working. Thanks again.
Yar
That worked, thanks for your help and for insisting on the MDC docs.
Yar
Glad it worked out. I always tend start with the MDC stuff as it seems at least to get kept up to date.
robertc