Refactored Notification setup to use only the document as object

This commit is contained in:
michael starke
2014-02-25 22:49:41 +01:00
parent 21f299bdff
commit f6dc2193de
10 changed files with 36 additions and 26 deletions

View File

@@ -107,8 +107,7 @@ typedef NS_ENUM(NSUInteger, MPContentTab) {
[self _updateBindings:nil];
}
- (void)setupNotifications:(NSWindowController *)windowController {
MPDocument *document = [windowController document];
- (void)regsiterNotificationsForDocument:(MPDocument *)document {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(_didChangeCurrentItem:)
name:MPCurrentItemChangedNotification