]> granicus.if.org Git - handbrake/commitdiff
MacGui: Add stdout to the Debug Inspector window
authordynaflash <dynaflashtech@gmail.com>
Mon, 4 Jun 2007 19:55:45 +0000 (19:55 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Mon, 4 Jun 2007 19:55:45 +0000 (19:55 +0000)
- thanks again to Cleaner

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@596 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/HBOutputPanelController.m

index 195498654c485336ebef4c16a44f59cc8867a004..b3a8d884ee8fcfe36ab6ae742265f1a637248c7b 100644 (file)
@@ -26,6 +26,7 @@
        {
                outputTextStorage = [[NSTextStorage alloc] init];
                [[HBOutputRedirect stderrRedirect] addListener:self];
+               [[HBOutputRedirect stdoutRedirect] addListener:self];
        }
        return self;
 }
@@ -35,7 +36,8 @@
  */
 - (void)dealloc
 {
-       [[HBOutputRedirect stderrRedirect] removeListener:self];        
+       [[HBOutputRedirect stderrRedirect] removeListener:self];
+       [[HBOutputRedirect stdoutRedirect] removeListener:self];        
        [outputTextStorage release];
        [outputPanel release];
        [super dealloc];
@@ -73,6 +75,7 @@
 
     [textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)];
 }
+- (void)stdoutRedirect:(NSString *)text { [self stderrRedirect:text]; }
 
 /**
  * Clears the output window.