mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
add userInfo in resize notifications, as added in OSX 10.5
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38812 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6433adc763
commit
d905991ebe
2 changed files with 15 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-07-16 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSSplitView.m: Add userInfo dictionary containing the
|
||||
divider number in resize notifications, as added in OSX 10.5.
|
||||
|
||||
2015-07-02 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSTableView.m: Changed click and double-click behavior
|
||||
|
@ -6,7 +11,7 @@
|
|||
doubleAction if there is one, and only begin editing if there is
|
||||
no doubleAction assigned.
|
||||
|
||||
2015-07-01 Doug Simons <doug.simons@testplant.com>
|
||||
2015-07-01 Doug Simons <doug.simons@testplant.com>
|
||||
|
||||
* Source/NSTextStorage.m: Fixed a bug with setting _editedRange for
|
||||
multiple edits when the first one is a delete (which results in
|
||||
|
|
|
@ -325,12 +325,13 @@ static NSNotificationCenter *nc = nil;
|
|||
- (void) _resize: (id) v withOldSplitView: (id) prev
|
||||
withFrame: (NSRect) r fromPoint: (NSPoint) p
|
||||
withBigRect: (NSRect) bigRect divHorizontal: (CGFloat) divHorizontal
|
||||
divVertical: (CGFloat) divVertical
|
||||
divVertical: (CGFloat) divVertical userInfo:(NSDictionary *)userInfo
|
||||
{
|
||||
NSRect r1 = NSZeroRect;
|
||||
|
||||
[nc postNotificationName: NSSplitViewWillResizeSubviewsNotification
|
||||
object: self];
|
||||
object: self
|
||||
userInfo: userInfo];
|
||||
|
||||
/* resize the subviews accordingly */
|
||||
r = [prev frame];
|
||||
|
@ -387,7 +388,8 @@ static NSNotificationCenter *nc = nil;
|
|||
(int)NSHeight(r1));
|
||||
|
||||
[nc postNotificationName: NSSplitViewDidResizeSubviewsNotification
|
||||
object: self];
|
||||
object: self
|
||||
userInfo: userInfo];
|
||||
|
||||
}
|
||||
|
||||
|
@ -424,6 +426,7 @@ static NSNotificationCenter *nc = nil;
|
|||
NSRect oldRect; //only one can be dragged at a time
|
||||
BOOL lit = NO;
|
||||
NSCursor *cursor;
|
||||
NSDictionary *userInfo = nil; // userInfo for resize notifications
|
||||
|
||||
/* if there are less the two subviews, there is nothing to do */
|
||||
if (count < 2)
|
||||
|
@ -615,6 +618,7 @@ static NSNotificationCenter *nc = nil;
|
|||
// Save the old position
|
||||
op = p;
|
||||
}
|
||||
userInfo = [NSDictionary dictionaryWithObject:[NSNumber numberWithInt:offset] forKey:@"NSSplitViewDividerIndex"];
|
||||
|
||||
// user is moving the knob loop until left mouse up
|
||||
while ([e type] != NSLeftMouseUp)
|
||||
|
@ -714,7 +718,7 @@ static NSNotificationCenter *nc = nil;
|
|||
{
|
||||
[self _resize: v withOldSplitView: prev withFrame: r fromPoint: p
|
||||
withBigRect: bigRect divHorizontal: divHorizontal
|
||||
divVertical: divVertical];
|
||||
divVertical: divVertical userInfo:userInfo];
|
||||
[_window invalidateCursorRectsForView: self];
|
||||
[self setNeedsDisplay: YES];
|
||||
}
|
||||
|
@ -740,7 +744,7 @@ static NSNotificationCenter *nc = nil;
|
|||
{
|
||||
[self _resize: v withOldSplitView: prev withFrame: r fromPoint: p
|
||||
withBigRect: bigRect divHorizontal: divHorizontal
|
||||
divVertical: divVertical];
|
||||
divVertical: divVertical userInfo:userInfo];
|
||||
[_window invalidateCursorRectsForView: self];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue