X-Git-Url: http://git.ithinksw.org/ITKit.git/blobdiff_plain/f2f66bf528e9ff8784910c54c084df57f2c3b75e..3263678eef57c78d7017185eaa2efb9e644c7f29:/ITStatusItem.m diff --git a/ITStatusItem.m b/ITStatusItem.m index ea31d3a..561ecf2 100644 --- a/ITStatusItem.m +++ b/ITStatusItem.m @@ -51,4 +51,21 @@ static BOOL _ITStatusItemShouldKillShadow = NO; [(NSButton *)[self _button] setAlternateImage:image]; } +- (id )menuProvider { + return _menuProvider; +} + +- (void)setMenuProvider:(id )provider { + [_menuProvider autorelease]; + _menuProvider = [provider retain]; +} + +- (NSMenu *)menu { + if (_menuProvider) { + return [_menuProvider menuForStatusItem:self]; + } else { + return [super menu]; + } +} + @end \ No newline at end of file