Skip to content

Commit

Permalink
Merge pull request #1583 from slevenbits/splitview-userinfo
Browse files Browse the repository at this point in the history
Splitview userinfo
  • Loading branch information
aparajita committed Jun 29, 2012
2 parents 2a4ef43 + 345a865 commit 3137839
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions AppKit/CPSplitView.j
Expand Up @@ -1028,13 +1028,28 @@ The sum of the views and the sum of the dividers should be equal to the size of

- (void)_postNotificationWillResize
{
[[CPNotificationCenter defaultCenter] postNotificationName:CPSplitViewWillResizeSubviewsNotification object:self];
var userInfo = nil;

if (_currentDivider !== CPNotFound)
userInfo = [CPDictionary dictionaryWithObject:_currentDivider forKey:@"CPSplitViewDividerIndex"];

[[CPNotificationCenter defaultCenter] postNotificationName:CPSplitViewWillResizeSubviewsNotification
object:self
userInfo:userInfo];
}

- (void)_postNotificationDidResize
{
[self _autosave];
[[CPNotificationCenter defaultCenter] postNotificationName:CPSplitViewDidResizeSubviewsNotification object:self];

var userInfo = nil;

if (_currentDivider !== CPNotFound)
userInfo = [CPDictionary dictionaryWithObject:_currentDivider forKey:@"CPSplitViewDividerIndex"];

[[CPNotificationCenter defaultCenter] postNotificationName:CPSplitViewDidResizeSubviewsNotification
object:self
userInfo:userInfo];
}

/*!
Expand Down

0 comments on commit 3137839

Please sign in to comment.