mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 20:50:44 +00:00
When moving in the key view loop, select text of newly selected view if it
is a kind of text field. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5183 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bef28d93e3
commit
6e128ebe88
1 changed files with 22 additions and 4 deletions
|
@ -131,6 +131,7 @@ static IMP ccImp;
|
|||
static IMP ctImp;
|
||||
static Class responderClass;
|
||||
static Class viewClass;
|
||||
static Class textFieldClass;
|
||||
static NSMutableSet *autosaveNames;
|
||||
static NSRecursiveLock *windowsLock;
|
||||
static NSMapTable* windowmaps = NULL;
|
||||
|
@ -148,6 +149,7 @@ static NSMapTable* windowmaps = NULL;
|
|||
ctImp = [self instanceMethodForSelector: ctSel];
|
||||
responderClass = [NSResponder class];
|
||||
viewClass = [NSView class];
|
||||
textFieldClass = [NSTextField class];
|
||||
autosaveNames = [NSMutableSet new];
|
||||
windowsLock = [NSRecursiveLock new];
|
||||
}
|
||||
|
@ -1946,7 +1948,11 @@ static NSMapTable* windowmaps = NULL;
|
|||
if ([aView isKindOfClass: viewClass])
|
||||
theView = [aView nextValidKeyView];
|
||||
if (theView)
|
||||
[self makeFirstResponder: theView];
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if ([theView isKindOfClass: textFieldClass])
|
||||
[(NSTextField *)theView selectText: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) selectKeyViewPrecedingView: (NSView *)aView
|
||||
|
@ -1956,7 +1962,11 @@ static NSMapTable* windowmaps = NULL;
|
|||
if ([aView isKindOfClass: viewClass])
|
||||
theView = [aView previousValidKeyView];
|
||||
if (theView)
|
||||
[self makeFirstResponder: theView];
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if ([theView isKindOfClass: textFieldClass])
|
||||
[(NSTextField *)theView selectText: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) selectNextKeyView: (id)sender
|
||||
|
@ -1975,7 +1985,11 @@ static NSMapTable* windowmaps = NULL;
|
|||
}
|
||||
|
||||
if (theView)
|
||||
[self makeFirstResponder: theView];
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if ([theView isKindOfClass: textFieldClass])
|
||||
[(NSTextField *)theView selectText: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) selectPreviousKeyView: (id)sender
|
||||
|
@ -1994,7 +2008,11 @@ static NSMapTable* windowmaps = NULL;
|
|||
}
|
||||
|
||||
if (theView)
|
||||
[self makeFirstResponder: theView];
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if ([theView isKindOfClass: textFieldClass])
|
||||
[(NSTextField *)theView selectText: self];
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue