Skip to content

Commit

Permalink
Merge pull request alcatraz#341 from ClementPadovani/master
Browse files Browse the repository at this point in the history
Menu Item fix
  • Loading branch information
supermarin committed Nov 3, 2015
2 parents 8ff5ca5 + fb9a20d commit 979e8ad
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Alcatraz/Alcatraz.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,24 @@ - (id)initWithBundle:(NSBundle *)plugin {
self.bundle = plugin;
[[NSOperationQueue mainQueue] addOperationWithBlock:^{

[self createMenuItem];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(xcodeDidFinishLaunching:)
name:NSApplicationDidFinishLaunchingNotification
object:nil];
}];
[self updateAlcatraz];
}
return self;
}

- (void) xcodeDidFinishLaunching: (NSNotification *) notification {
[self createMenuItem];

[[NSNotificationCenter defaultCenter] removeObserver:self
name:NSApplicationDidFinishLaunchingNotification
object:nil];
}

#pragma mark - Private

- (void)createMenuItem {
Expand Down

0 comments on commit 979e8ad

Please sign in to comment.