Revision: 18069
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18069&view=rev
Author:   hofman
Date:     2011-08-18 17:30:55 +0000 (Thu, 18 Aug 2011)

Log Message:
-----------
rename method for app support dir

Modified Paths:
--------------
    trunk/bibdesk/BDSKAppController.m
    trunk/bibdesk/BDSKBookmarkController.m
    trunk/bibdesk/BDSKCharacterConversion.m
    trunk/bibdesk/BDSKConverter.m
    trunk/bibdesk/BDSKSearchGroupServerManager.m
    trunk/bibdesk/BDSKTeXTask.m
    trunk/bibdesk/BDSKTemplate.m
    trunk/bibdesk/BDSKTypeManager.m
    trunk/bibdesk/BibPref_Files.m
    trunk/bibdesk/BibPref_ScriptHooks.m
    trunk/bibdesk/BibPref_TeX.m
    trunk/bibdesk/NSFileManager_BDSKExtensions.h
    trunk/bibdesk/NSFileManager_BDSKExtensions.m

Modified: trunk/bibdesk/BDSKAppController.m
===================================================================
--- trunk/bibdesk/BDSKAppController.m   2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BDSKAppController.m   2011-08-18 17:30:55 UTC (rev 18069)
@@ -319,7 +319,7 @@
     [fileManager copyFileFromSharedSupportToApplicationSupport:@"template.txt" 
overwrite:NO];   
     [fileManager 
copyFileFromSharedSupportToApplicationSupport:@"Bookmarks.plist" overwrite:NO]; 
  
 
-    NSString *scriptsPath = [[fileManager 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:@"Scripts"];
+    NSString *scriptsPath = [[fileManager applicationSupportDirectory] 
stringByAppendingPathComponent:@"Scripts"];
     if ([fileManager fileExistsAtPath:scriptsPath] == NO)
         [fileManager createDirectoryAtPath:scriptsPath 
withIntermediateDirectories:NO attributes:nil error:NULL];
     
@@ -335,7 +335,7 @@
     [[WebPreferences standardPreferences] 
setCacheModel:WebCacheModelDocumentBrowser];
     
     WebHistory *history = [[[WebHistory alloc] init] autorelease];
-    NSString *historyPath = [[[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:@"History.plist"];
+    NSString *historyPath = [[[NSFileManager defaultManager] 
applicationSupportDirectory] stringByAppendingPathComponent:@"History.plist"];
     if ([[NSFileManager defaultManager] fileExistsAtPath:historyPath])
         [history loadFromURL:[NSURL fileURLWithPath:historyPath] error:NULL];
     [WebHistory setOptionalSharedHistory:history];
@@ -434,7 +434,7 @@
 }
 
 - (void)applicationWillTerminate:(NSNotification *)notification {
-    NSString *historyPath = [[[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:@"History.plist"];
+    NSString *historyPath = [[[NSFileManager defaultManager] 
applicationSupportDirectory] stringByAppendingPathComponent:@"History.plist"];
     [[WebHistory optionalSharedHistory] saveToURL:[NSURL 
fileURLWithPath:historyPath] error:NULL];
 }
 

Modified: trunk/bibdesk/BDSKBookmarkController.m
===================================================================
--- trunk/bibdesk/BDSKBookmarkController.m      2011-08-18 06:35:20 UTC (rev 
18068)
+++ trunk/bibdesk/BDSKBookmarkController.m      2011-08-18 17:30:55 UTC (rev 
18069)
@@ -95,7 +95,7 @@
             undoManager = nil;
             
             NSMutableArray *bookmarks = [NSMutableArray array];
-            NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser]; 
+            NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory]; 
             NSString *bookmarksPath = [applicationSupportPath 
stringByAppendingPathComponent:@"Bookmarks.plist"];
             if ([[NSFileManager defaultManager] 
fileExistsAtPath:bookmarksPath]) {
                 for (NSDictionary *dict in [NSArray 
arrayWithContentsOfFile:bookmarksPath]) {
@@ -292,7 +292,7 @@
                return;
        }
        
-       NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser]; 
+       NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory]; 
        NSString *bookmarksPath = [applicationSupportPath 
stringByAppendingPathComponent:@"Bookmarks.plist"];
        [data writeToFile:bookmarksPath atomically:YES];
 }

