[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changes to NSGlobalDomain aren't detected

From: Richard Frith-Macdonald
Subject: Re: Changes to NSGlobalDomain aren't detected
Date: Wed, 2 Oct 2013 05:52:36 +0100

On 1 Oct 2013, at 10:41, David Chisnall <address@hidden> wrote:

> Hi,
> I've noticed that when I set the GSTheme default for a running application, 
> it recents an NSUserDefaultsChanged notification, but when I change 
> NSGlobalDomain GSTheme this doesn't happen.  This is problematic, because it 
> means that you can't easily change the theme of all of the running GNUstep 
> apps without restarting them.
> Looking more closely, it seems that NSUserDefaults periodically checks if 
> defaults have been changed, but doesn't check for NSGlobalDomain.  I'm not 
> fully able to follow the code that determines whether a domain needs to be 
> reloaded, but perhaps someone who understands it could take a look?

I tracked down and fixed that bug.

> Alternatively, I wonder if having changes to persistent domains post a 
> distributed notification would be cleaner than regularly polling the FS 
> (regularly waking up sucks battery life on mobile devices, even if the check 
> is handled by the VFS layer).  If people want to manually modify the plists 
> of a running application (and not use the defaults tool) then they should 
> post the notification themselves...

That's an interesting idea. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]