comparison src/nsfns.m @ 105085:767bf46c924d

(x_get_string_resource): Ape just-previous changes to other platform versions. Drop support for emacs-20-style face specs.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Fri, 18 Sep 2009 15:12:54 +0000
parents c1f72ea59c48
children ec0d4293e991
comparison
equal deleted inserted replaced
105084:ed989664c444 105085:767bf46c924d
2137 /* remove appname prefix; TODO: allow for !="Emacs" */ 2137 /* remove appname prefix; TODO: allow for !="Emacs" */
2138 char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0); 2138 char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0);
2139 const char *res; 2139 const char *res;
2140 check_ns (); 2140 check_ns ();
2141 2141
2142 /* Support emacs-20-style face resources for backwards compatibility */ 2142 if (inhibit_x_resources)
2143 if (!strncmp (toCheck, "Face", 4)) 2143 /* --quick was passed, so this is a no-op. */
2144 toCheck = name + (!strncmp (name, "emacs.", 6) ? 6 : 0); 2144 return NULL;
2145 2145
2146 /*fprintf (stderr, "Checking '%s'\n", toCheck); */ 2146 res = [[[NSUserDefaults standardUserDefaults] objectForKey:
2147 2147 [NSString stringWithUTF8String: toCheck]] UTF8String];
2148 res = ns_no_defaults ? NULL :
2149 [[[NSUserDefaults standardUserDefaults] objectForKey:
2150 [NSString stringWithUTF8String: toCheck]] UTF8String];
2151 return !res ? NULL : 2148 return !res ? NULL :
2152 (!strncasecmp (res, "YES", 3) ? "true" : 2149 (!strncasecmp (res, "YES", 3) ? "true" :
2153 (!strncasecmp (res, "NO", 2) ? "false" : res)); 2150 (!strncasecmp (res, "NO", 2) ? "false" : res));
2154 } 2151 }
2155 2152