Modified: trunk/bibdesk/BDSKCharacterConversion.m
===================================================================
--- trunk/bibdesk/BDSKCharacterConversion.m     2011-08-18 06:35:20 UTC (rev 
18068)
+++ trunk/bibdesk/BDSKCharacterConversion.m     2011-08-18 17:30:55 UTC (rev 
18069)
@@ -86,7 +86,7 @@
 - (void)updateDicts {
        // try to read the user file in the Application Support directory
        NSFileManager *fm = [NSFileManager defaultManager];
-       NSString *applicationSupportPath = [fm 
currentApplicationSupportPathForCurrentUser];
+       NSString *applicationSupportPath = [fm applicationSupportDirectory];
        NSString *charConvPath = [applicationSupportPath 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME];
        NSDictionary *tmpDict = [NSDictionary 
dictionaryWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME]];
        
@@ -213,7 +213,7 @@
             NSLog(@"Error writing: %@", error);
             [error release];
         } else {
-            NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser]; 
+            NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory]; 
             NSString *charConvPath = [applicationSupportPath 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME];
             [data writeToFile:charConvPath atomically:YES];
         }

Modified: trunk/bibdesk/BDSKConverter.m
===================================================================
--- trunk/bibdesk/BDSKConverter.m       2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BDSKConverter.m       2011-08-18 17:30:55 UTC (rev 18069)
@@ -78,7 +78,7 @@
        NSDictionary *userWholeDict = nil;
     // look for the user file
     NSFileManager *fm = [NSFileManager defaultManager];
-    NSString *charConvPath = [[fm currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME];
+    NSString *charConvPath = [[fm applicationSupportDirectory] 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME];
        
        if ([fm fileExistsAtPath:charConvPath]) {
                userWholeDict = [NSDictionary 
dictionaryWithContentsOfFile:charConvPath];

Modified: trunk/bibdesk/BDSKSearchGroupServerManager.m
===================================================================
--- trunk/bibdesk/BDSKSearchGroupServerManager.m        2011-08-18 06:35:20 UTC 
(rev 18068)
+++ trunk/bibdesk/BDSKSearchGroupServerManager.m        2011-08-18 17:30:55 UTC 
(rev 18069)
@@ -59,7 +59,7 @@
 }
 
 - (void)loadCustomServers {
-    NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser]; 
+    NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory]; 
     NSString *serversPath = [applicationSupportPath 
stringByAppendingPathComponent:SERVERS_DIRNAME];
     BOOL isDir = NO;
     if ([[NSFileManager defaultManager] fileExistsAtPath:serversPath 
isDirectory:&isDir] && isDir) {
@@ -129,7 +129,7 @@
         NSLog(@"Error writing: %@", error);
         [error release];
     } else {
-        NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser];
+        NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory];
         NSString *serversPath = [applicationSupportPath 
stringByAppendingPathComponent:SERVERS_DIRNAME];
         BOOL isDir = NO;
         if ([[NSFileManager defaultManager] fileExistsAtPath:serversPath 
isDirectory:&isDir] == NO) {

Modified: trunk/bibdesk/BDSKTeXTask.m
===================================================================
--- trunk/bibdesk/BDSKTeXTask.m 2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BDSKTeXTask.m 2011-08-18 17:30:55 UTC (rev 18069)
@@ -97,7 +97,7 @@
 // modify the TeX template in application support
 static void upgradeTemplate()
 {
-    NSString *texTemplatePath = [[[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:@"previewtemplate.tex"];
+    NSString *texTemplatePath = [[[NSFileManager defaultManager] 
applicationSupportDirectory] 
stringByAppendingPathComponent:@"previewtemplate.tex"];
     NSStringEncoding encoding = [[NSUserDefaults standardUserDefaults] 
integerForKey:BDSKTeXPreviewFileEncodingKey];
     
     NSMutableString *texFile = [[NSMutableString alloc] 
initWithContentsOfFile:texTemplatePath encoding:encoding error:NULL];
@@ -143,7 +143,7 @@
                NSFileManager *fm = [NSFileManager defaultManager];
         NSString *dirPath = [fm 
makeTemporaryDirectoryWithBasename:newFileName];
         NSParameterAssert([fm fileExistsAtPath:dirPath]);
-               texTemplatePath = [[[fm 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:@"previewtemplate.tex"] copy];
+               texTemplatePath = [[[fm applicationSupportDirectory] 
stringByAppendingPathComponent:@"previewtemplate.tex"] copy];
         
                NSString *filePath = [dirPath 
stringByAppendingPathComponent:newFileName];
         texPath = [[BDSKTeXPath alloc] initWithBasePath:filePath];
@@ -442,7 +442,7 @@
 @implementation BDSKTeXTask (Private)
 
 - (NSArray *)helperFilePaths{
-    UKDirectoryEnumerator *enumerator = [UKDirectoryEnumerator 
enumeratorWithPath:[[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser]];
+    UKDirectoryEnumerator *enumerator = [UKDirectoryEnumerator 
enumeratorWithPath:[[NSFileManager defaultManager] 
applicationSupportDirectory]];
     [enumerator setDesiredInfo:kFSCatInfoNodeFlags];
     
        NSString *path = nil;

Modified: trunk/bibdesk/BDSKTemplate.m
===================================================================
--- trunk/bibdesk/BDSKTemplate.m        2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BDSKTemplate.m        2011-08-18 17:30:55 UTC (rev 18069)
@@ -151,7 +151,7 @@
 + (NSArray *)defaultExportTemplates
 {
     NSMutableArray *itemNodes = [[NSMutableArray alloc] initWithCapacity:4];
-    NSString *appSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser];
+    NSString *appSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory];
     NSString *templatesPath = [appSupportPath 
stringByAppendingPathComponent:@"Templates"];
     BDSKTemplate *template = nil;
     NSURL *fileURL = nil;
@@ -192,7 +192,7 @@
 + (NSArray *)defaultServiceTemplates
 {
     NSMutableArray *itemNodes = [[NSMutableArray alloc] initWithCapacity:2];
-    NSString *appSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser];
+    NSString *appSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory];
     BDSKTemplate *template = nil;
     NSURL *fileURL = nil;
     

Modified: trunk/bibdesk/BDSKTypeManager.m
===================================================================
--- trunk/bibdesk/BDSKTypeManager.m     2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BDSKTypeManager.m     2011-08-18 17:30:55 UTC (rev 18069)
@@ -105,7 +105,7 @@
 }
 
 static NSString *BDSKUserTypeInfoPath() {
-    return [[[[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:TYPE_INFO_FILENAME] 
stringByAppendingPathExtension:@"plist"];
+    return [[[[NSFileManager defaultManager] applicationSupportDirectory] 
stringByAppendingPathComponent:TYPE_INFO_FILENAME] 
stringByAppendingPathExtension:@"plist"];
 }
 
 - (id)init{

Modified: trunk/bibdesk/BibPref_Files.m
===================================================================
--- trunk/bibdesk/BibPref_Files.m       2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BibPref_Files.m       2011-08-18 17:30:55 UTC (rev 18069)
@@ -156,7 +156,7 @@
     if (returnCode == NSAlertAlternateReturn)
         return;
     NSFileManager *fileManager = [NSFileManager defaultManager];
-       NSString *conversionsFilePath = [[fileManager 
currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME];
+       NSString *conversionsFilePath = [[fileManager 
applicationSupportDirectory] 
stringByAppendingPathComponent:CHARACTER_CONVERSION_FILENAME];
     if([fileManager fileExistsAtPath:conversionsFilePath])
         [fileManager removeItemAtPath:conversionsFilePath error:NULL];
        // tell the converter to reload its dictionaries

Modified: trunk/bibdesk/BibPref_ScriptHooks.m
===================================================================
--- trunk/bibdesk/BibPref_ScriptHooks.m 2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BibPref_ScriptHooks.m 2011-08-18 17:30:55 UTC (rev 18069)
@@ -83,7 +83,7 @@
         if([tableView selectedRow] == -1) 
             return;
         
-        NSString *directory = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser];
+        NSString *directory = [[NSFileManager defaultManager] 
applicationSupportDirectory];
         NSOpenPanel *openPanel = [NSOpenPanel openPanel];
         [openPanel setPrompt:NSLocalizedString(@"Choose", @"Prompt for Choose 
panel")];
         [openPanel setAllowsMultipleSelection:NO];

Modified: trunk/bibdesk/BibPref_TeX.m
===================================================================
--- trunk/bibdesk/BibPref_TeX.m 2011-08-18 06:35:20 UTC (rev 18068)
+++ trunk/bibdesk/BibPref_TeX.m 2011-08-18 17:30:55 UTC (rev 18069)
@@ -194,7 +194,7 @@
 
 - (IBAction)openTeXPreviewFile:(id)sender{
     // Edit the TeX template in the Application Support folder
-    NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser];
+    NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory];
     
     // edit the previewtemplate.tex file, so the bibpreview.tex is only edited 
by PDFPreviewer
     NSString *path = [applicationSupportPath 
stringByAppendingPathComponent:@"previewtemplate.tex"];
@@ -222,7 +222,7 @@
     if (returnCode == NSAlertAlternateReturn)
         return;
     NSFileManager *fileManager = [NSFileManager defaultManager];
-    NSString *applicationSupportPath = [[NSFileManager defaultManager] 
currentApplicationSupportPathForCurrentUser];
+    NSString *applicationSupportPath = [[NSFileManager defaultManager] 
applicationSupportDirectory];
     NSString *previewTemplatePath = [applicationSupportPath 
stringByAppendingPathComponent:@"previewtemplate.tex"];
     if([fileManager fileExistsAtPath:previewTemplatePath])
         [fileManager removeItemAtPath:previewTemplatePath error:NULL];

Modified: trunk/bibdesk/NSFileManager_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSFileManager_BDSKExtensions.h        2011-08-18 06:35:20 UTC 
(rev 18068)
+++ trunk/bibdesk/NSFileManager_BDSKExtensions.h        2011-08-18 17:30:55 UTC 
(rev 18069)
@@ -69,7 +69,7 @@
 
 @interface NSFileManager (BDSKExtensions)
 
-- (NSString *)currentApplicationSupportPathForCurrentUser;
+- (NSString *)applicationSupportDirectory;
 - (NSString *)applicationsDirectory;
 - (NSString *)desktopDirectory;
 - (NSURL *)downloadFolderURL;

Modified: trunk/bibdesk/NSFileManager_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSFileManager_BDSKExtensions.m        2011-08-18 06:35:20 UTC 
(rev 18068)
+++ trunk/bibdesk/NSFileManager_BDSKExtensions.m        2011-08-18 17:30:55 UTC 
(rev 18069)
@@ -175,7 +175,7 @@
     [pool release];
 }
 
-- (NSString *)currentApplicationSupportPathForCurrentUser{
+- (NSString *)applicationSupportDirectory{
     
     static NSString *path = nil;
     
@@ -268,7 +268,7 @@
 }
 
 - (BOOL)copyFileFromSharedSupportToApplicationSupport:(NSString *)fileName 
overwrite:(BOOL)overwrite{
-    NSString *targetPath = [[self currentApplicationSupportPathForCurrentUser] 
stringByAppendingPathComponent:fileName];
+    NSString *targetPath = [[self applicationSupportDirectory] 
stringByAppendingPathComponent:fileName];
     NSString *sourcePath = [[[NSBundle mainBundle] sharedSupportPath] 
stringByAppendingPathComponent:fileName];
     if ([self fileExistsAtPath:targetPath]) {
         if (overwrite == NO)
@@ -279,7 +279,7 @@
 }
 
 - (void)copyAllExportTemplatesToApplicationSupportAndOverwrite:(BOOL)overwrite{
-    NSString *applicationSupport = [self 
currentApplicationSupportPathForCurrentUser];
+    NSString *applicationSupport = [self applicationSupportDirectory];
     NSString *templates = @"Templates";
     NSString *templatesPath = [applicationSupport 
stringByAppendingPathComponent:templates];
     BOOL success = YES;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to