|
|
|
Using Cocoa...
This is what I just whipped up:
- (IBAction)test:(id)sender
{
NSDictionary *finderPrefs = [[NSUserDefaults standardUserDefaults] persistentDomainForName:@"com.apple.finder"];
NSMutableDictionary *finderDict = [finderPrefs mutableCopy];
NSMutableDictionary *subDict = [[finderDict objectForKey:@"DesktopViewOptions"] mutableCopy];
[subDict setObject:@"file://localhost/Users/( ... )/whatever.jpg" forKey:@"BackgroundPictureURL"];
[finderDict setObject:subDict forKey:@"DesktopViewOptions"];
[[NSUserDefaults standardUserDefaults] setPersistentDomain:[NSDictionary dictionaryWithDictionary:finderDict] forName:@"com.apple.finder"];
[[NSUserDefaults standardUserDefaults] synchronize];
//find someway to notify the Finder that the defaults have changed
// ...
[finderDict release];
[subDict release];
}
The problem then is not how to change the value but how to tell the Finder to update the background. |
SearchFrom our Sponsor...Latest Lion HintsWhat's New:Hints1 new Hints in the last 24 hoursComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2013 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.09 seconds |
|