summaryrefslogtreecommitdiffstats
path: root/macosx/HBOutputPanelController.m
diff options
context:
space:
mode:
authorritsuka <[email protected]>2014-07-16 06:20:57 +0000
committerritsuka <[email protected]>2014-07-16 06:20:57 +0000
commit0e165d0a096d606b52b1bcace1911c7d0c24be04 (patch)
treee2d54585d8518d8c69dd77335db0d78d1075c26b /macosx/HBOutputPanelController.m
parent31283b442713147dc5edb5135cb6dbcbb95635e8 (diff)
MacGui: moved two methods used by the whole app to HBUtilities.m:
- appSupportPath: - writeToActivityLog: git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6232 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBOutputPanelController.m')
-rw-r--r--macosx/HBOutputPanelController.m14
1 files changed, 4 insertions, 10 deletions
diff --git a/macosx/HBOutputPanelController.m b/macosx/HBOutputPanelController.m
index 2b9fcfec5..c59d70ac1 100644
--- a/macosx/HBOutputPanelController.m
+++ b/macosx/HBOutputPanelController.m
@@ -7,6 +7,7 @@
#import "HBOutputPanelController.h"
#import "HBOutputRedirect.h"
+#import "HBUtilities.h"
/// Maximum amount of characters that can be shown in the view.
// Original value used by cleaner
@@ -48,8 +49,7 @@
* 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
*/
- outputLogFile = @"~/Library/Application Support/HandBrake/HandBrake-activitylog.txt";
- outputLogFile = [[outputLogFile stringByExpandingTildeInPath]retain];
+ outputLogFile = [[[HBUtilities appSupportPath] stringByAppendingPathComponent:@"HandBrake-activitylog.txt"] retain];
/* We check for an existing output log file here */
if( [fileManager fileExistsAtPath:outputLogFile] == 0 )
@@ -131,10 +131,7 @@
}
else // if we are putting it in the default ~/Libraries/Application Support/HandBrake/EncodeLogs logs directory
{
- NSString *libraryDir = [NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
- NSUserDomainMask,
- YES ) objectAtIndex:0];
- NSString *encodeLogDirectory = [[[libraryDir stringByAppendingPathComponent:@"Application Support"] stringByAppendingPathComponent:@"HandBrake"] stringByAppendingPathComponent:@"EncodeLogs"];
+ NSString *encodeLogDirectory = [[HBUtilities appSupportPath] stringByAppendingPathComponent:@"EncodeLogs"];
if( ![[NSFileManager defaultManager] fileExistsAtPath:encodeLogDirectory] )
{
[[NSFileManager defaultManager] createDirectoryAtPath:encodeLogDirectory
@@ -252,10 +249,7 @@
- (IBAction)openEncodeLogDirectory:(id)sender
{
/* Opens the activity window log file in the users default text editor */
- NSString *libraryDir = [NSSearchPathForDirectoriesInDomains( NSLibraryDirectory,
- NSUserDomainMask,
- YES ) objectAtIndex:0];
- NSString *encodeLogDirectory = [[[libraryDir stringByAppendingPathComponent:@"Application Support"] stringByAppendingPathComponent:@"HandBrake"] stringByAppendingPathComponent:@"EncodeLogs"];
+ NSString *encodeLogDirectory = [[HBUtilities appSupportPath] stringByAppendingPathComponent:@"EncodeLogs"];
if( ![[NSFileManager defaultManager] fileExistsAtPath:encodeLogDirectory] )
{
[[NSFileManager defaultManager] createDirectoryAtPath:encodeLogDirectory