开发者

Firefox extension to display image in status bar

I am trying to write my first "hello world" extension for Firefox.

It's working fine, but I also want to display an image in the status bar & the image is not displaying.

My folder structure are as follows:

  helloworld
            chrome.manifest
            icon.png
            install.rdf
            ->chrome
                    ->content
                      sample.xul
                     ->icons
                       hpsched18.png

-> shows folder in above example

My XUL code:

<?xml version="1.0"?>
                  <overlay id="sample" 
                  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
            <statusbar id="status-bar">
           <statusbarpanel id="my-panel" label="Hello, World"  
            src="chrome://sample/chrome/content/icons/hpsched18.png"
            tooltiptext="Hello Word Tool Tip"
            />
           <statusbarpanel label="Left panel"
           tooltiptext="Sample status bar Left panel"
       开发者_JAVA技巧     />
           <spacer flex="1"/>
             <progressmeter mode="determined" value="82"/>
            <statusbarpanel label="Right panel"/>
         </statusbar>
        </overlay>

Everything works fine... status bar, messages, tool tip... Only the image, which is in the helloworld\chrome\icons folder does not display on the status bar.

Any help for that? Maybe I am writing wrong code or path etc. but application name is sample.

Thanks.


Try:

src="chrome://sample/content/icons/hpsched18.png" tooltiptext="Hello Word Tool Tip" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