Permalink
Browse files

Added remove status item on dealloc

  • Loading branch information...
1 parent 2a77110 commit 9e886f933d2c96e629cc8ad060c17265a3166222 @keith committed Dec 13, 2012
@@ -33,8 +33,7 @@ - (void)awakeFromNib
{
// Add the status item with normal images
self.statusItem = [[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength];
- [self.statusItem setImage:[self normalStatusImageHighlighted:NO]];
- [self.statusItem setAlternateImage:[self normalStatusImageHighlighted:YES]];
+ [self setNormalIcons];
[self.statusItem setHighlightMode:YES];
[self.statusItem setTarget:self];
@@ -371,4 +370,8 @@ - (void)showAbout
[NSApp orderFrontStandardAboutPanel:self];
}
+- (void)dealloc {
+ [[NSStatusBar systemStatusBar] removeStatusItem:self.statusItem];
+}
+
@end

0 comments on commit 9e886f9

Please sign in to comment.