* Headers/AppKit/NSBrowser.h

* Headers/AppKit/NSFontPanel.h
        * Headers/AppKit/NSMatrix.h
        * Headers/AppKit/NSTableView.h
        * Source/NSBrowser.m
        * Source/NSFontPanel.m
        * Source/NSMatrix.m: Small fixes to last change.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36042 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-01-30 22:13:32 +00:00
parent 40fb48e5de
commit 1aa1803744
8 changed files with 84 additions and 28 deletions

View file

@ -1,3 +1,57 @@
2013-01-30 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSBrowser.h
* Headers/AppKit/NSFontPanel.h
* Headers/AppKit/NSMatrix.h
* Headers/AppKit/NSTableView.h
* Source/NSBrowser.m
* Source/NSFontPanel.m
* Source/NSMatrix.m: Small fixes to last change.
2013-01-30 David Chisnall <theraven@gna.org>
* ColorPickers/GSNamedColorPicker.m
* Headers/Additions/GNUstepGUI/GSDisplayServer.h
* Headers/AppKit/NSArrayController.h
* Headers/AppKit/NSBrowser.h
* Headers/AppKit/NSControl.h
* Headers/AppKit/NSMatrix.h
* Headers/AppKit/NSTableView.h
* Headers/AppKit/NSToolbar.h
* Source/GSDisplayServer.m
* Source/GSDragView.m
* Source/GSLayoutManager.m
* Source/GSMemoryPanel.m
* Source/GSNibLoading.m
* Source/GSTheme.m
* Source/GSToolTips.m
* Source/GSXibLoader.m
* Source/NSActionCell.m
* Source/NSAlert.m
* Source/NSApplication.m
* Source/NSBrowser.m
* Source/NSButtonCell.m
* Source/NSCell.m
* Source/NSColor.m
* Source/NSColorList.m
* Source/NSComboBoxCell.m
* Source/NSControl.m
* Source/NSEvent.m
* Source/NSFontPanel.m
* Source/NSGraphicsContext.m
* Source/NSHelpManager.m
* Source/NSHelpPanel.m
* Source/NSMatrix.m
* Source/NSNibBindingConnector.m
* Source/NSOutlineView.m
* Source/NSPrintPanel.m
* Source/NSSearchFieldCell.m
* Source/NSTableView.m
* Source/NSTextView.m
* Source/NSWindow.m
* Source/NSWorkspace.m
* Tools/make_services.m: Fix all current compiler warnings on FreeBSD/x86-64.
2013-01-30 Fred Kiefer <FredKiefer@gmx.de>
* Source/externs.m: Change predefined colour values to CGFloat.

View file

@ -201,7 +201,7 @@ typedef enum _NSBrowserColumnResizingType
- (void) setTitle: (NSString *)aString
ofColumn: (NSInteger)column;
- (NSRect) titleFrameOfColumn: (NSInteger)column;
- (float) titleHeight;
- (CGFloat) titleHeight;
- (NSString *) titleOfColumn: (NSInteger)column;
//

View file

