[Companion] Menu-button fix

Brian Erst azzipsderf-companion at yahoo.com
Wed Sep 15 15:21:27 EDT 2004


I've fixed it. :-)

Attached is a NEW yahootoolbar.jar with the message fix. This builds on
the previous work by Brian Kennelly and the menu-button fix from an
hour ago.

The change is as follows.

class_NewMailNotify.js

Old Line 120:

AlertButtonMenu.replaceChild(alertPopup.childNodes[0],
AlertButtonMenu.childNodes[0].childNodes[0]);

New Line 120:
				
AlertButtonMenu.childNodes[0].replaceChild(alertPopup.childNodes[0],
AlertButtonMenu.childNodes[0].childNodes[0]);

The replaceChild method was being called at the button level instead of
the menu item level. This caused the method to fail (throw an
exception). The exception was there to handle the "no such menu" case,
and added a new node, rather than replacing it. Hence, a new menu item
on each update. 

I've tested it locally and it seems to work.

- Brian Erst

--- Brian <mozdev at bkennelly.net> wrote:

> Jim Reisert AD1C wrote:
> 
> >There is a third problem which has been present since Firefox 0.9.3,
> I think. 
> >The alarm bell that notifies you of new messages keeps appending
> lines of text,
> >rather than overwriting them:
> >
> >2 new messages
> >1 new message
> >3 new messages
> >
> >etc.
> >  
> >
> I am going to look at that tonight, unless somebody beats me to it. 
> :-)
> 
> _______________________________________________
> Companion mailing list
> Companion at mozdev.org
> http://mozdev.org/mailman/listinfo/companion
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yahootoolbar.jar
Type: application/octet-stream
Size: 42795 bytes
Desc: yahootoolbar.jar
Url : http://mozdev.org/pipermail/companion/attachments/20040915/ff69792e/yahootoolbar-0001.obj


More information about the Companion mailing list