Hello!

I've been developing a browser action extension (it's a minor tweaked
version of the Gmail Checker from the SVN). With the latest dev build
(223.9) I ran into a couple of problems, the only which I could not
fix was with the "chrome.browserAction.setIcon"-method. I'm using a
path to specify my icon since I don't need any fancy canvas-drawing at
the moment. However, after the first call to setIcon any subsequent
calls doesn't change the icon at all. And so I'm stuck with only being
able to set the icon once.

Is there a problem in my code or have anyone else experienced the same
issue?

For example, I run this code when the inbox count have changed and the
badge bg-color and title changes, but not the icon:

    switch(unreadCount)
    {
        case '0':
            chrome.browserAction.setIcon
({path:img_noNewSrc});
            chrome.browserAction.setBadgeBackgroundColor({color:[110,
140, 180, 255]});
            chrome.browserAction.setTitle({title:"No unread emails"});
            break;
        case '1':
            chrome.browserAction.setIcon({path:img_newSrc});
            chrome.browserAction.setBadgeBackgroundColor({color:[208,
0, 24, 255]});
            chrome.browserAction.setTitle({title:"1 unread email"});
            break;
        default:
            chrome.browserAction.setIcon({path:img_newSrc});
            chrome.browserAction.setBadgeBackgroundColor({color:[208,
0, 24, 255]});
            chrome.browserAction.setTitle({title:unreadCount + "
unread emails"});
            break;
    }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to