mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
fix bug resetting defaults
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32515 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ca3e96799a
commit
cda7a4cc75
2 changed files with 16 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-03-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSUserDefaults.m: Fix bug in resetting ... was ending up
|
||||||
|
with an immutable dictionary for the registration domain.
|
||||||
|
|
||||||
2011-03-08 Richard Frith-Macdonald <rfm@gnu.org>
|
2011-03-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/GSAttributedString.m: remove unused assignment
|
* Source/GSAttributedString.m: remove unused assignment
|
||||||
|
|
|
@ -391,9 +391,18 @@ newLanguages(NSArray *oldNames)
|
||||||
[classLock lock];
|
[classLock lock];
|
||||||
NS_DURING
|
NS_DURING
|
||||||
{
|
{
|
||||||
regDefs = [sharedDefaults volatileDomainForName: @"NSRegistrationDomain"];
|
if (nil == sharedDefaults)
|
||||||
if (nil != sharedDefaults)
|
{
|
||||||
|
regDefs = nil;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
/* Extract the registration domain from the old defaults.
|
||||||
|
*/
|
||||||
|
regDefs = [[[sharedDefaults->_tempDomains
|
||||||
|
objectForKey: NSRegistrationDomain] retain] autorelease];
|
||||||
|
[sharedDefaults->_tempDomains
|
||||||
|
removeObjectForKey: NSRegistrationDomain];
|
||||||
|
|
||||||
/* To ensure that we don't try to synchronise the old defaults to disk
|
/* To ensure that we don't try to synchronise the old defaults to disk
|
||||||
* after creating the new ones, remove as housekeeping notification
|
* after creating the new ones, remove as housekeeping notification
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue