aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPEditSheetTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-11-19 12:26:45 +0000
committerBibiko <bibiko@eva.mpg.de>2010-11-19 12:26:45 +0000
commit823ce1e87ff4d2a333ff64c17ef818a3afbffca7 (patch)
tree301d4f517f273a22c6e0388e050b572730ad9f96 /Source/SPEditSheetTextView.m
parentb5c4f326fb175499d0b837cb325b9eeea676fb4f (diff)
downloadsequelpro-823ce1e87ff4d2a333ff64c17ef818a3afbffca7.tar.gz
sequelpro-823ce1e87ff4d2a333ff64c17ef818a3afbffca7.tar.bz2
sequelpro-823ce1e87ff4d2a333ff64c17ef818a3afbffca7.zip
• Bundle Editor
- minor fixes - command textView is now a SPEditSheetTextView for better undo behaviour and font storing in the Prefs if changed - if Bundle Editor is already opened ^⌥⌘B brings it to the front • the installation of spTheme and spBundle files (via eg double-clicking at them in Finder) now moves the files to SP's application folder (if successful)
Diffstat (limited to 'Source/SPEditSheetTextView.m')
-rw-r--r--Source/SPEditSheetTextView.m14
1 files changed, 12 insertions, 2 deletions
diff --git a/Source/SPEditSheetTextView.m b/Source/SPEditSheetTextView.m
index 7ac5185f..bd0c5a88 100644
--- a/Source/SPEditSheetTextView.m
+++ b/Source/SPEditSheetTextView.m
@@ -53,14 +53,16 @@
- (IBAction)paste:(id)sender
{
// Try to create an undo group
- [[self delegate] setWasCutPaste];
+ if([[self delegate] respondsToSelector:@selector(setWasCutPaste)])
+ [[self delegate] setWasCutPaste];
[super paste:sender];
}
- (IBAction)cut:(id)sender
{
// Try to create an undo group
- [[self delegate] setWasCutPaste];
+ if([[self delegate] respondsToSelector:@selector(setWasCutPaste)])
+ [[self delegate] setWasCutPaste];
[super cut:sender];
}
@@ -126,6 +128,12 @@
[[self delegate] setDoGroupDueToChars];
}
+
+ if([[[[self delegate] class] description] isEqualToString:@"SPBundleEditorController"]) {
+ [super keyDown: theEvent];
+ return;
+ }
+
// Check for assign key equivalents inside user-defined bundle commands
NSDictionary *keyEquivalents = [[NSApp delegate] bundleKeyEquivalentsForScope:SPBundleScopeInputField];
if([keyEquivalents count]) {
@@ -332,6 +340,8 @@
{
if([[[[self delegate] class] description] isEqualToString:@"SPFieldEditorController"])
[[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:[self font]] forKey:@"FieldEditorSheetFont"];
+ else if([[[[self delegate] class] description] isEqualToString:@"SPBundleEditorController"])
+ [[NSUserDefaults standardUserDefaults] setObject:[NSArchiver archivedDataWithRootObject:[self font]] forKey:@"BundleEditorFont"];
}
// Action receiver for a font change in the font panel