mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:00:38 +00:00
Makefiles changed to GNUmakefile.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2577 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
807247e979
commit
1f8f64b47b
19 changed files with 162 additions and 922 deletions
|
@ -187,12 +187,13 @@ static NSRecursiveLock *gnustep_gui_nsview_lock = nil;
|
|||
}
|
||||
|
||||
// Add to our subview list
|
||||
[sub_views addObject:(id)aView];
|
||||
[aView viewWillMoveToWindow:window];
|
||||
[aView setSuperview:self];
|
||||
[aView setNextResponder:self];
|
||||
[aView viewWillMoveToWindow:window];
|
||||
[sub_views addObject:(id)aView];
|
||||
}
|
||||
|
||||
/* This method needs to be worked out!!! */
|
||||
- (void)addSubview:(NSView *)aView
|
||||
positioned:(NSWindowOrderingMode)place
|
||||
relativeTo:(NSView *)otherView
|
||||
|
@ -268,6 +269,8 @@ static NSRecursiveLock *gnustep_gui_nsview_lock = nil;
|
|||
// No superview then just return
|
||||
if (!super_view) return;
|
||||
|
||||
[self viewWillMoveToWindow:nil];
|
||||
|
||||
views = [super_view subviews];
|
||||
[views removeObjectIdenticalTo:self];
|
||||
}
|
||||
|
@ -275,10 +278,26 @@ static NSRecursiveLock *gnustep_gui_nsview_lock = nil;
|
|||
- (void)replaceSubview:(NSView *)oldView
|
||||
with:(NSView *)newView
|
||||
{
|
||||
int index = [sub_views indexOfObjectIdenticalTo:oldView];
|
||||
if (!newView)
|
||||
return;
|
||||
|
||||
if (index != NSNotFound)
|
||||
[sub_views replaceObjectAtIndex:index withObject:newView];
|
||||
if (!oldView)
|
||||
[self addSubview:newView];
|
||||
else {
|
||||
int index = [sub_views indexOfObjectIdenticalTo:oldView];
|
||||
|
||||
if (index != NSNotFound) {
|
||||
[oldView viewWillMoveToWindow:nil];
|
||||
[oldView setSuperview:nil];
|
||||
[newView setNextResponder:nil];
|
||||
|
||||
[sub_views replaceObjectAtIndex:index withObject:newView];
|
||||
|
||||
[newView viewWillMoveToWindow:window];
|
||||
[newView setSuperview:self];
|
||||
[newView setNextResponder:self];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)sortSubviewsUsingFunction:(int (*)(id ,id ,void *))compare
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue