X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=macosx%2FHBOutputPanelController.m;h=41506b9b2996faecc522d2bb0d065cc4af9c3378;hb=f9341345b37e0738a140423297c222a7e40eddab;hp=e504a5ff57c3c58da2f8b55469b8521a56f98ce0;hpb=34b1fc6c796407b498bd8f40156a7274ca80fa01;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m index e504a5ff..41506b9b 100644 --- a/macosx/HBOutputPanelController.m +++ b/macosx/HBOutputPanelController.m @@ -91,10 +91,17 @@ */ - (IBAction)showOutputPanel:(id)sender { + if ([[self window] isVisible]) + { + [[self window] close]; + } + else + { [textView scrollRangeToVisible:NSMakeRange([outputTextStorage length], 0)]; [self showWindow:sender]; [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"OutputPanelIsOpen"]; + } } - (void) startEncodeLog:(NSString *) logPath @@ -113,7 +120,7 @@ /* We need to get the current time in YY-MM-DD HH-MM-SS format to put at the beginning of the name of the log file */ time_t _now = time( NULL ); struct tm * now = localtime( &_now ); - NSString *dateForLogTitle = [NSString stringWithFormat:@"%02d-%02d-%02d %02d-%02d-%02d",now->tm_year + 1900, now->tm_mon, now->tm_mday,now->tm_hour, now->tm_min, now->tm_sec]; + NSString *dateForLogTitle = [NSString stringWithFormat:@"%02d-%02d-%02d %02d-%02d-%02d",now->tm_year + 1900, now->tm_mon + 1, now->tm_mday,now->tm_hour, now->tm_min, now->tm_sec]; /* Assemble the new log file name as YY-MM-DD HH-MM-SS mymoviename.txt */ NSString *outputDateFileName = [NSString stringWithFormat:@"%@ %@.txt",dateForLogTitle,[[outputFileForEncode lastPathComponent] stringByDeletingPathExtension]];