diff --git a/Source/GSImageMagickImageRep.m b/Source/GSImageMagickImageRep.m index 5b75f7289..3cbb08280 100644 --- a/Source/GSImageMagickImageRep.m +++ b/Source/GSImageMagickImageRep.m @@ -31,10 +31,10 @@ #import #import #import +#import #import #import #import -#import #import "AppKit/NSBitmapImageRep.h" #import "AppKit/NSGraphics.h" #import "AppKit/NSPasteboard.h" diff --git a/Source/GSTextFinder.m b/Source/GSTextFinder.m index c24985c6a..62ca70709 100644 --- a/Source/GSTextFinder.m +++ b/Source/GSTextFinder.m @@ -480,7 +480,8 @@ static GSTextFinder *sharedTextFinder; if ([ignoreCaseButton state] != NSOffState) { *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 { diff --git a/Source/GSTheme.m b/Source/GSTheme.m index bef2cc21d..5ddf16221 100644 --- a/Source/GSTheme.m +++ b/Source/GSTheme.m @@ -39,7 +39,6 @@ #import #import #import -#import "GNUstepBase/GSObjCRuntime.h" #import "GNUstepGUI/GSTheme.h" #import "AppKit/NSApplication.h" #import "AppKit/NSButtonCell.h" @@ -112,18 +111,30 @@ NSString *GSSliderVerticalTrack = @"GSSliderVerticalTrack"; NSString *GSBoxBorder = @"GSBoxBorder"; /* NSTabView parts */ -NSString *GSTabViewSelectedTabFill = @"GSTabViewSelectedTabFill"; -NSString *GSTabViewUnSelectedTabFill = @"GSTabViewUnSelectedTabFill"; -NSString *GSTabViewBackgroundTabFill = @"GSTabViewBackgroundTabFill"; -NSString *GSTabViewBottomSelectedTabFill = @"GSTabViewBottomSelectedTabFill"; -NSString *GSTabViewBottomUnSelectedTabFill = @"GSTabViewBottomUnSelectedTabFill"; -NSString *GSTabViewBottomBackgroundTabFill = @"GSTabViewBottomBackgroundTabFill"; -NSString *GSTabViewLeftSelectedTabFill = @"GSTabViewLeftSelectedTabFill"; -NSString *GSTabViewLeftUnSelectedTabFill = @"GSTabViewLeftUnSelectedTabFill"; -NSString *GSTabViewLeftBackgroundTabFill = @"GSTabViewLeftBackgroundTabFill"; -NSString *GSTabViewRightSelectedTabFill = @"GSTabViewRightSelectedTabFill"; -NSString *GSTabViewRightUnSelectedTabFill = @"GSTabViewRightUnSelectedTabFill"; -NSString *GSTabViewRightBackgroundTabFill = @"GSTabViewRightBackgroundTabFill"; +NSString *GSTabViewSelectedTabFill + = @"GSTabViewSelectedTabFill"; +NSString *GSTabViewUnSelectedTabFill + = @"GSTabViewUnSelectedTabFill"; +NSString *GSTabViewBackgroundTabFill + = @"GSTabViewBackgroundTabFill"; +NSString *GSTabViewBottomSelectedTabFill + = @"GSTabViewBottomSelectedTabFill"; +NSString *GSTabViewBottomUnSelectedTabFill + = @"GSTabViewBottomUnSelectedTabFill"; +NSString *GSTabViewBottomBackgroundTabFill + = @"GSTabViewBottomBackgroundTabFill"; +NSString *GSTabViewLeftSelectedTabFill + = @"GSTabViewLeftSelectedTabFill"; +NSString *GSTabViewLeftUnSelectedTabFill + = @"GSTabViewLeftUnSelectedTabFill"; +NSString *GSTabViewLeftBackgroundTabFill + = @"GSTabViewLeftBackgroundTabFill"; +NSString *GSTabViewRightSelectedTabFill + = @"GSTabViewRightSelectedTabFill"; +NSString *GSTabViewRightUnSelectedTabFill + = @"GSTabViewRightUnSelectedTabFill"; +NSString *GSTabViewRightBackgroundTabFill + = @"GSTabViewRightBackgroundTabFill"; NSString *GSThemeDidActivateNotification @@ -185,14 +196,22 @@ GSStringFromSegmentStyle(NSSegmentStyle segmentStyle) { switch (segmentStyle) { - case NSSegmentStyleAutomatic: return @"NSSegmentStyleAutomatic"; - case NSSegmentStyleRounded: return @"NSSegmentStyleRounded"; - case NSSegmentStyleTexturedRounded: return @"NSSegmentStyleTexturedRounded"; - case NSSegmentStyleRoundRect: return @"NSSegmentStyleRoundRect"; - case NSSegmentStyleTexturedSquare: return @"NSSegmentStyleTexturedSquare"; - case NSSegmentStyleCapsule: return @"NSSegmentStyleCapsule"; - case NSSegmentStyleSmallSquare: return @"NSSegmentStyleSmallSquare"; - default: return nil; + case NSSegmentStyleAutomatic: + return @"NSSegmentStyleAutomatic"; + case NSSegmentStyleRounded: + return @"NSSegmentStyleRounded"; + case NSSegmentStyleTexturedRounded: + return @"NSSegmentStyleTexturedRounded"; + case NSSegmentStyleRoundRect: + 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) { - case NSRoundedBezelStyle: return @"NSRoundedBezelStyle"; - case NSRegularSquareBezelStyle: return @"NSRegularSquareBezelStyle"; - case NSThickSquareBezelStyle: return @"NSThickSquareBezelStyle"; - case NSThickerSquareBezelStyle: return @"NSThickerSquareBezelStyle"; - case NSDisclosureBezelStyle: return @"NSDisclosureBezelStyle"; - case NSShadowlessSquareBezelStyle: return @"NSShadowlessSquareBezelStyle"; - case NSCircularBezelStyle: return @"NSCircularBezelStyle"; - case NSTexturedSquareBezelStyle: return @"NSTexturedSquareBezelStyle"; - case NSHelpButtonBezelStyle: return @"NSHelpButtonBezelStyle"; - case NSSmallSquareBezelStyle: 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; + case NSRoundedBezelStyle: + return @"NSRoundedBezelStyle"; + case NSRegularSquareBezelStyle: + return @"NSRegularSquareBezelStyle"; + case NSThickSquareBezelStyle: + return @"NSThickSquareBezelStyle"; + case NSThickerSquareBezelStyle: + return @"NSThickerSquareBezelStyle"; + case NSDisclosureBezelStyle: + return @"NSDisclosureBezelStyle"; + case NSShadowlessSquareBezelStyle: + return @"NSShadowlessSquareBezelStyle"; + case NSCircularBezelStyle: + return @"NSCircularBezelStyle"; + case NSTexturedSquareBezelStyle: + return @"NSTexturedSquareBezelStyle"; + case NSHelpButtonBezelStyle: + return @"NSHelpButtonBezelStyle"; + case NSSmallSquareBezelStyle: + 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"]; break; case GSThemeHighlightedFirstResponderState: - fullName = [aName stringByAppendingString: @"HighlightedFirstResponder"]; + fullName + = [aName stringByAppendingString: @"HighlightedFirstResponder"]; break; case GSThemeHighlightedState: fullName = [aName stringByAppendingString: @"Highlighted"]; break; case GSThemeSelectedFirstResponderState: - fullName = [aName stringByAppendingString: @"SelectedFirstResponder"]; + fullName + = [aName stringByAppendingString: @"SelectedFirstResponder"]; break; case GSThemeSelectedState: fullName = [aName stringByAppendingString: @"Selected"]; @@ -1184,8 +1225,7 @@ typedef struct { name = [info objectForKey: @"FillStyle"]; style = GSThemeFillStyleFromString(name); - if (style < GSThemeFillStyleNone) - style = GSThemeFillStyleNone; + if (style < GSThemeFillStyleNone) style = GSThemeFillStyleNone; x = [[info objectForKey: @"HorizontalDivision"] floatValue]; y = [[info objectForKey: @"VerticalDivision"] floatValue]; file = [info objectForKey: @"FileName"]; @@ -1206,7 +1246,8 @@ typedef struct { if ([[info objectForKey: @"NinePatch"] boolValue] || [file hasSuffix: @".9"]) { - tiles = [[GSDrawTiles alloc] initWithNinePatchImage: image]; + tiles = [[GSDrawTiles alloc] + initWithNinePatchImage: image]; [tiles setFillStyle: GSThemeFillStyleScaleAll]; } else @@ -1231,10 +1272,12 @@ typedef struct { inDirectory: @"ThemeTiles"]; if (imagePath != nil) { - image = [[_imageClass alloc] initWithContentsOfFile: imagePath]; + image + = [[_imageClass alloc] initWithContentsOfFile: imagePath]; if (image != nil) { - tiles = [[GSDrawTiles alloc] initWithNinePatchImage: image]; + tiles = [[GSDrawTiles alloc] + initWithNinePatchImage: image]; [tiles setFillStyle: GSThemeFillStyleScaleAll]; RELEASE(image); } @@ -1257,7 +1300,8 @@ typedef struct { inDirectory: @"ThemeTiles"]; if (imagePath != nil) { - image = [[_imageClass alloc] initWithContentsOfFile: imagePath]; + image + = [[_imageClass alloc] initWithContentsOfFile: imagePath]; if (image != nil) { tiles = [[GSDrawTiles alloc] initWithImage: image]; diff --git a/Source/GSToolTips.m b/Source/GSToolTips.m index 2492f9561..6427e8813 100644 --- a/Source/GSToolTips.m +++ b/Source/GSToolTips.m @@ -643,6 +643,17 @@ static BOOL restoreMouseMoved; attributes: attributes]; 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 * Constrain it to be on screen, shrinking if necessary. */ diff --git a/Source/GSToolbarView.m b/Source/GSToolbarView.m index 81dcbf3d0..1f3d6409f 100644 --- a/Source/GSToolbarView.m +++ b/Source/GSToolbarView.m @@ -52,6 +52,7 @@ #import "NSToolbarFrameworkPrivate.h" +// TESTPLANT-MAL-2015: Modified to match closer with Cocoa... typedef enum { ToolbarViewDefaultHeight = 56, ToolbarViewRegularHeight = 56,