@ -64,8 +64,8 @@ enum {
BOOL _preview;
// store currently selected information
NSMutableArray *_familyList;
NSMutableArray *_faceList;
NSArray *_familyList;
NSArray *_faceList;
int _family;
int _face;
NSFontTraitMask _traits;

View file

@ -99,12 +99,12 @@ typedef enum _NSMatrixMode {
*/
- (id) initWithFrame: (NSRect)frameRect;
- (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode
mode: (NSMatrixMode)aMode
cellClass: (Class)classId
numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (NSInteger)colsWide;
- (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode
mode: (NSMatrixMode)aMode
prototype: (NSCell *)aCell
numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (NSInteger)colsWide;

View file

@ -54,6 +54,7 @@ enum {
NSTableViewSolidHorizontalGridLineMask = 1 << 1,
NSTableViewDashedHorizontalGridLineMask = 1 << 3
};
typedef NSUInteger NSTableViewGridLineStyle;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
typedef enum _NSTableViewColumnAutoresizingStyle
@ -66,7 +67,6 @@ typedef enum _NSTableViewColumnAutoresizingStyle
NSTableViewFirstColumnOnlyAutoresizingStyle
} NSTableViewColumnAutoresizingStyle;
#endif
typedef NSUInteger NSTableViewGridLineStyle;
@interface NSTableView : NSControl <NSUserInterfaceValidations>

View file

@ -1471,10 +1471,10 @@ static NSTextFieldCell *titleCell;
/** <p>Returns the height of column titles. The Nextish look returns 21.</p>
*/
- (float) titleHeight
- (CGFloat) titleHeight
{
// Nextish look requires 21 here
return 21;
return 21.0;
}
/** <p>Returns the bounds of the title frame for the column at index column.
@ -1492,7 +1492,7 @@ static NSTextFieldCell *titleCell;
{
// Number of columns over from the first
NSInteger nbColumn = column - _firstVisibleColumn;
NSInteger titleHeight = [self titleHeight];
CGFloat titleHeight = [self titleHeight];
NSRect rect;
// Calculate origin

View file

@ -186,13 +186,12 @@ static float sizes[] = {4.0, 6.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
NSBrowser *familyBrowser = [[self contentView] viewWithTag: NSFPFamilyBrowser];
NSArray *fontFamilies = [fm availableFontFamilies];
unsigned int i,j;
DESTROY(_familyList);
NSMutableArray *familyList;
/*
Build an array of all families that have a font that will be included.
*/
_familyList = [[NSMutableArray alloc]
familyList = [[NSMutableArray alloc]
initWithCapacity: [fontFamilies count]];
for (i = 0; i < [fontFamilies count]; i++)
@ -206,12 +205,14 @@ static float sizes[] = {4.0, 6.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
if ([self _includeFont: [[familyMembers objectAtIndex: j] objectAtIndex: 0]
delegate: fmDelegate])
{
[_familyList addObject: [fontFamilies objectAtIndex: i]];
[familyList addObject: [fontFamilies objectAtIndex: i]];
break;
}
}
}
DESTROY(_familyList);
_familyList = familyList;
// Reload the display.
[familyBrowser loadColumnZero];
// Reselect the current font. (Hopefully still there)
@ -266,7 +267,7 @@ static float sizes[] = {4.0, 6.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0,
{
[familyBrowser selectRow: i inColumn: 0];
_family = i;
ASSIGN(_faceList, (NSMutableArray *)[fm availableMembersOfFontFamily: family]);
ASSIGN(_faceList, [fm availableMembersOfFontFamily: family]);
[faceBrowser loadColumnZero];
_face = -1;
}
@ -1004,23 +1005,24 @@ static int score_difference(int weight1, int traits1,
unsigned int i;
NSArray *entireFaceList;
NSMutableArray *faceList;
entireFaceList = [fm availableMembersOfFontFamily:
[_familyList objectAtIndex:row]];
[_familyList objectAtIndex: row]];
DESTROY(_faceList);
_faceList = [[NSMutableArray alloc] initWithCapacity: [entireFaceList count]];
faceList = [[NSMutableArray alloc] initWithCapacity: [entireFaceList count]];
for (i = 0; i < [entireFaceList count]; i++)
{
id aFace = [entireFaceList objectAtIndex:i];
if ([self _includeFont: [aFace objectAtIndex:0] delegate: fmDelegate])
{
[_faceList addObject: aFace];
[faceList addObject: aFace];
}
}
DESTROY(_faceList);
_faceList = faceList;
_family = row;
// Select a face with the same properties
@ -1148,8 +1150,8 @@ static int score_difference(int weight1, int traits1,
- (void) browser: (NSBrowser *)sender
willDisplayCell: (id)cell
atRow: (int)row
column: (int)column
atRow: (NSInteger)row
column: (NSInteger)column
{
NSString *value = nil;
@ -1160,7 +1162,7 @@ static int score_difference(int weight1, int traits1,
{
case NSFPFamilyBrowser:
{
if ([_familyList count] > (unsigned)row)
if ([_familyList count] > (NSUInteger)row)
{
value = [_familyList objectAtIndex: row];
}
@ -1168,7 +1170,7 @@ static int score_difference(int weight1, int traits1,
}
case NSFPFaceBrowser:
{
if ([_faceList count] > (unsigned)row)
if ([_faceList count] > (NSUInteger)row)
{
value = [[_faceList objectAtIndex: row] objectAtIndex: 1];
}

View file

@ -269,9 +269,9 @@ static SEL getSel;
}
- (void) _privateFrame: (NSRect)frameRect
mode: (int)aMode
numberOfRows: (int)rows
numberOfColumns: (int)cols
mode: (NSMatrixMode)aMode
numberOfRows: (NSInteger)rows
numberOfColumns: (NSInteger)cols
{
_myZone = [self zone];
[self _renewRows: rows columns: cols rowSpace: 0 colSpace: 0];
@ -342,7 +342,7 @@ static SEL getSel;
-initWithFrame:mode:prototype:numberOfRows:numberOfColumns:</p>
*/
- (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode
mode: (NSMatrixMode)aMode
cellClass: (Class)classId
numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (NSInteger)colsWide
@ -365,7 +365,7 @@ static SEL getSel;
-initWithFrame:mode:prototype:numberOfRows:numberOfColumns:</p>
*/
- (id) initWithFrame: (NSRect)frameRect
mode: (int)aMode
mode: (NSMatrixMode)aMode
prototype: (NSCell*)aCell
numberOfRows: (NSInteger)rowsHigh
numberOfColumns: (NSInteger)colsWide