Revision: 15211
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=15211&view=rev
Author: hofman
Date: 2009-04-27 12:12:39 +0000 (Mon, 27 Apr 2009)
Log Message:
-----------
collapse initializer chain for BDSKPreviewer as we never use one with a custom
working dir
Modified Paths:
--------------
trunk/bibdesk/BDSKTeXTask.h
trunk/bibdesk/BDSKTeXTask.m
Modified: trunk/bibdesk/BDSKTeXTask.h
===================================================================
--- trunk/bibdesk/BDSKTeXTask.h 2009-04-27 11:42:32 UTC (rev 15210)
+++ trunk/bibdesk/BDSKTeXTask.h 2009-04-27 12:12:39 UTC (rev 15211)
@@ -73,7 +73,6 @@
- (id)init;
- (id)initWithFileName:(NSString *)fileName;
-- (id)initWithWorkingDirPath:(NSString *)dirPath fileName:(NSString *)fileName;
- (id)delegate;
- (void)setDelegate:(id)newDelegate;
Modified: trunk/bibdesk/BDSKTeXTask.m
===================================================================
--- trunk/bibdesk/BDSKTeXTask.m 2009-04-27 11:42:32 UTC (rev 15210)
+++ trunk/bibdesk/BDSKTeXTask.m 2009-04-27 12:12:39 UTC (rev 15211)
@@ -131,27 +131,17 @@
}
- (id)init{
- NSString *tmpDirPath = [[NSFileManager defaultManager]
makeTemporaryDirectoryWithBasename:@"tmpbib"];
- self = [self initWithWorkingDirPath:tmpDirPath fileName:@"tmpbib"];
- return self;
+ return [self initWithFileName:@"tmpbib"];
}
- (id)initWithFileName:(NSString *)newFileName{
- NSString *tmpDirPath = [[NSFileManager defaultManager]
makeTemporaryDirectoryWithBasename:newFileName];
- self = [self initWithWorkingDirPath:tmpDirPath fileName:newFileName];
- return self;
-}
-
-- (id)initWithWorkingDirPath:(NSString *)dirPath fileName:(NSString
*)newFileName{
if (self = [super init]) {
NSFileManager *fm = [NSFileManager defaultManager];
-
- if (![fm objectExistsAtFileURL:[NSURL fileURLWithPath:dirPath]])
- [fm createDirectoryAtPathWithNoAttributes:dirPath];
-
+ NSString *dirPath = [fm
makeTemporaryDirectoryWithBasename:newFileName];
+ NSParameterAssert([fm fileExistsAtPath:dirPath]);
texTemplatePath = [[[fm
currentApplicationSupportPathForCurrentUser]
stringByAppendingPathComponent:@"previewtemplate.tex"] copy];
-
+
NSString *filePath = [dirPath
stringByAppendingPathComponent:newFileName];
texPath = [[BDSKTeXPath alloc] initWithBasePath:filePath];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit