Revision: 4303
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4303&view=rev
Author:   hofman
Date:     2008-07-26 12:02:55 +0000 (Sat, 26 Jul 2008)

Log Message:
-----------
add some string constants

Modified Paths:
--------------
    trunk/SKApplicationController.m

Modified: trunk/SKApplicationController.m
===================================================================
--- trunk/SKApplicationController.m     2008-07-25 17:59:20 UTC (rev 4302)
+++ trunk/SKApplicationController.m     2008-07-26 12:02:55 UTC (rev 4303)
@@ -87,8 +87,13 @@
 NSString *SKDocumentSetupAliasKey = @"_BDAlias";
 NSString *SKDocumentSetupFileNameKey = @"fileName";
 
+static NSString *SKCurrentDocumentSetupKey = @"currentDocumentSetup";
+
 static NSString *SKSpotlightVersionInfoKey = @"SKSpotlightVersionInfo";
+static NSString *SKSpotlightLastImporterVersionKey = @"lastImporterVersion";
+static NSString *SKSpotlightLastSysVersionKey = @"lastSysVersion";
 
+
 @implementation SKApplicationController
 
 + (void)initialize{
@@ -421,10 +426,10 @@
         if ([versionInfo count] == 0) {
             runImporter = YES;
         } else {
-            NSString *lastImporterVersion = [versionInfo 
objectForKey:@"lastImporterVersion"];
+            NSString *lastImporterVersion = [versionInfo 
objectForKey:SKSpotlightLastImporterVersionKey];
             SKVersionNumber *lastImporterVersionNumber = [[[SKVersionNumber 
alloc] initWithVersionString:lastImporterVersion] autorelease];
             
-            long lastSysVersion = [[versionInfo 
objectForKey:@"lastSysVersion"] longValue];
+            long lastSysVersion = [[versionInfo 
objectForKey:SKSpotlightLastSysVersionKey] longValue];
             
             runImporter = noErr == err ? ([lastImporterVersionNumber 
compareToVersionNumber:importerVersionNumber] == NSOrderedAscending || 
sysVersion > lastSysVersion) : YES;
         }
@@ -433,8 +438,8 @@
             if ([[NSFileManager defaultManager] 
isExecutableFileAtPath:mdimportPath]) {
                 [NSTask launchedTaskWithLaunchPath:mdimportPath 
arguments:[NSArray arrayWithObjects:@"-r", importerPath, nil]];
                 
-                NSDictionary *info = [NSDictionary 
dictionaryWithObjectsAndKeys:[NSNumber numberWithLong:sysVersion], 
@"lastSysVersion", importerVersion, @"lastImporterVersion", nil];
-                [[NSUserDefaults standardUserDefaults] setObject:info 
forKey:@"SKSpotlightVersionInfo"];
+                NSDictionary *info = [NSDictionary 
dictionaryWithObjectsAndKeys:[NSNumber numberWithLong:sysVersion], 
SKSpotlightLastSysVersionKey, importerVersion, 
SKSpotlightLastImporterVersionKey, nil];
+                [[NSUserDefaults standardUserDefaults] setObject:info 
forKey:SKSpotlightVersionInfoKey];
                 
             } else NSLog(@"%@ not found!", mdimportPath);
         }
@@ -442,7 +447,7 @@
 }
 
 - (void)saveCurrentOpenDocuments:(id)sender {
-    [[NSUserDefaults standardUserDefaults] setObject:[[[NSDocumentController 
sharedDocumentController] documents] valueForKey:@"currentDocumentSetup"] 
forKey:SKLastOpenFileNamesKey];
+    [[NSUserDefaults standardUserDefaults] setObject:[[[NSDocumentController 
sharedDocumentController] documents] valueForKey:SKCurrentDocumentSetupKey] 
forKey:SKLastOpenFileNamesKey];
     [[[NSDocumentController sharedDocumentController] documents] 
makeObjectsPerformSelector:@selector(saveRecentDocumentInfo)];
 }
 


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to