make the search field in the cookie sheets the first responder. also put

the search fields into the key loop for full keyboard access. put the hack
for tabbing with search fields on toolbars into code that's more restrictive
to the search bar only being on a toolbar so it works more normally when
used in situations such as this in a normal key loop (bug 281031)


git-svn-id: svn://10.0.0.236/trunk@172673 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%aol.net 2005-04-24 20:27:29 +00:00
parent a51d83f7e9
commit 357b714eaf
3 changed files with 25 additions and 9 deletions

View File

@ -3,10 +3,14 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>139 60 356 240 0 0 1600 1002 </string>
<string>103 92 356 240 0 0 1280 832 </string>
<key>IBFramework Version</key>
<string>364.0</string>
<key>IBOpenObjects</key>
<array>
<integer>401</integer>
</array>
<key>IBSystem Version</key>
<string>7S215</string>
<string>7U16</string>
</dict>
</plist>

View File

@ -219,15 +219,27 @@
// If the user hit tab, go to the next key view
case NSTabTextMovement:
{
// [[self window] selectKeyViewFollowingView:self];
// we should be able to just select the next key view, but at some point we have
// to break the cycle and kick the user off the toolbar. Do it here. Selecting
// the window allows us to tab into the content area.
NSWindow* wind = [self window];
[wind makeFirstResponder:wind];
// if ([[self window] firstResponder] == [self window])
// [self selectText:self];
// the window allows us to tab into the content area (assuming we're on a toolbar).
BOOL isOnToolbar = NO;
NSView* parent = [self superview];
while (parent) {
if ([parent isKindOfClass:[NSToolbar class]])
isOnToolbar = YES;
parent = [parent superview];
}
if (isOnToolbar) {
// HACK: we're on a toolbar, make life not suck
NSWindow* wind = [self window];
[wind makeFirstResponder:wind];
}
else {
// do the normal key loop thang
[[self window] selectKeyViewFollowingView:self];
if ([[self window] firstResponder] == [self window])
[self selectText:self];
}
}
break;