On 27 December 2010 18:44, David Kettler <[email protected]> wrote:

> John J. Foerch wrote:
>
>> On Sun, Dec 26, 2010 at 08:29:33PM -0600, Benjamin Slade wrote:
>>
>>> Thanks, John.
>>>
>>> Could you point me in the right direction for how to write a mode-line
>>> widget
>>> showing favicon?
>>>
>>> Would displaying favicons in the (C-x b) buffer list involve the same
>>> complexities as does showing favicons in the completions list?
>>>
>>> --Benjamin Slade
>>>
>>>
>>
>> modules/mode-line.js
>>
>> yes, the buffer list displayed by C-x b is a completions list.
>>
>>
> Parts of contrib/modules/mode-line-buttons.js may be useful; it also
> displays images in the mode line.
>
> regards, David
>

Thanks.

I had looked at mode-line-buttons.js to try to get an idea of how image
display in the mode-line works. And I looked at tab-bar.js to see how
favicon is handled.  But, unfortunately, I don't know any javascript so I
couldn't really get anything to work.

This is what I tried:

// favicon in modeline
 function favicon_modeline_widget (window) {
     this.class_name = "favicon_modeline_widget";
     text_widget.call(this, window);
     var image = create_XUL(window, "image");
         image.setAttribute("class", "modeline-icon");
}
favicon_modeline_widget.prototype.__proto__ = text_widget.prototype
favicon_modeline_widget.prototype.update = function () {
         if (b.favicon != null)
            image.setAttribute("src", b.favicon);
}

It doesn't break anything (that I can see), but it doesn't do anything
either.

--B.
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to