diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-12-01 23:49:55 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-12-01 23:49:55 +0000 |
commit | 4801fedd91e3a6abb1ee6a7aa1174a089bf6e547 (patch) | |
tree | 83de108f27534334f95c2198de13ad4686e3164d /Source/SPBundleHTMLOutputController.m | |
parent | 842e85a37b698be1245dee0948a1abd99973638c (diff) | |
download | sequelpro-4801fedd91e3a6abb1ee6a7aa1174a089bf6e547.tar.gz sequelpro-4801fedd91e3a6abb1ee6a7aa1174a089bf6e547.tar.bz2 sequelpro-4801fedd91e3a6abb1ee6a7aa1174a089bf6e547.zip |
• Bundle Commands
- make sure that each HTML output window will be released
- if a triggered command will outputs its result in an HTML window invoke it only if the HTML output window is already open; this enables the user to "switch on/off" such a trigger
Diffstat (limited to 'Source/SPBundleHTMLOutputController.m')
-rw-r--r-- | Source/SPBundleHTMLOutputController.m | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m index a4c79edc..b89606f9 100644 --- a/Source/SPBundleHTMLOutputController.m +++ b/Source/SPBundleHTMLOutputController.m @@ -63,7 +63,7 @@ [webView setDrawsBackground:YES]; [webView setEditable:NO]; [webView setShouldCloseWithWindow:YES]; - [webView setShouldUpdateWhileOffscreen:YES]; + [webView setShouldUpdateWhileOffscreen:NO]; } @@ -74,8 +74,8 @@ NSString *fullContent = @"%@"; fullContent = [NSString stringWithFormat:fullContent, content]; - [self setInitHTMLSourceString:fullContent]; + [[webView mainFrame] loadHTMLString:@"<html></html>" baseURL:nil]; [[webView mainFrame] loadHTMLString:fullContent baseURL:nil]; } @@ -115,10 +115,10 @@ { if(webView) [webView release]; if(webPreferences) [webPreferences release]; - [super dealloc]; + // [super dealloc]; } -- (void) keyDown:(NSEvent *)theEvent +- (void)keyDown:(NSEvent *)theEvent { long allFlags = (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask); @@ -164,10 +164,13 @@ #pragma mark - -- (void)windowShouldClose:(NSNotification *)notification +- (void)windowWillClose:(NSNotification *)notification { + [[webView mainFrame] loadHTMLString:@"<html></html>" baseURL:nil]; [webView close]; + [self setInitHTMLSourceString:@""]; windowUUID = @""; + // [[notification object] release]; } #pragma mark - @@ -177,6 +180,7 @@ if(request != nil) { SPBundleHTMLOutputController *c = [[SPBundleHTMLOutputController alloc] init]; [c displayURLString:[[request URL] absoluteString] withOptions:nil]; + [[NSApp delegate] addHTMLOutputController:c]; return [c webView]; } return nil; |