I am trying chromium-tabs . I have a problem where the tab icon never updates properly after it is 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 resets the selected status to another. But this is not so. The icon never changes. Please note that I tried the exact same calls in (id)initWithBaseTabContents:(CTTabContents *)baseContents andJid:(NSString *)jid andStatus:(NSString *)status , where they work fine, so calls end only when the icon is updated later.
I also made sure that the functions are being called (I see the log instructions). What is the problem? Also, is this the plug that Chrome uses? Obviously, it works in Chrome, which is strange ... Am I doing something wrong?
I even tried to make [[[self.browser.windowController window] contentView] setNeedsDisplay:YES]; in the tabDidBecomeSelected functions to force the entire window to be redrawn if their code for updating the icon failed, but still no luck.
google-chrome objective-c chromium chromium-tabs
houbysoft
source share