-/* xscreensaver, Copyright (c) 2006-2012 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2013 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
// make sure there's no resource mentioned in options and not defaults.
if (![defsdict objectForKey:nsresource]) {
if (! (!strcmp(resource, "font") || // don't warn about these
+ !strcmp(resource, "foreground") ||
!strcmp(resource, "textLiteral") ||
!strcmp(resource, "textFile") ||
!strcmp(resource, "textURL") ||
#if 0
// Dump the entire resource database.
NSDictionary *d = [userDefaults dictionaryRepresentation];
- for (NSObject *key in d) {
+ for (NSObject *key in [[d allKeys]
+ sortedArrayUsingSelector:@selector(compare:)]) {
NSObject *val = [d objectForKey:key];
NSLog (@"%@ = %@", key, val);
}
else if (n == 1) return YES;
else goto FAIL;
} else if ([o isKindOfClass:[NSString class]]) {
- NSString *s = (NSString *) o;
+ NSString *s = [((NSString *) o) lowercaseString];
if ([s isEqualToString:@"true"] ||
[s isEqualToString:@"yes"] ||
[s isEqualToString:@"1"])
NSRange r = [name rangeOfString:@"." options:NSBackwardsSearch];
if (r.length)
name = [name substringFromIndex:r.location+1];
+ name = [name stringByReplacingOccurrencesOfString:@" " withString:@""];
saver_name = [name retain];
[self registerXrmKeys:opts defaults:defs];