Revision: 18096
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18096&view=rev
Author:   hofman
Date:     2011-08-29 12:01:48 +0000 (Mon, 29 Aug 2011)
Log Message:
-----------
Save papers folder with tilde abbreviation, for better portability

Modified Paths:
--------------
    trunk/bibdesk/BibPref_AutoFile.m

Modified: trunk/bibdesk/BibPref_AutoFile.m
===================================================================
--- trunk/bibdesk/BibPref_AutoFile.m    2011-08-29 06:35:11 UTC (rev 18095)
+++ trunk/bibdesk/BibPref_AutoFile.m    2011-08-29 12:01:48 UTC (rev 18096)
@@ -177,14 +177,14 @@
 }
 
 - (IBAction)setPapersFolderPathFromTextField:(id)sender{
-    [sud setObject:[[sender stringValue] stringByStandardizingPath] 
forKey:BDSKPapersFolderPathKey];
+    [sud setObject:[[[sender stringValue] stringByStandardizingPath] 
stringByAbbreviatingWithTildeInPath] forKey:BDSKPapersFolderPathKey];
     [self updatePapersFolderUI];
 }
 
 - (void)openPanelDidEnd:(NSOpenPanel *)sheet returnCode:(NSInteger)returnCode 
contextInfo:(void *)contextInfo {
        if (returnCode == NSFileHandlingPanelOKButton) {
                NSString *path = [[sheet filenames] objectAtIndex: 0];
-               [sud setObject:path forKey:BDSKPapersFolderPathKey];
+               [sud setObject:[path stringByAbbreviatingWithTildeInPath] 
forKey:BDSKPapersFolderPathKey];
        }
        [self updatePapersFolderUI];
 }
@@ -211,12 +211,12 @@
         if ([NSString isEmptyString:lastPapersFolderPath]) {
             [self choosePapersFolderLocationAction:sender];
         } else {
-            [sud setObject:lastPapersFolderPath 
forKey:BDSKPapersFolderPathKey];
+            [sud setObject:[lastPapersFolderPath 
stringByAbbreviatingWithTildeInPath] forKey:BDSKPapersFolderPathKey];
             [self updatePapersFolderUI];
         }
        } else {
         [lastPapersFolderPath release];
-        lastPapersFolderPath = [[sud objectForKey:BDSKPapersFolderPathKey] 
retain];
+        lastPapersFolderPath = [[[sud objectForKey:BDSKPapersFolderPathKey] 
stringByExpandingTildeInPath] retain];
                [sud setObject:@"" forKey:BDSKPapersFolderPathKey];
                [self updatePapersFolderUI];
        }

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


------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to