diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-11-26 11:33:18 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-11-26 11:33:18 +0000 |
commit | e586eaef2eadcf3eccbb6f81d33bf005081451f2 (patch) | |
tree | 91db75a6b0975cb7053b8449716be648416d19ff /Source/SPTextViewAdditions.m | |
parent | 0898dd7e4da0becb043f3ae3d37ccc4c0c13c44e (diff) | |
download | sequelpro-e586eaef2eadcf3eccbb6f81d33bf005081451f2.tar.gz sequelpro-e586eaef2eadcf3eccbb6f81d33bf005081451f2.tar.bz2 sequelpro-e586eaef2eadcf3eccbb6f81d33bf005081451f2.zip |
• Bundle Command support
- added shell var SP_ICON_FILE
- a bundle command which outputs its result as HTML window will write the data in the same window, ie it won't be create each time a new window; the window will be identified by the bundle's uuid
- fixed issue while saving a short-cut in keybinding.dict format, now it ignores possible diacritics - maybe bug in ShortcutRecorder for method [aRecorder keyCharsIgnoringModifiers] since in the objectValue it's set correctly
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r-- | Source/SPTextViewAdditions.m | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m index 4afea05f..0c9fe630 100644 --- a/Source/SPTextViewAdditions.m +++ b/Source/SPTextViewAdditions.m @@ -621,8 +621,21 @@ } else if([action isEqualToString:SPBundleOutputActionShowAsHTML]) { - SPBundleHTMLOutputController *c = [[SPBundleHTMLOutputController alloc] init]; - [c displayHTMLContent:output withOptions:nil]; + BOOL correspondingWindowFound = NO; + for(id win in [NSApp windows]) { + if([[win delegate] isKindOfClass:[SPBundleHTMLOutputController class]]) { + if([[[win delegate] windowUUID] isEqualToString:[cmdData objectForKey:SPBundleFileUUIDKey]]) { + correspondingWindowFound = YES; + [[win delegate] displayHTMLContent:output withOptions:nil]; + break; + } + } + } + if(!correspondingWindowFound) { + SPBundleHTMLOutputController *c = [[SPBundleHTMLOutputController alloc] init]; + [c setWindowUUID:[cmdData objectForKey:SPBundleFileUUIDKey]]; + [c displayHTMLContent:output withOptions:nil]; + } } if([self isEditable]) { |