Author: paullanders
Date: Fri Dec 16 23:09:48 2016
New Revision: 40269

URL: http://svn.gna.org/viewcvs/gnustep?rev=40269&view=rev
Log:
Use bundle identifier instead of process name for user default domain.

Modified:
    
libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h
    libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m
    libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m

Modified: 
libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h?rev=40269&r1=40268&r2=40269&view=diff
==============================================================================
--- 
libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h 
    (original)
+++ 
libs/base/branches/gnustep_testplant_branch/Headers/Foundation/NSUserDefaults.h 
    Fri Dec 16 23:09:48 2016
@@ -274,6 +274,8 @@
 + (void) setUserLanguages: (NSArray*)languages;
 #endif
 
++ (void) setProcessName: (NSString*) processName;
+
 #if OS_API_VERSION(GSAPI_MACOSX, GS_API_LATEST)
 /**
  * Adds the domain names aName to the search list of the receiver.<br />

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m?rev=40269&r1=40268&r2=40269&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m       
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSBundle.m       Fri Dec 
16 23:09:48 2016
@@ -1479,6 +1479,8 @@
       /* Please note that _mainBundle should *not* be nil.  */
       _mainBundle = [_mainBundle initWithPath: path];
       NSAssert(_mainBundle != nil, NSInternalInconsistencyException);
+      //Testplant:PGL we want to use the bundleIdentifier as the Application 
domain
+      [NSUserDefaults setProcessName:[_mainBundle bundleIdentifier]];
     }
 
   [load_lock unlock];

Modified: libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m?rev=40269&r1=40268&r2=40269&view=diff
==============================================================================
--- libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m 
(original)
+++ libs/base/branches/gnustep_testplant_branch/Source/NSUserDefaults.m Fri Dec 
16 23:09:48 2016
@@ -1089,6 +1089,11 @@
   [dict release];
 }
 
+// Testplant:PGL This is to set the bundleIdentifier after NSBundle loads.
++ (void) setProcessName:(NSString*)pName {
+    processName = [pName copy]; 
+}
+
 - (id) init
 {
   return [self initWithUser: NSUserName()];
@@ -1109,9 +1114,8 @@
    */
   if (processName == nil)
     {
-      NSString *s = [[NSProcessInfo processInfo] processName];
-
-      processName = [s copy];
+      NSString *s = [[NSProcessInfo processInfo] processName];
+      [NSUserDefaults setProcessName:s];
     }
 
   if (path == nil || [path isEqual: @""] == YES)


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to