merge in themes branch to keep in sync

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23705 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-10-02 05:09:48 +00:00
parent c8e6566831
commit c033d17a2d
13 changed files with 1446 additions and 372 deletions

View file

@ -33,6 +33,7 @@
#include "AppKit/NSResponder.h"
#include "AppKit/NSInterfaceStyle.h"
#include "GNUstepGUI/GSTheme.h"
NSString *NSInterfaceStyleDefault = @"NSInterfaceStyleDefault";
@ -173,6 +174,11 @@ NSInterfaceStyleForKey(NSString *key, NSResponder *responder)
selector: @selector(defaultsDidChange:)
name: NSUserDefaultsDidChangeNotification
object: nil];
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(defaultsDidChange:)
name: GSThemeDidActivateNotification
object: nil];
}
}
@ -183,6 +189,12 @@ NSInterfaceStyleForKey(NSString *key, NSResponder *responder)
NSString *key;
void *val;
/*
* We ignore the actual notification, which may be nil (when called at
* initialization), or may contain a user defaults object (if a persistent
* domain changed), or may contain a theme object (if a theme activated).
* What we need to do is examine the current state of the standard defaults.
*/
defs = [NSUserDefaults standardUserDefaults];
/*