From 883fd6211b505b3bacc30d6e1a665a3d0adce6c1 Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Sat, 29 Jan 2011 16:15:46 +0000 Subject: [PATCH] Fix bug positing notifications git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31976 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 11 +++++++++-- Source/NSUserDefaults.m | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a688193e..ba7b29113 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,13 @@ +2011-01-29 Richard Frith-Macdonald + + * Source/NSUserDefaults.m: Fix bug with notifications ... was not always + sending them when a domain was modified. + 2011-01-29 Stefan Bidigaray * Headers/Foundation/NSLocale.h: Use GS_EXPOSE(NSLocale). - * Source/NSLocale.m: ([-autoupdatingCurrentLocale]) Handle locale updates. + * Source/NSLocale.m: ([-autoupdatingCurrentLocale]) Handle locale + updates. ([-currentLocale]) Check Locale default for current user's locale. ([-preferredLanguages]) Do not add same language multiple times. @@ -74,7 +80,8 @@ * configure: * configure.ac: - * Headers/Additions/GNUstepBase/config.h.in: Added check for unicode/udat.h. + * Headers/Additions/GNUstepBase/config.h.in: Added check for + unicode/udat.h. * Headers/Foundation/NSDateFormatter.h: * Source/NSDateFormatter.m: Implemented a few methods. diff --git a/Source/NSUserDefaults.m b/Source/NSUserDefaults.m index deb350822..9ab8517d3 100644 --- a/Source/NSUserDefaults.m +++ b/Source/NSUserDefaults.m @@ -2113,14 +2113,14 @@ NSLog(@"Creating empty user defaults database"); _changedDomains = [[NSMutableArray alloc] initWithObjects: &domainName count: 1]; updateCache(self); - [[NSNotificationCenter defaultCenter] - postNotificationName: NSUserDefaultsDidChangeNotification - object: self]; } else if ([_changedDomains containsObject: domainName] == NO) { [_changedDomains addObject: domainName]; } + [[NSNotificationCenter defaultCenter] + postNotificationName: NSUserDefaultsDidChangeNotification + object: self]; [_lock unlock]; } NS_HANDLER