Merge more code with gui main branch revision 39484

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@39504 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2016-03-09 15:09:26 +00:00
parent 6360094289
commit 2088ec1ab5
5 changed files with 108 additions and 51 deletions

View file

@ -31,10 +31,10 @@
#import <Foundation/NSArray.h> #import <Foundation/NSArray.h>
#import <Foundation/NSAffineTransform.h> #import <Foundation/NSAffineTransform.h>
#import <Foundation/NSCoder.h> #import <Foundation/NSCoder.h>
#import <Foundation/NSDebug.h>
#import <Foundation/NSData.h> #import <Foundation/NSData.h>
#import <Foundation/NSTask.h> #import <Foundation/NSTask.h>
#import <Foundation/NSProcessInfo.h> #import <Foundation/NSProcessInfo.h>
#import <GNUstepBase/NSDebug+GNUstepBase.h>
#import "AppKit/NSBitmapImageRep.h" #import "AppKit/NSBitmapImageRep.h"
#import "AppKit/NSGraphics.h" #import "AppKit/NSGraphics.h"
#import "AppKit/NSPasteboard.h" #import "AppKit/NSPasteboard.h"

View file

@ -480,7 +480,8 @@ static GSTextFinder *sharedTextFinder;
if ([ignoreCaseButton state] != NSOffState) if ([ignoreCaseButton state] != NSOffState)
{ {
*options |= NSCaseInsensitiveSearch; *options |= NSCaseInsensitiveSearch;
*options &= ~NSLiteralSearch; // literal search is always case-sensitive, so it must be removed in this case // literal search is always case-sensitive, so it must be removed in this case
*options &= ~NSLiteralSearch;
} }
else else
{ {

View file

@ -39,7 +39,6 @@
#import <Foundation/NSPathUtilities.h> #import <Foundation/NSPathUtilities.h>
#import <Foundation/NSSet.h> #import <Foundation/NSSet.h>
#import <Foundation/NSUserDefaults.h> #import <Foundation/NSUserDefaults.h>
#import "GNUstepBase/GSObjCRuntime.h"
#import "GNUstepGUI/GSTheme.h" #import "GNUstepGUI/GSTheme.h"
#import "AppKit/NSApplication.h" #import "AppKit/NSApplication.h"
#import "AppKit/NSButtonCell.h" #import "AppKit/NSButtonCell.h"
@ -112,18 +111,30 @@ NSString *GSSliderVerticalTrack = @"GSSliderVerticalTrack";
NSString *GSBoxBorder = @"GSBoxBorder"; NSString *GSBoxBorder = @"GSBoxBorder";
/* NSTabView parts */ /* NSTabView parts */
NSString *GSTabViewSelectedTabFill = @"GSTabViewSelectedTabFill"; NSString *GSTabViewSelectedTabFill
NSString *GSTabViewUnSelectedTabFill = @"GSTabViewUnSelectedTabFill"; = @"GSTabViewSelectedTabFill";
NSString *GSTabViewBackgroundTabFill = @"GSTabViewBackgroundTabFill"; NSString *GSTabViewUnSelectedTabFill
NSString *GSTabViewBottomSelectedTabFill = @"GSTabViewBottomSelectedTabFill"; = @"GSTabViewUnSelectedTabFill";
NSString *GSTabViewBottomUnSelectedTabFill = @"GSTabViewBottomUnSelectedTabFill"; NSString *GSTabViewBackgroundTabFill
NSString *GSTabViewBottomBackgroundTabFill = @"GSTabViewBottomBackgroundTabFill"; = @"GSTabViewBackgroundTabFill";
NSString *GSTabViewLeftSelectedTabFill = @"GSTabViewLeftSelectedTabFill"; NSString *GSTabViewBottomSelectedTabFill
NSString *GSTabViewLeftUnSelectedTabFill = @"GSTabViewLeftUnSelectedTabFill"; = @"GSTabViewBottomSelectedTabFill";
NSString *GSTabViewLeftBackgroundTabFill = @"GSTabViewLeftBackgroundTabFill"; NSString *GSTabViewBottomUnSelectedTabFill
NSString *GSTabViewRightSelectedTabFill = @"GSTabViewRightSelectedTabFill"; = @"GSTabViewBottomUnSelectedTabFill";
NSString *GSTabViewRightUnSelectedTabFill = @"GSTabViewRightUnSelectedTabFill"; NSString *GSTabViewBottomBackgroundTabFill
NSString *GSTabViewRightBackgroundTabFill = @"GSTabViewRightBackgroundTabFill"; = @"GSTabViewBottomBackgroundTabFill";
NSString *GSTabViewLeftSelectedTabFill
= @"GSTabViewLeftSelectedTabFill";
NSString *GSTabViewLeftUnSelectedTabFill
= @"GSTabViewLeftUnSelectedTabFill";
NSString *GSTabViewLeftBackgroundTabFill
= @"GSTabViewLeftBackgroundTabFill";
NSString *GSTabViewRightSelectedTabFill
= @"GSTabViewRightSelectedTabFill";
NSString *GSTabViewRightUnSelectedTabFill
= @"GSTabViewRightUnSelectedTabFill";
NSString *GSTabViewRightBackgroundTabFill
= @"GSTabViewRightBackgroundTabFill";
NSString *GSThemeDidActivateNotification NSString *GSThemeDidActivateNotification
@ -185,14 +196,22 @@ GSStringFromSegmentStyle(NSSegmentStyle segmentStyle)
{ {
switch (segmentStyle) switch (segmentStyle)
{ {
case NSSegmentStyleAutomatic: return @"NSSegmentStyleAutomatic"; case NSSegmentStyleAutomatic:
case NSSegmentStyleRounded: return @"NSSegmentStyleRounded"; return @"NSSegmentStyleAutomatic";
case NSSegmentStyleTexturedRounded: return @"NSSegmentStyleTexturedRounded"; case NSSegmentStyleRounded:
case NSSegmentStyleRoundRect: return @"NSSegmentStyleRoundRect"; return @"NSSegmentStyleRounded";
case NSSegmentStyleTexturedSquare: return @"NSSegmentStyleTexturedSquare"; case NSSegmentStyleTexturedRounded:
case NSSegmentStyleCapsule: return @"NSSegmentStyleCapsule"; return @"NSSegmentStyleTexturedRounded";
case NSSegmentStyleSmallSquare: return @"NSSegmentStyleSmallSquare"; case NSSegmentStyleRoundRect:
default: return nil; return @"NSSegmentStyleRoundRect";
case NSSegmentStyleTexturedSquare:
return @"NSSegmentStyleTexturedSquare";
case NSSegmentStyleCapsule:
return @"NSSegmentStyleCapsule";
case NSSegmentStyleSmallSquare:
return @"NSSegmentStyleSmallSquare";
default:
return nil;
} }
} }
@ -201,26 +220,46 @@ GSStringFromBezelStyle(NSBezelStyle bezelStyle)
{ {
switch (bezelStyle) switch (bezelStyle)
{ {
case NSRoundedBezelStyle: return @"NSRoundedBezelStyle"; case NSRoundedBezelStyle:
case NSRegularSquareBezelStyle: return @"NSRegularSquareBezelStyle"; return @"NSRoundedBezelStyle";
case NSThickSquareBezelStyle: return @"NSThickSquareBezelStyle"; case NSRegularSquareBezelStyle:
case NSThickerSquareBezelStyle: return @"NSThickerSquareBezelStyle"; return @"NSRegularSquareBezelStyle";
case NSDisclosureBezelStyle: return @"NSDisclosureBezelStyle"; case NSThickSquareBezelStyle:
case NSShadowlessSquareBezelStyle: return @"NSShadowlessSquareBezelStyle"; return @"NSThickSquareBezelStyle";
case NSCircularBezelStyle: return @"NSCircularBezelStyle"; case NSThickerSquareBezelStyle:
case NSTexturedSquareBezelStyle: return @"NSTexturedSquareBezelStyle"; return @"NSThickerSquareBezelStyle";
case NSHelpButtonBezelStyle: return @"NSHelpButtonBezelStyle"; case NSDisclosureBezelStyle:
case NSSmallSquareBezelStyle: return @"NSSmallSquareBezelStyle"; return @"NSDisclosureBezelStyle";
case NSTexturedRoundedBezelStyle: return @"NSTexturedRoundedBezelStyle"; case NSShadowlessSquareBezelStyle:
case NSRoundRectBezelStyle: return @"NSRoundRectBezelStyle"; return @"NSShadowlessSquareBezelStyle";
case NSRecessedBezelStyle: return @"NSRecessedBezelStyle"; case NSCircularBezelStyle:
case NSRoundedDisclosureBezelStyle: return @"NSRoundedDisclosureBezelStyle"; return @"NSCircularBezelStyle";
case NSNeXTBezelStyle: return @"NSNeXTBezelStyle"; case NSTexturedSquareBezelStyle:
case NSPushButtonBezelStyle: return @"NSPushButtonBezelStyle"; return @"NSTexturedSquareBezelStyle";
case NSSmallIconButtonBezelStyle: return @"NSSmallIconButtonBezelStyle"; case NSHelpButtonBezelStyle:
case NSMediumIconButtonBezelStyle: return @"NSMediumIconButtonBezelStyle"; return @"NSHelpButtonBezelStyle";
case NSLargeIconButtonBezelStyle: return @"NSLargeIconButtonBezelStyle"; case NSSmallSquareBezelStyle:
default: return nil; return @"NSSmallSquareBezelStyle";
case NSTexturedRoundedBezelStyle:
return @"NSTexturedRoundedBezelStyle";
case NSRoundRectBezelStyle:
return @"NSRoundRectBezelStyle";
case NSRecessedBezelStyle:
return @"NSRecessedBezelStyle";
case NSRoundedDisclosureBezelStyle:
return @"NSRoundedDisclosureBezelStyle";
case NSNeXTBezelStyle:
return @"NSNeXTBezelStyle";
case NSPushButtonBezelStyle:
return @"NSPushButtonBezelStyle";
case NSSmallIconButtonBezelStyle:
return @"NSSmallIconButtonBezelStyle";
case NSMediumIconButtonBezelStyle:
return @"NSMediumIconButtonBezelStyle";
case NSLargeIconButtonBezelStyle:
return @"NSLargeIconButtonBezelStyle";
default:
return nil;
} }
} }
@ -1150,13 +1189,15 @@ typedef struct {
fullName = [aName stringByAppendingString: @"Disabled"]; fullName = [aName stringByAppendingString: @"Disabled"];
break; break;
case GSThemeHighlightedFirstResponderState: case GSThemeHighlightedFirstResponderState:
fullName = [aName stringByAppendingString: @"HighlightedFirstResponder"]; fullName
= [aName stringByAppendingString: @"HighlightedFirstResponder"];
break; break;
case GSThemeHighlightedState: case GSThemeHighlightedState:
fullName = [aName stringByAppendingString: @"Highlighted"]; fullName = [aName stringByAppendingString: @"Highlighted"];
break; break;
case GSThemeSelectedFirstResponderState: case GSThemeSelectedFirstResponderState:
fullName = [aName stringByAppendingString: @"SelectedFirstResponder"]; fullName
= [aName stringByAppendingString: @"SelectedFirstResponder"];
break; break;
case GSThemeSelectedState: case GSThemeSelectedState:
fullName = [aName stringByAppendingString: @"Selected"]; fullName = [aName stringByAppendingString: @"Selected"];
@ -1184,8 +1225,7 @@ typedef struct {
name = [info objectForKey: @"FillStyle"]; name = [info objectForKey: @"FillStyle"];
style = GSThemeFillStyleFromString(name); style = GSThemeFillStyleFromString(name);
if (style < GSThemeFillStyleNone) if (style < GSThemeFillStyleNone) style = GSThemeFillStyleNone;
style = GSThemeFillStyleNone;
x = [[info objectForKey: @"HorizontalDivision"] floatValue]; x = [[info objectForKey: @"HorizontalDivision"] floatValue];
y = [[info objectForKey: @"VerticalDivision"] floatValue]; y = [[info objectForKey: @"VerticalDivision"] floatValue];
file = [info objectForKey: @"FileName"]; file = [info objectForKey: @"FileName"];
@ -1206,7 +1246,8 @@ typedef struct {
if ([[info objectForKey: @"NinePatch"] boolValue] if ([[info objectForKey: @"NinePatch"] boolValue]
|| [file hasSuffix: @".9"]) || [file hasSuffix: @".9"])
{ {
tiles = [[GSDrawTiles alloc] initWithNinePatchImage: image]; tiles = [[GSDrawTiles alloc]
initWithNinePatchImage: image];
[tiles setFillStyle: GSThemeFillStyleScaleAll]; [tiles setFillStyle: GSThemeFillStyleScaleAll];
} }
else else
@ -1231,10 +1272,12 @@ typedef struct {
inDirectory: @"ThemeTiles"]; inDirectory: @"ThemeTiles"];
if (imagePath != nil) if (imagePath != nil)
{ {
image = [[_imageClass alloc] initWithContentsOfFile: imagePath]; image
= [[_imageClass alloc] initWithContentsOfFile: imagePath];
if (image != nil) if (image != nil)
{ {
tiles = [[GSDrawTiles alloc] initWithNinePatchImage: image]; tiles = [[GSDrawTiles alloc]
initWithNinePatchImage: image];
[tiles setFillStyle: GSThemeFillStyleScaleAll]; [tiles setFillStyle: GSThemeFillStyleScaleAll];
RELEASE(image); RELEASE(image);
} }
@ -1257,7 +1300,8 @@ typedef struct {
inDirectory: @"ThemeTiles"]; inDirectory: @"ThemeTiles"];
if (imagePath != nil) if (imagePath != nil)
{ {
image = [[_imageClass alloc] initWithContentsOfFile: imagePath]; image
= [[_imageClass alloc] initWithContentsOfFile: imagePath];
if (image != nil) if (image != nil)
{ {
tiles = [[GSDrawTiles alloc] initWithImage: image]; tiles = [[GSDrawTiles alloc] initWithImage: image];

View file

@ -643,6 +643,17 @@ static BOOL restoreMouseMoved;
attributes: attributes]; attributes: attributes];
textSize = [toolTipText size]; textSize = [toolTipText size];
// TESTPLANT-MAL-03092016: Merged...
if (textSize.width > 300)
{
NSRect rect;
rect = [toolTipText boundingRectWithSize: NSMakeSize(300, 1e7)
options: 0];
textSize = rect.size;
// This extra pixel is needed, otherwise the last line gets cut off.
textSize.height += 1;
}
/* Create window just off the current mouse position /* Create window just off the current mouse position
* Constrain it to be on screen, shrinking if necessary. * Constrain it to be on screen, shrinking if necessary.
*/ */

View file

@ -52,6 +52,7 @@
#import "NSToolbarFrameworkPrivate.h" #import "NSToolbarFrameworkPrivate.h"
// TESTPLANT-MAL-2015: Modified to match closer with Cocoa...
typedef enum { typedef enum {
ToolbarViewDefaultHeight = 56, ToolbarViewDefaultHeight = 56,
ToolbarViewRegularHeight = 56, ToolbarViewRegularHeight = 56,