aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-12-01 12:41:11 +0000
committerBibiko <bibiko@eva.mpg.de>2010-12-01 12:41:11 +0000
commit426b66613cd49497b4e8ad4246031c0e43b2ec27 (patch)
tree79578d36c6e4b0f977a4c781e83413358c4241bf
parent019a1015546ab203eb366a71811d6c75b130fd40 (diff)
downloadsequelpro-426b66613cd49497b4e8ad4246031c0e43b2ec27.tar.gz
sequelpro-426b66613cd49497b4e8ad4246031c0e43b2ec27.tar.bz2
sequelpro-426b66613cd49497b4e8ad4246031c0e43b2ec27.zip
• Bundle Editor : ESC while bundle file renaming aborts editing
• after closing HTML output window reset windowUUID to allow to come up with a new window for the same command from same caller instance
-rw-r--r--Source/SPBundleEditorController.m17
-rw-r--r--Source/SPBundleHTMLOutputController.m1
2 files changed, 18 insertions, 0 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 4f415416..823feae8 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -1138,6 +1138,23 @@
#pragma mark -
#pragma mark TableView delegate
+/**
+ * Traps enter and esc and edit/cancel without entering next row
+ */
+- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
+{
+ if ( [[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(_cancelKey:)] ||
+ [textView methodForSelector:command] == [textView methodForSelector:@selector(complete:)] ) {
+
+ //abort editing
+ [control abortEditing];
+ [[NSApp mainWindow] makeFirstResponder:commandsOutlineView];
+ return TRUE;
+ } else{
+ return FALSE;
+ }
+}
+
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
{
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 3f6d4046..5d3d0ddf 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -167,6 +167,7 @@
- (void)windowShouldClose:(NSNotification *)notification
{
[webView close];
+ windowUUID = @"";
}
#pragma mark -