[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Changes to NSGlobalDomain aren't detected
From: |
David Chisnall |
Subject: |
Changes to NSGlobalDomain aren't detected |
Date: |
Tue, 1 Oct 2013 10:41:26 +0100 |
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?
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...
David
-- Sent from my STANTEC-ZEBRA
- Changes to NSGlobalDomain aren't detected,
David Chisnall <=