I'm trying out chromium-tabs
. I have an issue where the icon of a tab never gets properly updated after it gets created for the first time. In my CTTabContents
subclass, I have:
- (void)tabDidBecomeSelected {
NSLog(@"selected");
[self setIcon:[NSImage imageNamed:@"default"]];
}
- (void)tabDidResignSelected {
NSLog(@"resign selected");
[self setIcon:[NSImage imageNamed:@"notification"]];
}
This should change the icon if the tab resigns its selected status to a different one. But it doesn't. The icon never changes. Note that I've tried the same exact calls in (id)initWithBaseTabContents:(CTTabContents *)baseContents andJid:(NSString *)jid andStatus:(NSString *)status
where they work fine, so the calls fail only on an update of the icon later.
I've also made sure the functions are getting called (I see the log statements). What's the problem here? Also, is this the fork that Chrome actually uses? It obviously works in Chrome, which is strange... Am I doing something wrong?
I even tried doing [[[self.browser.windowController window] contentView] setNeedsDisplay:YES];
in the tabDidBecomeSelected
functions, to force the whole window to redraw, in case their code for updating the icon fails, but still no luck.