Merge with trunk revision 40072

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40129 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2016-10-05 19:58:54 +00:00
parent 32c7e9a6a8
commit be63eedc09
3 changed files with 31 additions and 66 deletions

View file

@ -630,7 +630,7 @@
[self setContentView: cv];
RELEASE(cv);
}
// Testplant-MAL-10052016: keeping branch code...
[self setBorderColor:[NSColor clearColor]];
if ([aDecoder containsValueForKey:@"NSBorderColor2"])
{
@ -639,6 +639,7 @@
[self setBorderColor:color];
}
// Testplant-MAL-10052016: keeping branch code...
[self setFillColor:[NSColor clearColor]];
if ([aDecoder containsValueForKey:@"NSFillColor2"])
{
@ -649,6 +650,7 @@
}
else
{
// Testplant-MAL-10052016: keeping branch code...
[self setBorderColor:[NSColor clearColor]];
[self setFillColor:[NSColor clearColor]];
[aDecoder decodeValueOfObjCType: @encode(id) at: &_cell];

View file

@ -1407,28 +1407,9 @@ static BOOL browserUseBezels;
*/
- (void) setSeparatesColumns: (BOOL)flag
{
#if 0 // Testplant-MAL-Merge-2015-06-20 - Should this be excluded from merge?
NSBrowserColumn *bc;
NSScrollView *sc;
NSBorderType bt;
NSInteger i, columnCount;
#endif
// if this flag already set or browser is titled -- do nothing
if (_separatesColumns == flag || _isTitled)
return;
#if 0 // Testplant-MAL-Merge-2015-06-20 - Should this be excluded from merge?
columnCount = [_browserColumns count];
bt = flag ? NSBezelBorder : NSNoBorder;
for (i = 0; i < columnCount; i++)
{
bc = [_browserColumns objectAtIndex: i];
sc = [bc columnScrollView];
[sc setBorderType:bt];
}
#endif
_separatesColumns = flag;
[self tile];
[self setNeedsDisplay:YES];

View file

@ -33,18 +33,13 @@
#import "config.h"
#import <Foundation/NSArray.h>
#import <Foundation/NSBundle.h>
#import <Foundation/NSCoder.h>
#import <Foundation/NSDebug.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import <Foundation/NSURL.h>
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSKeyValueCoding.h>
#import "AppKit/NSControl.h"
#import "AppKit/NSNib.h"
#import "AppKit/NSNibConnector.h"
#import "AppKit/NSNibLoading.h"
#import "GNUstepGUI/GSModelLoaderFactory.h"
@ -103,55 +98,42 @@
- (NSString *) pathForNibResource: (NSString *)fileName
{
// Testplant-MAL-2015-06-26: This seems like a testplant fix
// so keeping over the main branches version...
NSMutableArray *array = [NSMutableArray arrayWithCapacity: 8];
NSArray *languages;
NSString *rootPath = [self bundlePath];
NSString *primary;
NSString *language;
NSEnumerator *enumerator;
NSArray *types = [GSModelLoaderFactory supportedTypes];
NSString *ext = [fileName pathExtension];
languages = [[NSUserDefaults standardUserDefaults]
stringArrayForKey: @"NSLanguages"];
/*
* Build an array of resource paths that differs from the normal order -
* we want a localized file in preference to a generic one.
*/
primary = [rootPath stringByAppendingPathComponent: @"Resources"];
enumerator = [languages objectEnumerator];
while ((language = [enumerator nextObject]))
NSDebugLLog(@"NIB", @"Path for NIB file %@", fileName);
if ((ext == nil) || [ext isEqualToString:@""])
{
NSString *langDir;
NSString *type;
langDir = [NSString stringWithFormat: @"%@.lproj", language];
[array addObject: [primary stringByAppendingPathComponent: langDir]];
enumerator = [types objectEnumerator];
while ((type = [enumerator nextObject]))
{
NSDebugLLog(@"NIB", @"Checking type %@", fileName);
NSString *path = [self pathForResource: fileName
ofType: type];
if (path != nil)
{
return path;
}
}
}
[array addObject: primary];
primary = rootPath;
enumerator = [languages objectEnumerator];
while ((language = [enumerator nextObject]))
else
{
NSString *langDir;
langDir = [NSString stringWithFormat: @"%@.lproj", language];
[array addObject: [primary stringByAppendingPathComponent: langDir]];
}
[array addObject: primary];
enumerator = [array objectEnumerator];
while ((rootPath = [enumerator nextObject]) != nil)
{
NSString *modelPath = [rootPath stringByAppendingPathComponent: fileName];
NSString *path = [GSModelLoaderFactory supportedModelFileAtPath: modelPath];
if (path != nil)
{
return path;
}
if ([types containsObject: ext])
{
NSString *path = [self pathForResource:
[fileName stringByDeletingPathExtension]
ofType: ext];
if (path != nil)
{
return path;
}
}
}
NSDebugLLog(@"NIB", @"Did not find NIB resource %@", fileName);
return nil;
}