Another Newbie Question... - Mozilla

This is a discussion on Another Newbie Question... - Mozilla ; I have an addon which runs in both TBird, Sunbird, and Firefox. I have added an html Help file to the addon and I want to put a button on my addon's option panel that permits display of this file's ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Another Newbie Question...

  1. Another Newbie Question...

    I have an addon which runs in both TBird, Sunbird, and Firefox. I have
    added an html Help file to the addon and I want to put a button on my
    addon's option panel that permits display of this file's contents. The
    file will be localized so it will be located under chrome/locale/en-US, etc.

    So far, I have managed to get the file's full path and then created a
    file:// url. With this, I have launched the file using the
    nsIExternalProtocolService. But this causes the display of a warning
    message that I would rather avoid.

    There must be a simple way to do this in all these applications, ideally
    using a chrome:// reference to the help file. But I am at a loss to find
    how it is done. Your help is appreciated.

    Thanks.

  2. Re: Another Newbie Question...

    user@domain.invalid schreef:
    > I have an addon which runs in both TBird, Sunbird, and Firefox. I have
    > added an html Help file to the addon and I want to put a button on my
    > addon's option panel that permits display of this file's contents. The
    > file will be localized so it will be located under chrome/locale/en-US,
    > etc.
    >
    > So far, I have managed to get the file's full path and then created a
    > file:// url. With this, I have launched the file using the
    > nsIExternalProtocolService. But this causes the display of a warning
    > message that I would rather avoid.
    >
    > There must be a simple way to do this in all these applications, ideally
    > using a chrome:// reference to the help file. But I am at a loss to find
    > how it is done. Your help is appreciated.
    >
    > Thanks.


    Instead of
    chrome://yourext/content/file.html
    use:
    chrome://yourext/locale/file.html

    I guess that should work.

  3. Re: Another Newbie Question...

    On 12/28/06, user@domain.invalid wrote:
    > I have an addon which runs in both TBird, Sunbird, and Firefox. I have
    > added an html Help file to the addon and I want to put a button on my
    > addon's option panel that permits display of this file's contents. The
    > file will be localized so it will be located under chrome/locale/en-US, etc.
    >
    > So far, I have managed to get the file's full path and then created a
    > file:// url. With this, I have launched the file using the
    > nsIExternalProtocolService. But this causes the display of a warning
    > message that I would rather avoid.
    >
    > There must be a simple way to do this in all these applications, ideally
    > using a chrome:// reference to the help file. But I am at a loss to find
    > how it is done. Your help is appreciated.
    >

    You can set the pref network.protocol-handler.warn-external.file to
    false. Or some similar pref, I'm not sure I remember correctly.

    The alternative is to use a built into the application help viewer.

    Nickolay

+ Reply to Thread