diff options
author | dynaflash <[email protected]> | 2007-11-16 13:17:00 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2007-11-16 13:17:00 +0000 |
commit | 374a7b7ef9ab2cce69497ad418a9ebe61975f1c0 (patch) | |
tree | a20f100362a5e57f9831716f914e35a12f00864a | |
parent | b544c3074e77ddac3c4e66000448baab67b3882a (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
-rw-r--r-- | macosx/English.lproj/OutputPanel.nib/classes.nib | 1 | ||||
-rw-r--r-- | macosx/English.lproj/OutputPanel.nib/info.nib | 6 | ||||
-rw-r--r-- | macosx/English.lproj/OutputPanel.nib/keyedobjects.nib | bin | 6282 -> 6629 bytes | |||
-rw-r--r-- | macosx/HBOutputPanelController.h | 1 | ||||
-rw-r--r-- | macosx/HBOutputPanelController.m | 12 |
5 files changed, 15 insertions, 5 deletions
diff --git a/macosx/English.lproj/OutputPanel.nib/classes.nib b/macosx/English.lproj/OutputPanel.nib/classes.nib index cadaf1e67..0727f5d79 100644 --- a/macosx/English.lproj/OutputPanel.nib/classes.nib +++ b/macosx/English.lproj/OutputPanel.nib/classes.nib @@ -3,6 +3,7 @@ {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { ACTIONS = { + clearActivityLogFile = id; clearOutput = id; copyAllOutputToPasteboard = id; openActivityLogFile = id; diff --git a/macosx/English.lproj/OutputPanel.nib/info.nib b/macosx/English.lproj/OutputPanel.nib/info.nib index 6f50f595a..f2041fac9 100644 --- a/macosx/English.lproj/OutputPanel.nib/info.nib +++ b/macosx/English.lproj/OutputPanel.nib/info.nib @@ -7,16 +7,16 @@ <key>IBEditorPositions</key> <dict> <key>11</key> - <string>98 338 145 68 0 0 1440 878 </string> + <string>309 264 145 87 0 0 1440 878 </string> </dict> <key>IBFramework Version</key> <string>446.1</string> <key>IBOpenObjects</key> <array> - <integer>11</integer> <integer>5</integer> + <integer>11</integer> </array> <key>IBSystem Version</key> - <string>8R2218</string> + <string>8S2167</string> </dict> </plist> diff --git a/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib b/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib Binary files differindex 09f7dd7d2..0b5b3c545 100644 --- a/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib +++ b/macosx/English.lproj/OutputPanel.nib/keyedobjects.nib diff --git a/macosx/HBOutputPanelController.h b/macosx/HBOutputPanelController.h index b61fa20ff..bbfe405f3 100644 --- a/macosx/HBOutputPanelController.h +++ b/macosx/HBOutputPanelController.h @@ -30,5 +30,6 @@ - (IBAction)clearOutput:(id)sender; - (IBAction)copyAllOutputToPasteboard:(id)sender; - (IBAction)openActivityLogFile:(id)sender; +- (IBAction)clearActivityLogFile:(id)sender; @end 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"]; |