* src/nsterm.m (ns_get_color): Make selection color work for GNUStep also.

This commit is contained in:
Jan Djärv
2013-10-20 11:55:25 +02:00
parent 43ad632e3b
commit d4816ab3aa
2 changed files with 5 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
* nsterm.m (Qcocoa, Qgnustep): New variables.
(syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
(ns_get_color): Make selection color work for GNUStep also.
2013-10-18 Eli Zaretskii <eliz@gnu.org>

View File

@@ -1461,15 +1461,16 @@ ns_get_color (const char *name, NSColor **col)
/*fprintf (stderr, "ns_get_color: '%s'\n", name); */
block_input ();
#ifdef NS_IMPL_COCOA
if ([nsname isEqualToString: @"ns_selection_bg_color"])
{
#ifdef NS_IMPL_COCOA
NSString *defname = [[NSUserDefaults standardUserDefaults]
stringForKey: @"AppleHighlightColor"];
if (defname != nil)
nsname = defname;
else if ((new = [NSColor selectedTextBackgroundColor]) != nil)
else
#endif
if ((new = [NSColor selectedTextBackgroundColor]) != nil)
{
*col = [new colorUsingColorSpaceName: NSCalibratedRGBColorSpace];
unblock_input ();
@@ -1495,7 +1496,6 @@ ns_get_color (const char *name, NSColor **col)
nsname = NS_SELECTION_FG_COLOR_DEFAULT;
name = [nsname UTF8String];
}
#endif // NS_IMPL_COCOA
/* First, check for some sort of numeric specification. */
hex[0] = '\0';