mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Rewrite to store defaults in multiple files (one per persistent domain).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34201 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f0a4e940d1
commit
430a7eea99
3 changed files with 747 additions and 426 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-11-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSUserDefaults.m: rewrite to store defaults in multiple files,
|
||||
one for each persistent domain.
|
||||
Probably needs lots of testing and performance tuning.
|
||||
|
||||
2011-11-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSJSONSerialization.m: Fix errors in BOM handling and tidy.
|
||||
|
|
|
@ -191,11 +191,6 @@ GS_EXPORT NSString* const GSLocale;
|
|||
we had to make several implementation decisions which may vary in
|
||||
other OpenStep implementations.
|
||||
|
||||
- We add a new instance method initWithFile: as a designated
|
||||
initialization method because it allows to create user defaults
|
||||
database from a "default user" and also it will work for various
|
||||
non-posix implementations.
|
||||
|
||||
- We add two new class methods for getting and setting a list of
|
||||
user languages (userLanguages and setUserLanguages: ). They are
|
||||
somehow equivalent to the NS3.x Application's systemLanguages
|
||||
|
@ -204,9 +199,6 @@ GS_EXPORT NSString* const GSLocale;
|
|||
- Definition of argument (command line parameters)
|
||||
(-GSxxxx || --GSxxx) [value]
|
||||
|
||||
Note: As far as I know, there is nothing like home directory for
|
||||
the M$ hell. God help the Win95/WinNT users of NSUserDefaults ;-)
|
||||
|
||||
To Do:
|
||||
- polish & optimize;
|
||||
- when tested, fix NSBundle (the system languages stuff);
|
||||
|
@ -333,18 +325,12 @@ GS_EXPORT NSString* const GSLocale;
|
|||
*/
|
||||
- (id) init;
|
||||
|
||||
/**
|
||||
* Initializes defaults for the specified user calling -initWithContentsOfFile:
|
||||
/** <init />
|
||||
* Initializes defaults for the specified user.<br />
|
||||
* Returns an object with an empty search list.
|
||||
*/
|
||||
- (id) initWithUser: (NSString*)userName;
|
||||
|
||||
/**
|
||||
* <init />
|
||||
* Initializes defaults for the specified path. Returns an object with
|
||||
* an empty search list.
|
||||
*/
|
||||
- (id) initWithContentsOfFile: (NSString*)path; // This is a new method
|
||||
|
||||
/**
|
||||
* Looks up a value for a specified default using -objectForKey:
|
||||
* and returns its integer value or 0 if it is not representable
|
||||
|
@ -474,7 +460,7 @@ GS_EXPORT NSString* const GSLocale;
|
|||
* last -synchronize.
|
||||
*/
|
||||
- (void) setPersistentDomain: (NSDictionary*)domain
|
||||
forName: (NSString*)domainName;
|
||||
forName: (NSString*)domainName;
|
||||
|
||||
/**
|
||||
* Ensures that the in-memory and on-disk representations of the defaults
|
||||
|
@ -498,7 +484,7 @@ GS_EXPORT NSString* const GSLocale;
|
|||
* exists as either a volatile-domain or a persistent-domain.
|
||||
*/
|
||||
- (void) setVolatileDomain: (NSDictionary*)domain
|
||||
forName: (NSString*)domainName;
|
||||
forName: (NSString*)domainName;
|
||||
|
||||
/**
|
||||
* Returns the volatile domain specified by domainName.
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue