int -> NSInteger transition.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@37359 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2013-11-04 15:02:25 +00:00
parent 2aa362da0e
commit e87fd029b4
35 changed files with 227 additions and 190 deletions

View file

@ -1,3 +1,40 @@
2013-11-04 10:03-EST Gregory John Casamento <greg.casamento@gmail.com>
* GormCore/GormBoxEditor.m
* GormCore/GormClassEditor.m
* GormCore/GormClassInspector.m
* GormCore/GormClassManager.m
* GormCore/GormControlEditor.m
* GormCore/GormCustomView.m
* GormCore/GormDocument.m
* GormCore/GormDocumentWindow.m
* GormCore/GormFilePrefsManager.h
* GormCore/GormFilePrefsManager.m
* GormCore/GormFunctions.h
* GormCore/GormFunctions.m
* GormCore/GormInspectorsManager.m
* GormCore/GormInternalViewEditor.m
* GormCore/GormMatrixEditor.h
* GormCore/GormMatrixEditor.m
* GormCore/GormNSPanel.h
* GormCore/GormNSPanel.m
* GormCore/GormNSWindow.h
* GormCore/GormNSWindow.m
* GormCore/GormObjectEditor.m
* GormCore/GormObjectInspector.m
* GormCore/GormOutlineView.m
* GormCore/GormPrivate.h
* GormCore/GormPrivate.m
* GormCore/GormResourceEditor.m
* GormCore/GormResourceManager.m
* GormCore/GormSoundView.m
* GormCore/GormSplitViewEditor.m
* GormCore/GormStandaloneViewEditor.m
* GormCore/GormViewEditor.m
* GormCore/GormViewKnobs.m
* GormCore/GormViewWithContentViewEditor.m
* GormCore/GormViewWithSubviewsEditor.m: int -> NSInteger transition.
2013-10-26 Fred Kiefer <FredKiefer@gmx.de> 2013-10-26 Fred Kiefer <FredKiefer@gmx.de>
* Plugins/Nib/GormNibWrapperBuilder.m (-initWithDocument:): * Plugins/Nib/GormNibWrapperBuilder.m (-initWithDocument:):

View file

