summaryrefslogtreecommitdiffstats
path: root/macosx/HBOutputPanelController.m
diff options
context:
space:
mode:
authordynaflash <[email protected]>2007-11-16 13:17:00 +0000
committerdynaflash <[email protected]>2007-11-16 13:17:00 +0000
commit374a7b7ef9ab2cce69497ad418a9ebe61975f1c0 (patch)
treea20f100362a5e57f9831716f914e35a12f00864a /macosx/HBOutputPanelController.m
parentb544c3074e77ddac3c4e66000448baab67b3882a (diff)
MacGui: Activity Log
- Add "Clear Log" to the activity window contextual menu - Clears the log and prints a new date/time header in the log - Useful for starting a new log without having to relaunch HB. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1063 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBOutputPanelController.m')
-rw-r--r--macosx/HBOutputPanelController.m12
1 files changed, 10 insertions, 2 deletions
diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m
index fd5f71f99..4d60a648a 100644
--- a/macosx/HBOutputPanelController.m
+++ b/macosx/HBOutputPanelController.m
@@ -35,7 +35,7 @@
/* We declare the default NSFileManager into fileManager */
NSFileManager * fileManager = [NSFileManager defaultManager];
- /* Establish the log file and location to write to */
+ /* Establish the log file location to write to */
/* We are initially using a .txt file as opposed to a .log file since it will open by
* default with the users text editor instead of the .log default Console.app, should
* create less confusion for less experienced users when we ask them to paste the log for support
@@ -52,7 +52,7 @@
/* We overwrite the existing output log with the date for starters the output log to start fresh with the new session */
/* Use the current date and time for the new output log header */
- NSString *startOutputLogString = [NSString stringWithFormat: @"HandBrake Activity Log for Session Starting: %@\n\n", [[NSDate date] descriptionWithCalendarFormat:nil timeZone:nil locale:nil]];
+ NSString *startOutputLogString = [NSString stringWithFormat: @"HandBrake Activity Log for Session (Cleared): %@\n\n", [[NSDate date] descriptionWithCalendarFormat:nil timeZone:nil locale:nil]];
[startOutputLogString writeToFile:outputLogFile atomically:YES encoding:NSUTF8StringEncoding error:NULL];
@@ -173,6 +173,14 @@
[myScript release];
}
+- (IBAction)clearActivityLogFile:(id)sender
+{
+ /* We overwrite the existing output log with the new date and time header */
+ /* Use the current date and time for the new output log header */
+ NSString *startOutputLogString = [NSString stringWithFormat: @"HandBrake Activity Log for Session Starting: %@\n\n", [[NSDate date] descriptionWithCalendarFormat:nil timeZone:nil locale:nil]];
+ [startOutputLogString writeToFile:outputLogFile atomically:NO encoding:NSUTF8StringEncoding error:NULL];
+}
+
- (void)windowWillClose:(NSNotification *)aNotification
{
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"OutputPanelIsOpen"];