aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldEditorController.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-10-29 22:52:44 +0000
committerBibiko <bibiko@eva.mpg.de>2010-10-29 22:52:44 +0000
commit8a061fc1d3903ca61ab6287ce822ab8d500ce4bb (patch)
tree217ed443792333a0c8d1f900760714a672be6691 /Source/SPFieldEditorController.m
parentc9b0e698e7d2bcdbe7257555f54de62241db0531 (diff)
downloadsequelpro-8a061fc1d3903ca61ab6287ce822ab8d500ce4bb.tar.gz
sequelpro-8a061fc1d3903ca61ab6287ce822ab8d500ce4bb.tar.bz2
sequelpro-8a061fc1d3903ca61ab6287ce822ab8d500ce4bb.zip
• enabled Find Panel inside Field Editor Sheet's textView
- to enable Find Panel in such a NSTextView which will be displayed in a sheet one has to do the following: * [main problem is that Find Panel validates its buttons against [[NSApp mainWindow] firstResponder] == NSTextView] * subclass the NSTextView and add the methods becomeFirstResponder and resignFirstResponder which has to return YES * since the last first responder remains the first mainWindow responder status one has to set [[NSApp mainWindow] makeFirstResponder:theTextView] directly after displaying the sheet • corrected SPUserManager message in (IBAction)removeHost:
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r--Source/SPFieldEditorController.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index b8b250ce..05266381 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -423,6 +423,14 @@
[editSheetProgressBar stopAnimation:self];
+ // The field editor sheet runs as sheet thus a NSTextView won't respond to the Find Panel
+ // since the Find Panel validate its buttons against [[NSApp mainWindow] firstResponder] == NSTextView.
+ // After ordering out this sheet SPCopyTable remains the first responder thus set it hard.
+ // This only works in conjunction with [NSTextView becomeFirstResponder] and [NSTextView resignFirstResponder]
+ // which has to return YES.
+ if([[self window] firstResponder] == editTextView)
+ [[NSApp mainWindow] makeFirstResponder:[[self window] firstResponder]];
+
}
}
@@ -507,6 +515,7 @@
[hexTextView setHidden:YES];
[hexTextScrollView setHidden:YES];
[usedSheet makeFirstResponder:editTextView];
+ [[NSApp mainWindow] makeFirstResponder:editTextView];
break;
case 1: // image
[editTextView setHidden:YES];