2011-06-09 13:49-EDT Gregory John Casamento <greg.casamento@gmail.com>

* Source/GSTheme.m: Move notifications handling code to
	setTheme: instead and add code which deactivates the notifications
	and then starts listening again after activate is called.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33267 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2011-06-09 17:51:39 +00:00
parent a56d2d4fc9
commit 50c93b82e2
2 changed files with 24 additions and 13 deletions

View file

@ -1,11 +1,17 @@
2011-06-09 13:49-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Move notifications handling code to
setTheme: instead and add code which deactivates the notifications
and then starts listening again after activate is called.
2011-06-09 13:43-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/GSTheme.m: Move call to listen to default changes to
activate instead of +initialize.
* Source/GSTheme.m: Move call to listen to default changes to
activate instead of +initialize.
2011-06-07 07:40-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSMenuItem.m: Remove temporary fix.
* Source/NSMenuItem.m: Remove temporary fix.
2011-06-06 Fred Kiefer <FredKiefer@gmx.de>

View file

@ -413,11 +413,26 @@ typedef struct {
}
if (theme != theTheme)
{
/*
* Remove any previous observers...
*/
[[NSNotificationCenter defaultCenter]
removeObserver: self];
[theTheme deactivate];
DESTROY(currentThemeName);
ASSIGN (theTheme, theme);
[theTheme activate];
ASSIGN(currentThemeName, [theTheme name]);
/*
* Listen to notifications...
*/
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(defaultsDidChange:)
name: NSUserDefaultsDidChangeNotification
object: nil];
}
}
@ -609,16 +624,6 @@ typedef struct {
{
[[[window contentView] superview] setNeedsDisplay: YES];
}
/*
* Listen to notifications
*/
[[NSNotificationCenter defaultCenter]
addObserver: [self class]
selector: @selector(defaultsDidChange:)
name: NSUserDefaultsDidChangeNotification
object: nil];
}
- (NSArray*) authors