aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPEditSheetTextView.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/SPEditSheetTextView.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/SPEditSheetTextView.m')
-rw-r--r--Source/SPEditSheetTextView.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m
index e46868b7..ab6530e9 100644
--- a/Source/SPEditSheetTextView.m
+++ b/Source/SPEditSheetTextView.m
@@ -327,4 +327,21 @@
[self saveChangedFontInUserDefaults];
}
+/**
+ * Needed to allow Find Panel inside the textView if it runs in a sheet
+ */
+- (BOOL)becomeFirstResponder
+{
+ return YES;
+}
+
+/**
+ * Needed to allow Find Panel inside the textView if it runs in a sheet
+ */
+- (BOOL)resignFirstResponder
+{
+ return YES;
+}
+
+
@end