* Source/NSViewController.m: Retain the view.

* Source/NSOutline.m(-drawRow:clipRect:): The selected cell
        * shows
        its first responder state.
        Patch by Frank LeGrand <frank.legrand@testplant.com>



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36378 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-03-17 22:36:34 +00:00
parent 12c4d6cbdb
commit 9a15cb6b88
3 changed files with 56 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2013-03-17 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSViewController.m: Retain the view.
* Source/NSOutline.m(-drawRow:clipRect:): The selected cell shows
its first responder state.
Patch by Frank LeGrand <frank.legrand@testplant.com>
2013-03-17 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSEvent.m,

View file

@ -966,6 +966,7 @@ static NSImage *unexpandable = nil;
if (i == _editedColumn && rowIndex == _editedRow)
{
[cell _setInEditing: YES];
[cell setShowsFirstResponder: YES];
}
[self _willDisplayCell: cell
forTableColumn: tb
@ -1033,7 +1034,10 @@ static NSImage *unexpandable = nil;
[cell drawWithFrame: drawingRect inView: self];
if (i == _editedColumn && rowIndex == _editedRow)
[cell _setInEditing: NO];
{
[cell _setInEditing: NO];
[cell setShowsFirstResponder: NO];
}
}
}

View file

@ -27,9 +27,11 @@
#import <Foundation/NSArray.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSKeyedArchiver.h>
#import <Foundation/NSString.h>
#import "AppKit/NSKeyValueBinding.h"
#import "AppKit/NSNib.h"
#import "AppKit/NSView.h"
#import "AppKit/NSViewController.h"
@ -60,7 +62,8 @@
DESTROY(_editors);
DESTROY(_autounbinder);
DESTROY(_designNibBundleIdentifier);
DESTROY(view);
[super dealloc];
}
@ -95,7 +98,10 @@
- (void)setView:(NSView *)aView
{
view = aView;
if (view != aView)
{
ASSIGN(view, aView);
}
}
- (void)loadView
@ -137,6 +143,42 @@
return _nibBundle;
}
- (id) initWithCoder: (NSCoder *)aDecoder
{
self = [super initWithCoder: aDecoder];
if (!self)
{
return nil;
}
if ([aDecoder allowsKeyedCoding])
{
NSView *aView = [aDecoder decodeObjectForKey: @"NSView"];
[self setView: aView];
}
else
{
NSView *aView;
[aDecoder decodeValueOfObjCType: @encode(id) at: &aView];
[self setView: aView];
}
return self;
}
- (void) encodeWithCoder: (NSCoder *)aCoder
{
[super encodeWithCoder: aCoder];
if ([aCoder allowsKeyedCoding])
{
[aCoder encodeObject: [self view] forKey: @"NSView"];
}
else
{
[aCoder encodeObject: [self view]];
}
}
@end
@implementation NSViewController (NSEditorRegistration)