@ -99,8 +99,8 @@
- (void) deleteSelection - (void) deleteSelection
{ {
int i = 0; NSInteger i = 0;
int count = [selection count]; NSInteger count = [selection count];
id temp = nil; id temp = nil;
for (i = count - 1; i >= 0; i--) for (i = count - 1; i >= 0; i--)

View file

@ -273,7 +273,7 @@ NSImage *browserImage = nil;
{ {
if([classesView contentView] == scrollView) if([classesView contentView] == scrollView)
{ {
int row = [outlineView selectedRow]; NSInteger row = [outlineView selectedRow];
if ( row == -1 ) if ( row == -1 )
{ {
row = 0; row = 0;
@ -314,7 +314,7 @@ NSImage *browserImage = nil;
NSMutableArray *subClassesArray = [NSMutableArray array]; NSMutableArray *subClassesArray = [NSMutableArray array];
NSEnumerator *en; NSEnumerator *en;
int row = 0; int row = 0;
int col = 0; NSInteger col = 0;
if ( ( className != nil ) if ( ( className != nil )
&& ( [className isEqual: @"CustomView"] == NO ) && ( [className isEqual: @"CustomView"] == NO )
@ -426,7 +426,7 @@ NSImage *browserImage = nil;
if([classesView contentView] == scrollView) if([classesView contentView] == scrollView)
{ {
int i = [outlineView selectedRow]; NSInteger i = [outlineView selectedRow];
if (i >= 0 && i <= ([outlineView numberOfRows] - 1)) if (i >= 0 && i <= ([outlineView numberOfRows] - 1))
{ {
@ -507,7 +507,7 @@ NSImage *browserImage = nil;
- (void) deleteSelection - (void) deleteSelection
{ {
id anitem; id anitem;
int i = [outlineView selectedRow]; NSInteger i = [outlineView selectedRow];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
// if no selection, then return. // if no selection, then return.
@ -820,7 +820,7 @@ NSImage *browserImage = nil;
itemSelected]; itemSelected];
if(newClassName != nil) if(newClassName != nil)
{ {
int i = 0; NSInteger i = 0;
if([classesView contentView] == scrollView) if([classesView contentView] == scrollView)
{ {
[outlineView reloadData]; [outlineView reloadData];
@ -1171,7 +1171,7 @@ objectValueForTableColumn: (NSTableColumn *)aTableColumn
rename = [document renameConnectionsForClassNamed: item toName: anObject]; rename = [document renameConnectionsForClassNamed: item toName: anObject];
if (rename) if (rename)
{ {
int row = 0; NSInteger row = 0;
[classManager renameClassNamed: item newName: anObject]; [classManager renameClassNamed: item newName: anObject];
[gov reloadData]; [gov reloadData];
@ -1309,7 +1309,7 @@ shouldEditTableColumn: (NSTableColumn *)tableColumn
- (void) outlineViewSelectionDidChange: (NSNotification *)notification - (void) outlineViewSelectionDidChange: (NSNotification *)notification
{ {
id object = [notification object]; id object = [notification object];
int row = [object selectedRow]; NSInteger row = [object selectedRow];
if(row != -1) if(row != -1)
{ {
@ -1339,7 +1339,7 @@ shouldEditTableColumn: (NSTableColumn *)tableColumn
NSArray *classes = nil; NSArray *classes = nil;
NSEnumerator *en = nil; NSEnumerator *en = nil;
NSString *className = nil; NSString *className = nil;
int i = 0; NSInteger i = 0;
if (sender != browserView || !matrix || ![matrix isKindOfClass:[NSMatrix class]]) if (sender != browserView || !matrix || ![matrix isKindOfClass:[NSMatrix class]])
{ {

View file

@ -538,7 +538,7 @@ objectValueForTableColumn: (NSTableColumn *)tc
{ {
if([classManager isCustomClass: name]) if([classManager isCustomClass: name])
{ {
NSString *title = [NSString stringWithFormat: _(@"Modifying/Reparenting Class")]; NSString *title = _(@"Modifying/Reparenting Class");
NSString *msg = [NSString stringWithFormat: _(@"This action may break existing connections " NSString *msg = [NSString stringWithFormat: _(@"This action may break existing connections "
@"to instances of class '%@'" @"to instances of class '%@'"
@"and it's subclasses. Continue?"), name]; @"and it's subclasses. Continue?"), name];
@ -644,8 +644,8 @@ objectValueForTableColumn: (NSTableColumn *)tc
- (void) setObject: (id)anObject - (void) setObject: (id)anObject
{ {
int outletsCount = 0; NSInteger outletsCount = 0;
int actionsCount = 0; NSInteger actionsCount = 0;
NSTabViewItem *item = nil; NSTabViewItem *item = nil;
if([anObject isKindOfClass: [GormClassProxy class]]) if([anObject isKindOfClass: [GormClassProxy class]])
@ -658,9 +658,9 @@ objectValueForTableColumn: (NSTableColumn *)tc
actionsCount = [[classManager allActionsForClassNamed: currentClass] count]; actionsCount = [[classManager allActionsForClassNamed: currentClass] count];
item = [tabView tabViewItemAtIndex: 1]; // actions; item = [tabView tabViewItemAtIndex: 1]; // actions;
[item setLabel: [NSString stringWithFormat: @"Actions (%d)",actionsCount]]; [item setLabel: [NSString stringWithFormat: @"Actions (%ld)",actionsCount]];
item = [tabView tabViewItemAtIndex: 0]; // outlets; item = [tabView tabViewItemAtIndex: 0]; // outlets;
[item setLabel: [NSString stringWithFormat: @"Outlets (%d)",outletsCount]]; [item setLabel: [NSString stringWithFormat: @"Outlets (%ld)",outletsCount]];
[tabView setNeedsDisplay: YES]; [tabView setNeedsDisplay: YES];
[self _refreshView]; [self _refreshView];

View file

@ -171,11 +171,11 @@
- (NSString *) uniqueClassNameFrom: (NSString *)name - (NSString *) uniqueClassNameFrom: (NSString *)name
{ {
NSString *search = [NSString stringWithString: name]; NSString *search = [NSString stringWithString: name];
int i = 1; NSInteger i = 1;
while([classInformation objectForKey: search]) while([classInformation objectForKey: search])
{ {
search = [name stringByAppendingString: [NSString stringWithFormat: @"%d",i++]]; search = [name stringByAppendingString: [NSString stringWithFormat: @"%ld",i++]];
} }
return search; return search;
@ -220,11 +220,11 @@
NSString *newAction = @"newAction"; NSString *newAction = @"newAction";
NSString *search = [newAction stringByAppendingString: @":"]; NSString *search = [newAction stringByAppendingString: @":"];
NSString *new = nil; NSString *new = nil;
int i = 1; NSInteger i = 1;
while ([combined containsObject: search]) while ([combined containsObject: search])
{ {
new = [newAction stringByAppendingFormat: @"%d", i++]; new = [newAction stringByAppendingFormat: @"%ld", i++];
search = [new stringByAppendingString: @":"]; search = [new stringByAppendingString: @":"];
} }
@ -237,11 +237,11 @@
NSArray *combined = [self allOutletsForClassNamed: name]; NSArray *combined = [self allOutletsForClassNamed: name];
NSString *newOutlet = @"newOutlet"; NSString *newOutlet = @"newOutlet";
NSString *new = newOutlet; NSString *new = newOutlet;
int i = 1; NSInteger i = 1;
while ([combined containsObject: new]) while ([combined containsObject: new])
{ {
new = [newOutlet stringByAppendingFormat: @"%d", i++]; new = [newOutlet stringByAppendingFormat: @"%ld", i++];
} }
[self addOutlet: new forClassNamed: name]; [self addOutlet: new forClassNamed: name];
@ -447,19 +447,19 @@
// replace the action in the appropriate places. // replace the action in the appropriate places.
if ([extraActions containsObject: oldAction]) if ([extraActions containsObject: oldAction])
{ {
int extra_index = [extraActions indexOfObject: oldAction]; NSInteger extra_index = [extraActions indexOfObject: oldAction];
[extraActions replaceObjectAtIndex: extra_index withObject: newAction]; [extraActions replaceObjectAtIndex: extra_index withObject: newAction];
} }
if ([actions containsObject: oldAction]) if ([actions containsObject: oldAction])
{ {
int actions_index = [actions indexOfObject: oldAction]; NSInteger actions_index = [actions indexOfObject: oldAction];
[actions replaceObjectAtIndex: actions_index withObject: newAction]; [actions replaceObjectAtIndex: actions_index withObject: newAction];
} }
if ([allActions containsObject: oldAction]) if ([allActions containsObject: oldAction])
{ {
int all_index = [allActions indexOfObject: oldAction]; NSInteger all_index = [allActions indexOfObject: oldAction];
[allActions replaceObjectAtIndex: all_index withObject: newAction]; [allActions replaceObjectAtIndex: all_index withObject: newAction];
} }
@ -498,19 +498,19 @@
// replace outlets in appropriate places... // replace outlets in appropriate places...
if ([extraOutlets containsObject: oldOutlet]) if ([extraOutlets containsObject: oldOutlet])
{ {
int extraIndex = [extraOutlets indexOfObject: oldOutlet]; NSInteger extraIndex = [extraOutlets indexOfObject: oldOutlet];
[extraOutlets replaceObjectAtIndex: extraIndex withObject: newOutlet]; [extraOutlets replaceObjectAtIndex: extraIndex withObject: newOutlet];
} }
if ([outlets containsObject: oldOutlet]) if ([outlets containsObject: oldOutlet])
{ {
int outletsIndex = [outlets indexOfObject: oldOutlet]; NSInteger outletsIndex = [outlets indexOfObject: oldOutlet];
[outlets replaceObjectAtIndex: outletsIndex withObject: newOutlet]; [outlets replaceObjectAtIndex: outletsIndex withObject: newOutlet];
} }
if ([allOutlets containsObject: oldOutlet]) if ([allOutlets containsObject: oldOutlet])
{ {
int allIndex = [allOutlets indexOfObject: oldOutlet]; NSInteger allIndex = [allOutlets indexOfObject: oldOutlet];
[allOutlets replaceObjectAtIndex: allIndex withObject: newOutlet]; [allOutlets replaceObjectAtIndex: allIndex withObject: newOutlet];
} }
@ -1921,7 +1921,7 @@
@"actions/outlets to instances of class '%@' " @"actions/outlets to instances of class '%@' "
@"and it's subclasses. Continue?"), @"and it's subclasses. Continue?"),
className]; className];
int retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil); NSInteger retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
if (retval == NSAlertDefaultReturn) if (retval == NSAlertDefaultReturn)
{ {
@ -2227,11 +2227,11 @@
NSArray *classNames = [self allClassNames]; NSArray *classNames = [self allClassNames];
NSEnumerator *en = [classNames objectEnumerator]; NSEnumerator *en = [classNames objectEnumerator];
NSString *className = nil; NSString *className = nil;
int namelen = [name length]; NSInteger namelen = [name length];
while((className = [en nextObject]) != nil) while((className = [en nextObject]) != nil)
{ {
int classlen = [className length]; NSInteger classlen = [className length];
if(namelen < classlen) if(namelen < classlen)
{ {
NSComparisonResult result = NSComparisonResult result =

View file

@ -64,8 +64,8 @@
{ {
NSSize size = [self frame].size; NSSize size = [self frame].size;
NSSize constrainedSize; NSSize constrainedSize;
int col; NSInteger col;
int row; NSInteger row;
if (gpi->firstPass == NO) if (gpi->firstPass == NO)
[gpi->resizingIn displayRect: gpi->oldRect]; [gpi->resizingIn displayRect: gpi->oldRect];
@ -208,10 +208,10 @@
float rightOfFrame; float rightOfFrame;
float topOfFrame; float topOfFrame;
float bottomOfFrame; float bottomOfFrame;
int i; NSInteger i;
int count; NSInteger count;
int lastDistance; NSInteger lastDistance;
int minimum = 10; NSInteger minimum = 10;
BOOL leftEmpty = YES; BOOL leftEmpty = YES;
BOOL rightEmpty = YES; BOOL rightEmpty = YES;
BOOL topEmpty = YES; BOOL topEmpty = YES;
@ -555,8 +555,8 @@
{ {
NSSize cellSize = [self frame].size; NSSize cellSize = [self frame].size;
id editor; id editor;
int col; NSInteger col;
int row; NSInteger row;
NSMatrix *matrix; NSMatrix *matrix;
col = gpi->lastFrame.size.width / cellSize.width; col = gpi->lastFrame.size.width / cellSize.width;

View file

@ -202,7 +202,7 @@
} }
else else
{ {
int version = [aCoder versionForClassName: NSInteger version = [aCoder versionForClassName:
NSStringFromClass([GSCustomView class])]; NSStringFromClass([GSCustomView class])];
if (version == 1) if (version == 1)
@ -279,12 +279,12 @@
{ {
id obj; id obj;
Class cls; Class cls;
unsigned int mask; NSUInteger mask;
GormClassManager *classManager = [(id<Gorm>)NSApp classManager]; GormClassManager *classManager = [(id<Gorm>)NSApp classManager];
[aCoder decodeValueOfObjCType: @encode(id) at: &theClass]; [aCoder decodeValueOfObjCType: @encode(id) at: &theClass];
theFrame = [aCoder decodeRect]; theFrame = [aCoder decodeRect];
[aCoder decodeValueOfObjCType: @encode(unsigned int) [aCoder decodeValueOfObjCType: @encode(NSUInteger)
at: &mask]; at: &mask];
cls = NSClassFromString(theClass); cls = NSClassFromString(theClass);

View file

@ -455,12 +455,12 @@ static NSImage *fileImage = nil;
{ {
if([filePrefsManager loadFromData: infoData]) if([filePrefsManager loadFromData: infoData])
{ {
int version = [filePrefsManager version]; NSInteger version = [filePrefsManager version];
int currentVersion = [GormFilePrefsManager currentVersion]; NSInteger currentVersion = [GormFilePrefsManager currentVersion];
if(version > currentVersion) if(version > currentVersion)
{ {
int retval = NSRunAlertPanel(_(@"Gorm Build Mismatch"), NSInteger retval = NSRunAlertPanel(_(@"Gorm Build Mismatch"),
_(@"The file being loaded was created with a newer build, continue?"), _(@"The file being loaded was created with a newer build, continue?"),
_(@"OK"), _(@"OK"),
_(@"Cancel"), _(@"Cancel"),
@ -755,8 +755,8 @@ static NSImage *fileImage = nil;
if ([[anObject documentView] isKindOfClass: if ([[anObject documentView] isKindOfClass:
[NSTableView class]]) [NSTableView class]])
{ {
int i; NSInteger i;
int count; NSInteger count;
NSArray *tc; NSArray *tc;
id tv = [anObject documentView]; id tv = [anObject documentView];
tc = [tv tableColumns]; tc = [tv tableColumns];
@ -2607,7 +2607,7 @@ static void _real_close(GormDocument *self,
{ {
NSString *title; NSString *title;
NSString *msg; NSString *msg;
int retval; NSInteger retval;
if(prompted == NO) if(prompted == NO)
{ {
@ -2660,7 +2660,7 @@ static void _real_close(GormDocument *self,
NSEnumerator *en = nil; NSEnumerator *en = nil;
id<IBConnectors> c = nil; id<IBConnectors> c = nil;
BOOL removed = YES; BOOL removed = YES;
int retval = -1; NSInteger retval = -1;
NSString *title = [NSString stringWithFormat: _(@"Modifying Class")]; NSString *title = [NSString stringWithFormat: _(@"Modifying Class")];
NSString *msg; NSString *msg;
@ -2773,7 +2773,7 @@ static void _real_close(GormDocument *self,
NSEnumerator *en = [connections objectEnumerator]; NSEnumerator *en = [connections objectEnumerator];
id<IBConnectors> c = nil; id<IBConnectors> c = nil;
BOOL renamed = YES; BOOL renamed = YES;
int retval = -1; NSInteger retval = -1;
NSString *title = [NSString stringWithFormat: _(@"Modifying Class")]; NSString *title = [NSString stringWithFormat: _(@"Modifying Class")];
NSString *msg = [NSString stringWithFormat: NSString *msg = [NSString stringWithFormat:
_(@"Change class name '%@' to '%@'. Continue?"), _(@"Change class name '%@' to '%@'. Continue?"),
@ -3215,7 +3215,7 @@ static void _real_close(GormDocument *self,
- (void) arrangeSelectedObjects: (id)sender - (void) arrangeSelectedObjects: (id)sender
{ {
NSArray *selection = [[(id<IB>)NSApp selectionOwner] selection]; NSArray *selection = [[(id<IB>)NSApp selectionOwner] selection];
int tag = [sender tag]; NSInteger tag = [sender tag];
NSEnumerator *en = [selection objectEnumerator]; NSEnumerator *en = [selection objectEnumerator];
id v = nil; id v = nil;
@ -3247,7 +3247,7 @@ static void _real_close(GormDocument *self,
- (void) alignSelectedObjects: (id)sender - (void) alignSelectedObjects: (id)sender
{ {
NSArray *selection = [[(id<IB>)NSApp selectionOwner] selection]; NSArray *selection = [[(id<IB>)NSApp selectionOwner] selection];
int tag = [sender tag]; NSInteger tag = [sender tag];
NSEnumerator *en = [selection objectEnumerator]; NSEnumerator *en = [selection objectEnumerator];
id v = nil; id v = nil;
id prev = nil; id prev = nil;
@ -3324,7 +3324,7 @@ static void _real_close(GormDocument *self,
*/ */
if(isOlderArchive && [filePrefsManager isLatest]) if(isOlderArchive && [filePrefsManager isLatest])
{ {
int retval = NSRunAlertPanel(_(@"Compatibility Warning"), NSInteger retval = NSRunAlertPanel(_(@"Compatibility Warning"),
_(@"Saving will update this gorm to the latest version \n" _(@"Saving will update this gorm to the latest version \n"
@"which may not be compatible with some previous versions \n" @"which may not be compatible with some previous versions \n"
@"of GNUstep."), @"of GNUstep."),

View file

@ -44,8 +44,8 @@
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender; - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;
{ {
NSPasteboard *pb = [sender draggingPasteboard]; NSPasteboard *pb = [sender draggingPasteboard];
unsigned int mask = [sender draggingSourceOperationMask]; NSUInteger mask = [sender draggingSourceOperationMask];
unsigned int oper = NSDragOperationNone; NSUInteger oper = NSDragOperationNone;
dragMgr = [_document resourceManagerForPasteboard:pb]; dragMgr = [_document resourceManagerForPasteboard:pb];
if (dragMgr) if (dragMgr)

View file

@ -13,7 +13,7 @@
id fileType; id fileType;
// encoded ivars... // encoded ivars...
int version; NSInteger version;
NSString *targetVersionName; NSString *targetVersionName;
NSString *archiveTypeName; NSString *archiveTypeName;

View file

@ -40,14 +40,14 @@
#include <GNUstepBase/GSObjCRuntime.h> #include <GNUstepBase/GSObjCRuntime.h>
#include <InterfaceBuilder/IBApplicationAdditions.h> #include <InterfaceBuilder/IBApplicationAdditions.h>
NSString *formatVersion(int version) NSString *formatVersion(NSInteger version)
{ {
int bit16 = 65536; NSInteger bit16 = 65536;
int bit8 = 256; NSInteger bit8 = 256;
int maj = 0; NSInteger maj = 0;
int min = 0; NSInteger min = 0;
int pch = 0; NSInteger pch = 0;
int v = version; NSInteger v = version;
// pull the version fromt the number // pull the version fromt the number
maj = (int)((float)v / (float)bit16); maj = (int)((float)v / (float)bit16);
@ -56,7 +56,7 @@ NSString *formatVersion(int version)
v -= (bit8 * min); v -= (bit8 * min);
pch = v; pch = v;
return [NSString stringWithFormat: @"%d.%d.%d / %d",maj,min,pch,version]; return [NSString stringWithFormat: @"%ld.%ld.%ld / %ld",maj,min,pch,version];
} }
@ -108,8 +108,8 @@ NSString *formatVersion(int version)
{ {
Class cls = NSClassFromString(className); Class cls = NSClassFromString(className);
NSDictionary *info = [currentProfile objectForKey: className]; NSDictionary *info = [currentProfile objectForKey: className];
int v = [[info objectForKey: @"version"] intValue]; NSInteger v = [[info objectForKey: @"version"] intValue];
NSDebugLog(@"Setting version %d for class %@",v,className); NSDebugLog(@"Setting version %ld for class %@",v,className);
[cls setVersion: v]; [cls setVersion: v];
} }
} }
@ -126,8 +126,8 @@ NSString *formatVersion(int version)
{ {
Class cls = NSClassFromString(className); Class cls = NSClassFromString(className);
NSDictionary *info = [latestVersion objectForKey: className]; NSDictionary *info = [latestVersion objectForKey: className];
int v = [[info objectForKey: @"version"] intValue]; NSInteger v = [[info objectForKey: @"version"] intValue];
NSDebugLog(@"Setting version %d for class %@",v,className); NSDebugLog(@"Setting version %ld for class %@",v,className);
[cls setVersion: v]; [cls setVersion: v];
} }
} }
@ -208,7 +208,7 @@ NSString *formatVersion(int version)
- (int) versionOfClass: (NSString *)className - (int) versionOfClass: (NSString *)className
{ {
int result = -1; NSInteger result = -1;
NSDictionary *clsProfile = [currentProfile objectForKey: className]; NSDictionary *clsProfile = [currentProfile objectForKey: className];
if(clsProfile != nil) if(clsProfile != nil)

View file

@ -44,7 +44,7 @@ void subviewsForView(NSView *view, NSMutableArray *array);
NSArray *allSubviews(NSView *view); NSArray *allSubviews(NSView *view);
// cut the file label to the appropriate length... // cut the file label to the appropriate length...
NSString *cutFileLabelText(NSString *filename, id label, int length); NSString *cutFileLabelText(NSString *filename, id label, NSInteger length);
// get the cell size for all editors // get the cell size for all editors
NSSize defaultCellSize(); NSSize defaultCellSize();

View file

@ -106,7 +106,7 @@ NSArray *allSubviews(NSView *view)
} }
// cut the text... code taken from GWorkspace, by Enrico Sersale // cut the text... code taken from GWorkspace, by Enrico Sersale
static inline NSString *cutText(NSString *filename, id label, int lenght) static inline NSString *cutText(NSString *filename, id label, NSInteger lenght)
{ {
NSString *cutname = nil; NSString *cutname = nil;
NSString *reststr = nil; NSString *reststr = nil;
@ -114,7 +114,7 @@ static inline NSString *cutText(NSString *filename, id label, int lenght)
NSFont *labfont; NSFont *labfont;
NSDictionary *attr; NSDictionary *attr;
float w, cw, dotslenght; float w, cw, dotslenght;
int i; NSInteger i;
cw = 0; cw = 0;
labfont = [label font]; labfont = [label font];
@ -164,7 +164,7 @@ static inline NSString *cutText(NSString *filename, id label, int lenght)
return cutname; return cutname;
} }
NSString *cutFileLabelText(NSString *filename, id label, int length) NSString *cutFileLabelText(NSString *filename, id label, NSInteger length)
{ {
if (length > 0) if (length > 0)
{ {
@ -176,7 +176,7 @@ NSString *cutFileLabelText(NSString *filename, id label, int length)
NSSize defaultCellSize() NSSize defaultCellSize()
{ {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
int width = [defaults integerForKey: @"CellSizeWidth"]; NSInteger width = [defaults integerForKey: @"CellSizeWidth"];
NSSize size = NSMakeSize(width, 72); NSSize size = NSMakeSize(width, 72);
return size; return size;
} }

View file

@ -249,20 +249,20 @@
- (void) _refreshPopUp - (void) _refreshPopUp
{ {
NSEnumerator *en = [modes objectEnumerator]; NSEnumerator *en = [modes objectEnumerator];
int index = 0; NSInteger index = 0;
id obj = nil; id obj = nil;
[popup removeAllItems]; [popup removeAllItems];
while((obj = [en nextObject]) != nil) while((obj = [en nextObject]) != nil)
{ {
int tag = index + 1; NSInteger tag = index + 1;
NSMenuItem *item; NSMenuItem *item;
[popup addItemWithTitle: [obj localizedLabel]]; [popup addItemWithTitle: [obj localizedLabel]];
item = (NSMenuItem *)[popup itemAtIndex: index]; item = (NSMenuItem *)[popup itemAtIndex: index];
[item setTarget: self]; [item setTarget: self];
[item setAction: @selector(setCurrentInspector:)]; [item setAction: @selector(setCurrentInspector:)];
[item setKeyEquivalent: [NSString stringWithFormat: @"%d",tag]]; [item setKeyEquivalent: [NSString stringWithFormat: @"%ld",tag]];
[item setTag: tag]; [item setTag: tag];
index++; index++;
} }
@ -278,7 +278,7 @@
NSView *newView = nil; NSView *newView = nil;
NSView *oldView = nil; NSView *oldView = nil;
NSString *newInspector = nil; NSString *newInspector = nil;
int tag = 0; NSInteger tag = 0;
if (anObj != self) if (anObj != self)
{ {

View file

@ -274,8 +274,8 @@ static NSImage *horizontalImage;
- (NSArray*) selection - (NSArray*) selection
{ {
int i; NSInteger i;
int count = [selection count]; NSInteger count = [selection count];
NSMutableArray *result = [NSMutableArray arrayWithCapacity: count]; NSMutableArray *result = [NSMutableArray arrayWithCapacity: count];
if (count != 0) if (count != 0)
@ -295,9 +295,9 @@ static NSImage *horizontalImage;
- (void) deleteSelection - (void) deleteSelection
{ {
int i; NSInteger i;
NSArray *sel = [selection copy]; NSArray *sel = [selection copy];
int count = [sel count]; NSInteger count = [sel count];
for (i = count - 1; i >= 0; i--) for (i = count - 1; i >= 0; i--)
{ {
@ -342,8 +342,8 @@ static NSImage *horizontalImage;
// are we on the knob of a selected view ? // are we on the knob of a selected view ?
{ {
int count = [selection count]; NSInteger count = [selection count];
int i; NSInteger i;
GormViewEditor *knobView = nil; GormViewEditor *knobView = nil;
IBKnobPosition knob = IBNoneKnobPosition; IBKnobPosition knob = IBNoneKnobPosition;
NSPoint mouseDownPoint; NSPoint mouseDownPoint;

View file

@ -29,8 +29,8 @@
@interface GormMatrixEditor : GormViewWithSubviewsEditor @interface GormMatrixEditor : GormViewWithSubviewsEditor
{ {
NSCell* selected; NSCell* selected;
int selectedRow; NSInteger selectedRow;
int selectedCol; NSInteger selectedCol;
} }
@end @end

View file

@ -58,7 +58,7 @@
- (CGFloat)titleWidth - (CGFloat)titleWidth
{ {
int i, count = [self numberOfRows]; NSInteger i, count = [self numberOfRows];
float new_title_width = 0; float new_title_width = 0;
float candidate_title_width = 0; float candidate_title_width = 0;
@ -428,22 +428,22 @@ static BOOL done_editing;
withEvent: (NSEvent *)theEvent withEvent: (NSEvent *)theEvent
andKnob: (IBKnobPosition) knob andKnob: (IBKnobPosition) knob
{ {
int width; NSInteger width;
int height; NSInteger height;
if ([theEvent modifierFlags] & NSAlternateKeyMask) if ([theEvent modifierFlags] & NSAlternateKeyMask)
{ {
int rows = [_EO numberOfRows]; NSInteger rows = [_EO numberOfRows];
int cols = [_EO numberOfColumns]; NSInteger cols = [_EO numberOfColumns];
NSSize interSize = [_EO intercellSpacing]; NSSize interSize = [_EO intercellSpacing];
int colWidth = ([_EO frame].size.width - NSInteger colWidth = ([_EO frame].size.width -
(cols - 1) * interSize.width) / cols; (cols - 1) * interSize.width) / cols;
int rowHeight = ([_EO frame].size.height - NSInteger rowHeight = ([_EO frame].size.height -
(rows - 1) * interSize.height) / rows; (rows - 1) * interSize.height) / rows;
int widthIncrement = colWidth + interSize.width; NSInteger widthIncrement = colWidth + interSize.width;
int heightIncrement = rowHeight + interSize.height; NSInteger heightIncrement = rowHeight + interSize.height;
if (frame.size.width < colWidth) if (frame.size.width < colWidth)
{ {
@ -471,8 +471,8 @@ static BOOL done_editing;
} }
else if ([theEvent modifierFlags] & NSControlKeyMask) else if ([theEvent modifierFlags] & NSControlKeyMask)
{ {
int rows = [_EO numberOfRows]; NSInteger rows = [_EO numberOfRows];
int cols = [_EO numberOfColumns]; NSInteger cols = [_EO numberOfColumns];
NSSize cellSize = [_EO cellSize]; NSSize cellSize = [_EO cellSize];
height = width = 0; height = width = 0;
@ -488,8 +488,8 @@ static BOOL done_editing;
} }
else else
{ {
int rows = [_EO numberOfRows]; NSInteger rows = [_EO numberOfRows];
int cols = [_EO numberOfColumns]; NSInteger cols = [_EO numberOfColumns];
NSSize interSize = [_EO intercellSpacing]; NSSize interSize = [_EO intercellSpacing];
width = ( frame.size.width - interSize.width * (cols - 1) ) / cols; width = ( frame.size.width - interSize.width * (cols - 1) ) / cols;
@ -566,24 +566,24 @@ static BOOL done_editing;
if ([theEvent modifierFlags] & (NSControlKeyMask | NSShiftKeyMask)) if ([theEvent modifierFlags] & (NSControlKeyMask | NSShiftKeyMask))
{ {
int rows = [_EO numberOfRows]; NSInteger rows = [_EO numberOfRows];
int cols = [_EO numberOfColumns]; NSInteger cols = [_EO numberOfColumns];
NSSize interSize = [_EO intercellSpacing]; NSSize interSize = [_EO intercellSpacing];
int colWidth = ([_EO frame].size.width - NSInteger colWidth = ([_EO frame].size.width -
(cols - 1) * interSize.width) / cols; (cols - 1) * interSize.width) / cols;
int rowHeight = ([_EO frame].size.height - NSInteger rowHeight = ([_EO frame].size.height -
(rows - 1) * interSize.height) / rows; (rows - 1) * interSize.height) / rows;
int widthIncrement = colWidth + interSize.width; NSInteger widthIncrement = colWidth + interSize.width;
int heightIncrement = rowHeight + interSize.height; NSInteger heightIncrement = rowHeight + interSize.height;
int newCols = (frame.size.width - [_EO frame].size.width) / NSInteger newCols = (frame.size.width - [_EO frame].size.width) /
widthIncrement; widthIncrement;
int newRows = (frame.size.height - [_EO frame].size.height) / NSInteger newRows = (frame.size.height - [_EO frame].size.height) /
heightIncrement; heightIncrement;
int i, j; NSInteger i, j;
if (newCols > 0) if (newCols > 0)
{ {
@ -636,10 +636,10 @@ static BOOL done_editing;
} }
else if ([theEvent modifierFlags] & NSControlKeyMask) else if ([theEvent modifierFlags] & NSControlKeyMask)
{ {
int width; NSInteger width;
int height; NSInteger height;
int rows = [_EO numberOfRows]; NSInteger rows = [_EO numberOfRows];
int cols = [_EO numberOfColumns]; NSInteger cols = [_EO numberOfColumns];
NSSize cellSize = [_EO cellSize]; NSSize cellSize = [_EO cellSize];
@ -656,10 +656,10 @@ static BOOL done_editing;
} }
else else
{ {
int width; NSInteger width;
int height; NSInteger height;
int rows = [_EO numberOfRows]; NSInteger rows = [_EO numberOfRows];
int cols = [_EO numberOfColumns]; NSInteger cols = [_EO numberOfColumns];
NSSize interSize = [_EO intercellSpacing]; NSSize interSize = [_EO intercellSpacing];

View file

@ -31,7 +31,7 @@
{ {
unsigned _gormStyleMask; unsigned _gormStyleMask;
BOOL _gormReleasedWhenClosed; BOOL _gormReleasedWhenClosed;
unsigned int autoPositionMask; NSUInteger autoPositionMask;
} }
- (void) _setStyleMask: (unsigned int)newStyleMask; - (void) _setStyleMask: (unsigned int)newStyleMask;
- (unsigned int) _styleMask; - (unsigned int) _styleMask;

View file

@ -29,7 +29,7 @@
// the default style mask we start with. // the default style mask we start with.
static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask static NSUInteger defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
| NSResizableWindowMask | NSMiniaturizableWindowMask; | NSResizableWindowMask | NSMiniaturizableWindowMask;
@implementation GormNSPanel @implementation GormNSPanel

View file

@ -30,7 +30,7 @@
{ {
unsigned _gormStyleMask; unsigned _gormStyleMask;
BOOL _gormReleasedWhenClosed; BOOL _gormReleasedWhenClosed;
unsigned int autoPositionMask; NSUInteger autoPositionMask;
} }
- (void) _setStyleMask: (unsigned int)newStyleMask; - (void) _setStyleMask: (unsigned int)newStyleMask;
- (unsigned int) _styleMask; - (unsigned int) _styleMask;

View file

@ -28,7 +28,7 @@
#include "GormNSWindow.h" #include "GormNSWindow.h"
// the default style mask we start with. // the default style mask we start with.
static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask static NSUInteger defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
| NSResizableWindowMask | NSMiniaturizableWindowMask; | NSResizableWindowMask | NSMiniaturizableWindowMask;
@implementation GormNSWindow @implementation GormNSWindow

View file

@ -186,7 +186,7 @@ static NSMapTable *docMap = 0;
{ {
NSString *title = _(@"Removing Main Menu"); NSString *title = _(@"Removing Main Menu");
NSString *msg = _(@"Are you sure you want to do this?"); NSString *msg = _(@"Are you sure you want to do this?");
int retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil); NSInteger retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
// if the user *really* wants to delete the menu, do it. // if the user *really* wants to delete the menu, do it.
if(retval != NSAlertDefaultReturn) if(retval != NSAlertDefaultReturn)

View file

@ -378,7 +378,7 @@ selectCellWithString: (NSString*)title
unsigned v; unsigned v;
unsigned (*imp)(); unsigned (*imp)();
imp = (unsigned int (*)()) [object methodForSelector: get]; imp = (unsigned (*)()) [object methodForSelector: get];
v = (*imp)(object, get); v = (*imp)(object, get);
[value setStringValue: [NSString stringWithFormat: @"%u", v]]; [value setStringValue: [NSString stringWithFormat: @"%u", v]];
} }

View file

@ -39,7 +39,7 @@
#include <AppKit/NSImage.h> #include <AppKit/NSImage.h>
static NSNotificationCenter *nc = nil; static NSNotificationCenter *nc = nil;
static const int current_version = 1; static const NSInteger current_version = 1;
// Cache the arrow images... // Cache the arrow images...
static NSImage *collapsed = nil; static NSImage *collapsed = nil;
@ -225,8 +225,8 @@ static NSColor *darkGreyBlueColor = nil;
- (void)_openActions: (id)item - (void)_openActions: (id)item
{ {
int numchildren = 0; NSInteger numchildren = 0;
int i = 0; NSInteger i = 0;
NSUInteger insertionPoint = 0; NSUInteger insertionPoint = 0;
id object = nil; id object = nil;
id sitem = (item == nil)?((id)[NSNull null]):((id)item); id sitem = (item == nil)?((id)[NSNull null]):((id)item);
@ -267,8 +267,8 @@ static NSColor *darkGreyBlueColor = nil;
- (void) _openOutlets: (id)item - (void) _openOutlets: (id)item
{ {
int numchildren = 0; NSInteger numchildren = 0;
int i = 0; NSInteger i = 0;
NSInteger insertionPoint = 0; NSInteger insertionPoint = 0;
id object = nil; id object = nil;
id sitem = (item == nil)?((id)[NSNull null]):((id)item); id sitem = (item == nil)?((id)[NSNull null]):((id)item);
@ -309,14 +309,14 @@ static NSColor *darkGreyBlueColor = nil;
- (void) drawRow: (NSInteger)rowIndex clipRect: (NSRect)aRect - (void) drawRow: (NSInteger)rowIndex clipRect: (NSRect)aRect
{ {
int startingColumn; NSInteger startingColumn;
int endingColumn; NSInteger endingColumn;
NSTableColumn *tb; NSTableColumn *tb;
NSRect drawingRect; NSRect drawingRect;
NSCell *cell; NSCell *cell;
NSCell *imageCell = nil; NSCell *imageCell = nil;
NSRect imageRect; NSRect imageRect;
int i; NSInteger i;
float x_pos; float x_pos;
if (_dataSource == nil) if (_dataSource == nil)
@ -404,7 +404,7 @@ static NSColor *darkGreyBlueColor = nil;
if (tb == _outlineTableColumn && !isOutletAction) if (tb == _outlineTableColumn && !isOutletAction)
{ {
NSImage *image = nil; NSImage *image = nil;
int level = 0; NSInteger level = 0;
float indentationFactor = 0.0; float indentationFactor = 0.0;
// display the correct arrow... // display the correct arrow...
@ -519,7 +519,7 @@ static NSColor *darkGreyBlueColor = nil;
if ((tb == _actionColumn || tb == _outletColumn) && !_isEditing) if ((tb == _actionColumn || tb == _outletColumn) && !_isEditing)
{ {
int position = 0; NSInteger position = 0;
position += _columnOrigins[_clickedColumn] + 5; position += _columnOrigins[_clickedColumn] + 5;
if (location.x >= position if (location.x >= position
@ -648,7 +648,7 @@ static NSColor *darkGreyBlueColor = nil;
NSRect drawingRect, imageRect; NSRect drawingRect, imageRect;
unsigned length = 0; unsigned length = 0;
id item = nil; id item = nil;
int level = 0; NSInteger level = 0;
float indentationFactor = 0.0; float indentationFactor = 0.0;
NSImage *image = nil; NSImage *image = nil;
NSCell *imageCell = nil; NSCell *imageCell = nil;

View file

@ -80,7 +80,7 @@ extern NSString *GormResizeCellNotification;
@interface GormClassProxy : NSObject @interface GormClassProxy : NSObject
{ {
NSString *name; NSString *name;
int t; NSInteger t;
} }
- initWithClassName: (NSString*)n; - initWithClassName: (NSString*)n;

View file

@ -132,7 +132,7 @@ static BOOL _isInInterfaceBuilder = NO;
{ {
NSUInteger version = [aCoder versionForClassName: NSUInteger version = [aCoder versionForClassName:
NSStringFromClass([GSNibItem class])]; NSStringFromClass([GSNibItem class])];
int cv = [aCoder versionForClassName: NSInteger cv = [aCoder versionForClassName:
NSStringFromClass([GSNibContainer class])]; NSStringFromClass([GSNibContainer class])];
if (version == NSNotFound) if (version == NSNotFound)

View file

@ -264,7 +264,7 @@
>= 25)) >= 25))
{ {
NSPasteboard *pb; NSPasteboard *pb;
int pos; NSInteger pos;
pos = row * [self numberOfColumns] + column; pos = row * [self numberOfColumns] + column;
// don't allow the user to drag empty resources. // don't allow the user to drag empty resources.

View file

@ -51,8 +51,8 @@
NSArray *types = [pb types]; NSArray *types = [pb types];
NSArray *acceptedTypes = [self resourcePasteboardTypes]; NSArray *acceptedTypes = [self resourcePasteboardTypes];
BOOL flag = YES; BOOL flag = YES;
int i; NSInteger i;
int c = [types count]; NSInteger c = [types count];
if (c == 0) return NO; if (c == 0) return NO;
@ -66,7 +66,7 @@
{ {
NSArray *files = [pb propertyListForType:type]; NSArray *files = [pb propertyListForType:type];
NSArray *acceptedFiles = [self resourceFileTypes]; NSArray *acceptedFiles = [self resourceFileTypes];
int j, d; NSInteger j, d;
if (!files) if (!files)
{ {
@ -93,8 +93,8 @@
NSArray *types = [pb types]; NSArray *types = [pb types];
NSArray *soundTypes = [NSSound soundUnfilteredFileTypes]; NSArray *soundTypes = [NSSound soundUnfilteredFileTypes];
NSArray *imageTypes = [NSImage imageFileTypes]; NSArray *imageTypes = [NSImage imageFileTypes];
int i; NSInteger i;
int c = [types count]; NSInteger c = [types count];
BOOL found = NO; BOOL found = NO;
for (i = 0; i < c; i++) for (i = 0; i < c; i++)
@ -103,7 +103,7 @@
if ([type isEqual:NSFilenamesPboardType]) if ([type isEqual:NSFilenamesPboardType])
{ {
int j, d; NSInteger j, d;
NSArray *files = [pb propertyListForType:type]; NSArray *files = [pb propertyListForType:type];
found = YES; found = YES;
if (!files) if (!files)

View file

@ -46,9 +46,9 @@
static float findMax(NSData *data) static float findMax(NSData *data)
{ {
float max = 0.0; float max = 0.0;
int index = 0; NSInteger index = 0;
float *array = (float *)[data bytes]; float *array = (float *)[data bytes];
int len = [data length]; NSInteger len = [data length];
// find the maximum... // find the maximum...
for(index = 0; index < len; index++) for(index = 0; index < len; index++)
@ -88,9 +88,9 @@ static float findMax(NSData *data)
float x1 = 0, x2 = 0, y1 = offset, y2 = offset; float x1 = 0, x2 = 0, y1 = offset, y2 = offset;
float max = findMax(soundData); float max = findMax(soundData);
float multiplier = h/max; float multiplier = h/max;
int length = [soundData length]; NSInteger length = [soundData length];
int index = 0; NSInteger index = 0;
int step = (length/(int)w); NSInteger step = (length/(int)w);
[super drawRect: aRect]; [super drawRect: aRect];
@ -104,7 +104,7 @@ static float findMax(NSData *data)
y1 = offset; y1 = offset;
for(index = step; index < w; index+=step) for(index = step; index < w; index+=step)
{ {
int i = (int)index; NSInteger i = (int)index;
float d = data[i]; float d = data[i];
// calc new position... // calc new position...

View file

@ -262,9 +262,9 @@
} }
{ {
int i; NSInteger i;
NSArray *subs = [_EO subviews]; NSArray *subs = [_EO subviews];
int count = [subs count]; NSInteger count = [subs count];
NSPoint mouseDownPoint = NSPoint mouseDownPoint =
[self convertPoint: [theEvent locationInWindow] [self convertPoint: [theEvent locationInWindow]
fromView: nil]; fromView: nil];
@ -339,7 +339,7 @@
NSMutableArray *newSelection = [NSMutableArray array]; NSMutableArray *newSelection = [NSMutableArray array];
NSArray *views; NSArray *views;
int i; NSInteger i;
views = [contentView destroyAndListSubviews]; views = [contentView destroyAndListSubviews];
for (i = 0; i < [views count]; i++) for (i = 0; i < [views count]; i++)
{ {

View file

@ -68,8 +68,8 @@ static NSImage *horizontalImage;
// are we on the knob of a selected view ? // are we on the knob of a selected view ?
{ {
int count = [selection count]; NSInteger count = [selection count];
int i; NSInteger i;
GormViewEditor *knobView = nil; GormViewEditor *knobView = nil;
IBKnobPosition knob = IBNoneKnobPosition; IBKnobPosition knob = IBNoneKnobPosition;
NSPoint mouseDownPoint; NSPoint mouseDownPoint;

View file

@ -100,8 +100,8 @@
- (int) distanceToFrame: (NSRect) frame - (int) distanceToFrame: (NSRect) frame
{ {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
int guideSpacing = [userDefaults integerForKey: @"GuideSpacing"]; NSInteger guideSpacing = [userDefaults integerForKey: @"GuideSpacing"];
int halfSpacing = guideSpacing / 2; NSInteger halfSpacing = guideSpacing / 2;
NSRect rect = [self rectWithHalfDistance: (halfSpacing + 1)]; NSRect rect = [self rectWithHalfDistance: (halfSpacing + 1)];
if (NSIntersectsRect(frame, rect) == NO) if (NSIntersectsRect(frame, rect) == NO)
@ -392,13 +392,13 @@ static BOOL currently_displaying = NO;
- (void) _initializeHintWithInfo: (GormPlacementInfo*) gpi - (void) _initializeHintWithInfo: (GormPlacementInfo*) gpi
{ {
int i; NSInteger i;
NSArray *subviews = [[self superview] subviews]; NSArray *subviews = [[self superview] subviews];
int count = [subviews count]; NSInteger count = [subviews count];
NSView *v; NSView *v;
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
int guideSpacing = [userDefaults integerForKey: @"GuideSpacing"]; NSInteger guideSpacing = [userDefaults integerForKey: @"GuideSpacing"];
int halfSpacing = guideSpacing / 2; NSInteger halfSpacing = guideSpacing / 2;
gpi->lastLeftRect = NSZeroRect; gpi->lastLeftRect = NSZeroRect;
gpi->lastRightRect = NSZeroRect; gpi->lastRightRect = NSZeroRect;
@ -578,16 +578,16 @@ static BOOL currently_displaying = NO;
withPlacementInfo: (GormPlacementInfo*)gpi withPlacementInfo: (GormPlacementInfo*)gpi
{ {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
int guideSpacing = [userDefaults integerForKey: @"GuideSpacing"]; NSInteger guideSpacing = [userDefaults integerForKey: @"GuideSpacing"];
int halfSpacing = guideSpacing / 2; NSInteger halfSpacing = guideSpacing / 2;
float leftOfFrame = NSMinX(frame); float leftOfFrame = NSMinX(frame);
float rightOfFrame = NSMaxX(frame); float rightOfFrame = NSMaxX(frame);
float topOfFrame = NSMaxY(frame); float topOfFrame = NSMaxY(frame);
float bottomOfFrame = NSMinY(frame); float bottomOfFrame = NSMinY(frame);
int i; NSInteger i;
int count; NSInteger count;
int lastDistance; NSInteger lastDistance;
int minimum = guideSpacing; NSInteger minimum = guideSpacing;
BOOL leftEmpty = YES; BOOL leftEmpty = YES;
BOOL rightEmpty = YES; BOOL rightEmpty = YES;
BOOL topEmpty = YES; BOOL topEmpty = YES;
@ -884,18 +884,18 @@ static BOOL currently_displaying = NO;
andPlacementInfo: (GormPlacementInfo*)gpi andPlacementInfo: (GormPlacementInfo*)gpi
{ {
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
int guideSpacing = [userDefaults integerForKey: @"GuideSpacing"]; NSInteger guideSpacing = [userDefaults integerForKey: @"GuideSpacing"];
int halfSpacing = guideSpacing / 2; NSInteger halfSpacing = guideSpacing / 2;
float leftOfFrame = NSMinX(frame); float leftOfFrame = NSMinX(frame);
float rightOfFrame = NSMaxX(frame); float rightOfFrame = NSMaxX(frame);
float topOfFrame = NSMaxY(frame); float topOfFrame = NSMaxY(frame);
float bottomOfFrame = NSMinY(frame); float bottomOfFrame = NSMinY(frame);
float widthOfFrame = frame.size.width; float widthOfFrame = frame.size.width;
float heightOfFrame = frame.size.height; float heightOfFrame = frame.size.height;
int i; NSInteger i;
int count; NSInteger count;
int lastDistance; NSInteger lastDistance;
int minimum = guideSpacing; NSInteger minimum = guideSpacing;
BOOL leftEmpty = YES; BOOL leftEmpty = YES;
BOOL rightEmpty = YES; BOOL rightEmpty = YES;
BOOL topEmpty = YES; BOOL topEmpty = YES;

View file

@ -28,8 +28,8 @@
#include "GormViewKnobs.h" #include "GormViewKnobs.h"
#include <math.h> #include <math.h>
static int KNOB_WIDTH = 0.0; static NSInteger KNOB_WIDTH = 0.0;
static int KNOB_HEIGHT = 0.0; static NSInteger KNOB_HEIGHT = 0.0;
#define MINSIZE 5.0 #define MINSIZE 5.0

View file

@ -65,8 +65,8 @@
- (void) moveSelectionByX: (float)x - (void) moveSelectionByX: (float)x
andY: (float)y andY: (float)y
{ {
int i; NSInteger i;
int count = [selection count]; NSInteger count = [selection count];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
@ -83,8 +83,8 @@
- (void) resizeSelectionByX: (float)x - (void) resizeSelectionByX: (float)x
andY: (float)y andY: (float)y
{ {
int i; NSInteger i;
int count = [selection count]; NSInteger count = [selection count];
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
@ -219,8 +219,8 @@
} }
else if (_displaySelection) else if (_displaySelection)
{ {
int i; NSInteger i;
int count = [selection count]; NSInteger count = [selection count];
for ( i = 0; i < count ; i++ ) for ( i = 0; i < count ; i++ )
{ {
@ -246,7 +246,7 @@
int _sortViews(id view1, id view2, void *context) int _sortViews(id view1, id view2, void *context)
{ {
BOOL isVertical = *((BOOL *)context); BOOL isVertical = *((BOOL *)context);
int order = NSOrderedSame; NSInteger order = NSOrderedSame;
NSRect rect1 = [[view1 editedObject] frame]; NSRect rect1 = [[view1 editedObject] frame];
NSRect rect2 = [[view2 editedObject] frame]; NSRect rect2 = [[view2 editedObject] frame];
@ -290,7 +290,7 @@ int _sortViews(id view1, id view2, void *context)
GormViewEditor *editor = nil; GormViewEditor *editor = nil;
NSRect prevRect = NSZeroRect; NSRect prevRect = NSZeroRect;
NSRect currRect = NSZeroRect; NSRect currRect = NSZeroRect;
int count = 0; NSInteger count = 0;
// iterate over the list of views... // iterate over the list of views...
while((editor = [enumerator nextObject]) != nil) while((editor = [enumerator nextObject]) != nil)
@ -324,7 +324,7 @@ int _sortViews(id view1, id view2, void *context)
prevRect = currRect; prevRect = currRect;
} }
NSDebugLog(@"The vote is %d",count); NSDebugLog(@"The vote is %ld",count);
if(count >= 0) if(count >= 0)
vertical = YES; vertical = YES;
@ -634,7 +634,7 @@ int _sortViews(id view1, id view2, void *context)
NSMutableArray *newSelection = [NSMutableArray array]; NSMutableArray *newSelection = [NSMutableArray array];
NSArray *views; NSArray *views;
int i; NSInteger i;
views = [contentView destroyAndListSubviews]; views = [contentView destroyAndListSubviews];
for (i = 0; i < [views count]; i++) for (i = 0; i < [views count]; i++)
{ {

View file

@ -79,8 +79,8 @@
NSArray *subeditorConnections = NSArray *subeditorConnections =
[NSArray arrayWithArray: [document connectorsForDestination: self [NSArray arrayWithArray: [document connectorsForDestination: self
ofClass: [GormEditorToParent class]]]; ofClass: [GormEditorToParent class]]];
int count = [subeditorConnections count]; NSInteger count = [subeditorConnections count];
int i = 0; NSInteger i = 0;
for ( i = 0; i < count; i ++ ) for ( i = 0; i < count; i ++ )
{ {
@ -93,8 +93,8 @@
NSArray *subeditorConnections = NSArray *subeditorConnections =
[NSArray arrayWithArray: [document connectorsForDestination: self [NSArray arrayWithArray: [document connectorsForDestination: self
ofClass: [GormEditorToParent class]]]; ofClass: [GormEditorToParent class]]];
int count = [subeditorConnections count]; NSInteger count = [subeditorConnections count];
int i = 0; NSInteger i = 0;
for ( i = 0; i < count; i ++ ) for ( i = 0; i < count; i ++ )
{ {
@ -210,8 +210,8 @@
- (NSArray*) selection - (NSArray*) selection
{ {
int i; NSInteger i;
int count = [selection count]; NSInteger count = [selection count];
NSMutableArray *result = [NSMutableArray arrayWithCapacity: count]; NSMutableArray *result = [NSMutableArray arrayWithCapacity: count];
if (count != 0) if (count != 0)
@ -238,8 +238,8 @@
- (void) selectObjects: (NSArray *) objects - (void) selectObjects: (NSArray *) objects
{ {
int i; NSInteger i;
int count = [objects count]; NSInteger count = [objects count];
TEST_RELEASE(selection); TEST_RELEASE(selection);
selection = [[NSMutableArray alloc] initWithCapacity: [objects count]]; selection = [[NSMutableArray alloc] initWithCapacity: [objects count]];