mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 15:30:59 +00:00
Tweaks to avoid new compiler warnings with gcc-4.1 and some 64bit issues.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23126 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e2530f9bc8
commit
2ed1c70692
30 changed files with 313 additions and 246 deletions
34
ChangeLog
34
ChangeLog
|
@ -1,3 +1,37 @@
|
|||
2006-07-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSSpellServer.m:
|
||||
* Source/NSAlert.m:
|
||||
* Source/NSWindowController.m:
|
||||
* Source/GSDisplayServer.m:
|
||||
* Source/NSWorkspace.m:
|
||||
* Source/GSLayoutManager.m:
|
||||
* Source/NSWindow.m:
|
||||
* Source/NSLayoutManager.m:
|
||||
* Source/GSStandardWindowDecorationView.m:
|
||||
* Source/GSTextStorage.m:
|
||||
* Source/GSHorizontalTypesetter.m:
|
||||
* Source/NSColor.m:
|
||||
* Source/NSPasteboard.m:
|
||||
* Source/NSMenuItem.m:
|
||||
* Source/NSPageLayout.m:
|
||||
* Source/NSOutlineView.m:
|
||||
* Source/NSTextView.m:
|
||||
* Source/NSBitmapImageRep+JPEG.m:
|
||||
* Source/NSComboBoxCell.m:
|
||||
* Source/NSToolbarItem.m:
|
||||
* Source/NSImage.m:
|
||||
* Source/NSDataLink.m:
|
||||
* Source/GSServicesManager.m:
|
||||
* Source/NSPrintPanel.m:
|
||||
* Source/NSEvent.m:
|
||||
* Source/GSDragView.m:
|
||||
* Model/GMArchiver.m:
|
||||
* Model/IMConnectors.m:
|
||||
* Tools/GSspell.m:
|
||||
Tweaks to avoid spurious warnings in recent gcc-4.1 and a few casts
|
||||
etc to deal with a few real issues when working on 64bit cpus.
|
||||
|
||||
2006-07-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m (-rulerView:didMoveMarker:,
|
||||
|
|
|
@ -289,7 +289,7 @@
|
|||
-encodeObject: withName: message, save its label into the
|
||||
topLevelObjects array. */
|
||||
if (!level)
|
||||
[topLevelObjects addObject: (name ? name : label)];
|
||||
[topLevelObjects addObject: (name ? (id)name : (id)label)];
|
||||
|
||||
lastObjectRepresentation = objectPList;
|
||||
|
||||
|
@ -579,7 +579,7 @@
|
|||
{
|
||||
id inArchiveName = [(id)NSMapGet(classes, trueName) className];
|
||||
|
||||
return inArchiveName ? inArchiveName : trueName;
|
||||
return inArchiveName ? (NSString*)inArchiveName : (NSString*)trueName;
|
||||
}
|
||||
|
||||
/* In the following method the version of class named trueName is written as
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
{
|
||||
const char *type;
|
||||
unsigned int size;
|
||||
unsigned int offset;
|
||||
int offset;
|
||||
|
||||
/*
|
||||
* Use the GNUstep additional function to set the instance
|
||||
|
@ -100,7 +100,7 @@
|
|||
{
|
||||
const char *type;
|
||||
unsigned int size;
|
||||
unsigned int offset;
|
||||
int offset;
|
||||
|
||||
/*
|
||||
* Use the GNUstep additional function to set the instance
|
||||
|
@ -158,7 +158,7 @@
|
|||
const char *nam = [label cString];
|
||||
const char *type;
|
||||
unsigned int size;
|
||||
unsigned int offset;
|
||||
int offset;
|
||||
|
||||
/*
|
||||
* Use the GNUstep additional function to set the instance
|
||||
|
|
|
@ -80,7 +80,7 @@ GSServerForWindow(NSWindow *window)
|
|||
/* Backend window hasn't been initialized yet, assume current server. */
|
||||
return GSCurrentServer();
|
||||
}
|
||||
return NSMapGet(windowmaps, (void *)num);
|
||||
return NSMapGet(windowmaps, (void *)(intptr_t)num);
|
||||
}
|
||||
|
||||
/** Returns the current GSDisplayServer */
|
||||
|
@ -511,7 +511,7 @@ GSCurrentServer(void)
|
|||
for a window that has already been created */
|
||||
- (void) _setWindowOwnedByServer: (int)win
|
||||
{
|
||||
NSMapInsert (windowmaps, (void*)win, self);
|
||||
NSMapInsert (windowmaps, (void*)(intptr_t)win, self);
|
||||
}
|
||||
|
||||
/** Creates a window whose location and size is described by frame and
|
||||
|
|
|
@ -543,7 +543,7 @@ static GSDragView *sharedDragView = nil;
|
|||
NSEvent *e;
|
||||
NSGraphicsContext *context = GSCurrentContext();
|
||||
// FIXME: Should store this once
|
||||
int dragWindowRef = (int)[GSServerForWindow(_window) windowDevice: [_window windowNumber]];
|
||||
int dragWindowRef = (int)(intptr_t)[GSServerForWindow(_window) windowDevice: [_window windowNumber]];
|
||||
|
||||
eventLocation = [dWindow convertScreenToBase: eventLocation];
|
||||
e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||
|
|
|
@ -874,12 +874,14 @@ restart: ;
|
|||
|
||||
if (g->g == GSAttachmentGlyph)
|
||||
{
|
||||
NSTextAttachment *attach = [curTextStorage attribute: NSAttachmentAttributeName
|
||||
atIndex: g->char_index
|
||||
effectiveRange: NULL];
|
||||
NSTextAttachmentCell *cell = [attach attachmentCell];
|
||||
NSTextAttachment *attach;
|
||||
NSTextAttachmentCell *cell;
|
||||
NSRect r;
|
||||
|
||||
attach = [curTextStorage attribute: NSAttachmentAttributeName
|
||||
atIndex: g->char_index
|
||||
effectiveRange: NULL];
|
||||
cell = (NSTextAttachmentCell*)[attach attachmentCell];
|
||||
if (!cell)
|
||||
{
|
||||
g->pos = p;
|
||||
|
|
|
@ -157,9 +157,9 @@ Private method used internally by GSLayoutManager for sanity checking.
|
|||
h = (glyph_run_t *)(glyphs + SKIP_LIST_DEPTH - 1)->next;
|
||||
for (; h; h = (glyph_run_t *)h->head.next)
|
||||
{
|
||||
printf("%08x %i chars, %i glyphs, %i complete, prev %08x next %08x\n",
|
||||
(int)h, h->head.char_length, h->head.glyph_length, h->head.complete,
|
||||
(int)h->prev, (int)h->head.next);
|
||||
printf("%8p %i chars, %i glyphs, %i complete, prev %8p next %8p\n",
|
||||
h, h->head.char_length, h->head.glyph_length, h->head.complete,
|
||||
h->prev, h->head.next);
|
||||
printf(" level %i, continued %i\n", h->level, h->continued);
|
||||
if (h->head.complete)
|
||||
{
|
||||
|
@ -181,14 +181,14 @@ Private method used internally by GSLayoutManager for sanity checking.
|
|||
|
||||
printf(" head: ");
|
||||
for (i = 0, h = glyphs + SKIP_LIST_DEPTH - 1; i < SKIP_LIST_DEPTH; i++, h--)
|
||||
printf("%8x %i %3i %3i|", (int)h->next, h->complete, h->char_length, h->glyph_length);
|
||||
printf("%8p %i %3i %3i|", h->next, h->complete, h->char_length, h->glyph_length);
|
||||
printf("\n");
|
||||
h = (glyphs + SKIP_LIST_DEPTH - 1)->next;
|
||||
for (; h; h = h->next)
|
||||
{
|
||||
printf("%8x: ", (int)h);
|
||||
printf("%8p: ", h);
|
||||
for (g = h, i = ((glyph_run_t *)h)->level; i >= 0; i--, g--)
|
||||
printf("%8x %i %3i %3i|", (int)g->next, g->complete, g->char_length, g->glyph_length);
|
||||
printf("%8p %i %3i %3i|", g->next, g->complete, g->char_length, g->glyph_length);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -278,6 +278,7 @@ NSRegisterServicesProvider(id provider, NSString *name)
|
|||
|
||||
- (void) dealloc
|
||||
{
|
||||
GSNOSUPERDEALLOC;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -644,7 +645,7 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
unsigned i, j;
|
||||
unsigned es = [sendTypes count];
|
||||
unsigned er = [returnTypes count];
|
||||
NSWindow *resp = [[_application keyWindow] firstResponder];
|
||||
NSResponder *resp = [[_application keyWindow] firstResponder];
|
||||
id obj = nil;
|
||||
|
||||
for (i = 0; i <= es; i++)
|
||||
|
@ -1267,7 +1268,7 @@ static NSString *disabledName = @".GNUstepDisabled";
|
|||
unsigned i, j;
|
||||
unsigned es = [sendTypes count];
|
||||
unsigned er = [returnTypes count];
|
||||
NSWindow *resp = [[_application keyWindow] firstResponder];
|
||||
NSResponder *resp = [[_application keyWindow] firstResponder];
|
||||
|
||||
/*
|
||||
* If the menu item is not in our map, it must be the item containing
|
||||
|
|
|
@ -120,7 +120,7 @@ static NSColor *titleColor[3];
|
|||
{
|
||||
NSMutableParagraphStyle *p;
|
||||
|
||||
p = [NSMutableParagraphStyle defaultParagraphStyle];
|
||||
p = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
|
||||
[p setLineBreakMode: NSLineBreakByClipping];
|
||||
|
||||
titleTextAttributes[0] = [[NSMutableDictionary alloc]
|
||||
|
@ -142,6 +142,7 @@ static NSColor *titleColor[3];
|
|||
p, NSParagraphStyleAttributeName,
|
||||
nil];
|
||||
|
||||
RELEASE(p);
|
||||
titleColor[0] = RETAIN([NSColor windowFrameColor]);
|
||||
titleColor[1] = RETAIN([NSColor lightGrayColor]);
|
||||
titleColor[2] = RETAIN([NSColor darkGrayColor]);
|
||||
|
|
|
@ -167,6 +167,7 @@ unCacheAttributes(NSDictionary *attrs)
|
|||
{
|
||||
[self gcFinalize];
|
||||
NSDeallocateObject(self);
|
||||
GSNOSUPERDEALLOC;
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
|
|
|
@ -690,8 +690,7 @@ setControl(NSView* content, id control, NSString *title)
|
|||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"alert panel buttonAction: from unknown sender - x%x\n",
|
||||
(unsigned)sender);
|
||||
NSLog(@"alert panel buttonAction: from unknown sender - x%p\n", sender);
|
||||
}
|
||||
[NSApp stopModalWithCode: result];
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ nil. */
|
|||
{
|
||||
/* assign the description of possible occured error to errorMsg */
|
||||
if (errorMsg)
|
||||
*errorMsg = (jerrMgr.error ? jerrMgr.error : nil);
|
||||
*errorMsg = (jerrMgr.error ? (id)jerrMgr.error : (id)nil);
|
||||
gs_jpeg_memory_src_destroy(&cinfo);
|
||||
jpeg_destroy_decompress(&cinfo);
|
||||
if (imgbuffer)
|
||||
|
|
|
@ -1673,7 +1673,7 @@ systemColorWithName(NSString *name)
|
|||
}
|
||||
else
|
||||
{
|
||||
GSNamedColor *aCopy = NSCopyObject(self, 0, aZone);
|
||||
GSNamedColor *aCopy = (GSNamedColor*)NSCopyObject(self, 0, aZone);
|
||||
|
||||
aCopy->_catalog_name = [_catalog_name copyWithZone: aZone];
|
||||
aCopy->_color_name = [_color_name copyWithZone: aZone];
|
||||
|
@ -2893,7 +2893,7 @@ systemColorWithName(NSString *name)
|
|||
}
|
||||
else
|
||||
{
|
||||
GSPatternColor *aCopy = NSCopyObject(self, 0, aZone);
|
||||
GSPatternColor *aCopy = (GSPatternColor*)NSCopyObject(self, 0, aZone);
|
||||
|
||||
aCopy->_pattern = [_pattern copyWithZone: aZone];
|
||||
return aCopy;
|
||||
|
|
|
@ -696,7 +696,7 @@ static GSComboWindow *gsWindow = nil;
|
|||
if (_cell != nil)
|
||||
{
|
||||
NSText *textObject = nil;
|
||||
NSControl *cv = [_cell controlView];
|
||||
id cv = [_cell controlView];
|
||||
|
||||
if ([cv isKindOfClass: [NSControl class]])
|
||||
{
|
||||
|
|
|
@ -341,7 +341,7 @@
|
|||
{
|
||||
id obj;
|
||||
|
||||
linkNumber = [aCoder decodeObjectForKey: @"GSLinkNumber"];
|
||||
linkNumber = [aCoder decodeIntForKey: @"GSLinkNumber"];
|
||||
disposition = [aCoder decodeIntForKey: @"GSDisposition"];
|
||||
updateMode = [aCoder decodeIntForKey: @"GSUpdateMode"];
|
||||
|
||||
|
|
|
@ -510,6 +510,7 @@ static Class eventClass;
|
|||
RELEASE((id)event_data.tracking.user_data);
|
||||
}
|
||||
NSDeallocateObject(self);
|
||||
GSNOSUPERDEALLOC;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -127,6 +127,7 @@ BOOL NSImageForceCaching = NO; /* use on missmatch */
|
|||
TEST_RELEASE(rep);
|
||||
TEST_RELEASE(bg);
|
||||
NSDeallocateObject(self);
|
||||
GSNOSUPERDEALLOC;
|
||||
}
|
||||
@end
|
||||
|
||||
|
@ -1781,7 +1782,7 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
|||
rep = [self _cacheForRep: rep];
|
||||
repd = repd_for_rep(_reps, rep);
|
||||
|
||||
NSDebugLLog(@"NSImage", @"Cached image rep is %d", (int)rep);
|
||||
NSDebugLLog(@"NSImage", @"Cached image rep is %p", rep);
|
||||
/*
|
||||
* if the cache is not valid, it's background color will not exist
|
||||
* and we must draw the background then render from the original
|
||||
|
@ -1811,8 +1812,8 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
|||
{
|
||||
[rep setOpaque: [repd->original isOpaque]];
|
||||
}
|
||||
NSDebugLLog(@"NSImage", @"Rendered rep %d on background %@",
|
||||
(int)rep, repd->bg);
|
||||
NSDebugLLog(@"NSImage", @"Rendered rep %p on background %@",
|
||||
rep, repd->bg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1578,12 +1578,12 @@ dictionary.
|
|||
-(BOOL) layoutManagerOwnsFirstResponderInWindow: (NSWindow *)window
|
||||
{
|
||||
int i;
|
||||
NSView *tv;
|
||||
NSView *v = [window firstResponder];
|
||||
NSResponder *tv;
|
||||
NSResponder *v = [window firstResponder];
|
||||
|
||||
for (i = 0; i < num_textcontainers; i++)
|
||||
{
|
||||
tv = (NSView *)[textcontainers[i].textContainer textView];
|
||||
tv = [textcontainers[i].textContainer textView];
|
||||
if (tv == v)
|
||||
return YES;
|
||||
}
|
||||
|
|
|
@ -476,14 +476,22 @@ static Class imageClass;
|
|||
{
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
NSString *title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
||||
NSString *action = [aDecoder decodeObjectForKey: @"NSAction"];
|
||||
NSString *key = [aDecoder decodeObjectForKey: @"NSKeyEquiv"];
|
||||
NSImage *mixedImage = [aDecoder decodeObjectForKey: @"NSMixedImage"];
|
||||
NSImage *onImage = [aDecoder decodeObjectForKey: @"NSOnImage"];
|
||||
id target = [aDecoder decodeObjectForKey: @"NSTarget"];
|
||||
NSMenu *menu = [aDecoder decodeObjectForKey: @"NSMenu"];
|
||||
NSMenu *submenu = [aDecoder decodeObjectForKey: @"NSSubmenu"];
|
||||
NSString *title;
|
||||
NSString *action;
|
||||
NSString *key;
|
||||
NSImage *mixedImage;
|
||||
NSImage *onImage;
|
||||
id target;
|
||||
NSMenu *submenu;
|
||||
|
||||
title = [aDecoder decodeObjectForKey: @"NSTitle"];
|
||||
action = [aDecoder decodeObjectForKey: @"NSAction"];
|
||||
key = [aDecoder decodeObjectForKey: @"NSKeyEquiv"];
|
||||
mixedImage = [aDecoder decodeObjectForKey: @"NSMixedImage"];
|
||||
onImage = [aDecoder decodeObjectForKey: @"NSOnImage"];
|
||||
target = [aDecoder decodeObjectForKey: @"NSTarget"];
|
||||
[aDecoder decodeObjectForKey: @"NSMenu"];
|
||||
submenu = [aDecoder decodeObjectForKey: @"NSSubmenu"];
|
||||
|
||||
self = [self initWithTitle: title
|
||||
action: NSSelectorFromString(action)
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
<abstract>
|
||||
This class is a subclass of NSTableView which provides the user with a way
|
||||
to display tree structured data in an outline format. It is particularly useful for show
|
||||
hierarchical data such as a class inheritance tree or any other set of relationships.
|
||||
to display tree structured data in an outline format.
|
||||
It is particularly useful for show hierarchical data such as a
|
||||
class inheritance tree or any other set of relationships.
|
||||
</abstract>
|
||||
|
||||
Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
|
@ -263,7 +264,7 @@ static NSImage *unexpandable = nil;
|
|||
NSMutableArray *allChildren = nil;
|
||||
int numchild = 0;
|
||||
int index = 0;
|
||||
id sitem = (item == nil)?[NSNull null]:item;
|
||||
id sitem = (item == nil) ? (id)[NSNull null] : (id)item;
|
||||
|
||||
allChildren = NSMapGet(_itemDict, sitem);
|
||||
numchild = [allChildren count];
|
||||
|
@ -354,7 +355,7 @@ static NSImage *unexpandable = nil;
|
|||
NSMutableArray *allChildren = nil;
|
||||
int numchild = 0;
|
||||
int index = 0;
|
||||
id sitem = (item == nil)?[NSNull null]:item;
|
||||
id sitem = (item == nil) ? (id)[NSNull null] : (id)item;
|
||||
|
||||
allChildren = NSMapGet(_itemDict, sitem);
|
||||
numchild = [allChildren count];
|
||||
|
@ -463,8 +464,8 @@ static NSImage *unexpandable = nil;
|
|||
|
||||
/**
|
||||
* Causes an item and all of it's children to be reloaded if reloadChildren is
|
||||
* set to YES, if it's set to NO, then only the item itself is refreshed from the
|
||||
* datasource.
|
||||
* set to YES, if it's set to NO, then only the item itself is refreshed
|
||||
* from the datasource.
|
||||
*/
|
||||
- (void)reloadItem: (id)item reloadChildren: (BOOL)reloadChildren
|
||||
{
|
||||
|
@ -472,7 +473,7 @@ static NSImage *unexpandable = nil;
|
|||
id parent;
|
||||
BOOL expanded;
|
||||
id dsobj = nil;
|
||||
id object = (item == nil)?([NSNull null]):item;
|
||||
id object = (item == nil) ? (id)[NSNull null] : (id)item;
|
||||
NSArray *allKeys = NSAllMapTableKeys(_itemDict);
|
||||
NSEnumerator *en = [allKeys objectEnumerator];
|
||||
|
||||
|
@ -485,7 +486,7 @@ static NSImage *unexpandable = nil;
|
|||
|
||||
if ((index = [childArray indexOfObject: object]) != NSNotFound)
|
||||
{
|
||||
parent = (parent == [NSNull null])?nil:parent;
|
||||
parent = (parent == [NSNull null]) ? (id)nil : (id)parent;
|
||||
dsobj = [_dataSource outlineView: self
|
||||
child: index
|
||||
ofItem: parent];
|
||||
|
@ -516,8 +517,8 @@ static NSImage *unexpandable = nil;
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the corresponding row in the outline view for the given item. Returns
|
||||
* -1 if item is nil or not found.
|
||||
* Returns the corresponding row in the outline view for the given item.
|
||||
* Returns -1 if item is nil or not found.
|
||||
*/
|
||||
- (int) rowForItem: (id)item
|
||||
{
|
||||
|
@ -761,10 +762,14 @@ static NSImage *unexpandable = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autoResizesOutlineColumn];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_indentationMarkerFollowsCell];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL) at: &_autosaveExpandedItems];
|
||||
[aCoder encodeValueOfObjCType: @encode(float) at: &_indentationPerLevel];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &_autoResizesOutlineColumn];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &_indentationMarkerFollowsCell];
|
||||
[aCoder encodeValueOfObjCType: @encode(BOOL)
|
||||
at: &_autosaveExpandedItems];
|
||||
[aCoder encodeValueOfObjCType: @encode(float)
|
||||
at: &_indentationPerLevel];
|
||||
[aCoder encodeConditionalObject: _outlineTableColumn];
|
||||
}
|
||||
}
|
||||
|
@ -799,10 +804,14 @@ static NSImage *unexpandable = nil;
|
|||
}
|
||||
else
|
||||
{
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_autoResizesOutlineColumn];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_indentationMarkerFollowsCell];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &_autosaveExpandedItems];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float) at: &_indentationPerLevel];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
||||
at: &_autoResizesOutlineColumn];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
||||
at: &_indentationMarkerFollowsCell];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL)
|
||||
at: &_autosaveExpandedItems];
|
||||
[aDecoder decodeValueOfObjCType: @encode(float)
|
||||
at: &_indentationPerLevel];
|
||||
_outlineTableColumn = [aDecoder decodeObject];
|
||||
|
||||
_itemDict = NSCreateMapTable(NSObjectMapKeyCallBacks,
|
||||
|
@ -987,8 +996,10 @@ static NSImage *unexpandable = nil;
|
|||
imageRect.size.width = [image size].width;
|
||||
imageRect.size.height = [image size].height;
|
||||
[imageCell drawWithFrame: imageRect inView: self];
|
||||
drawingRect.origin.x += indentationFactor + [image size].width + 5;
|
||||
drawingRect.size.width -= indentationFactor + [image size].width + 5;
|
||||
drawingRect.origin.x
|
||||
+= indentationFactor + [image size].width + 5;
|
||||
drawingRect.size.width
|
||||
-= indentationFactor + [image size].width + 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1556,7 +1567,8 @@ static NSImage *unexpandable = nil;
|
|||
if ([_delegate respondsToSelector:
|
||||
@selector (outlineView:shouldSelectTableColumn:)] == YES)
|
||||
{
|
||||
if ([_delegate outlineView: self shouldSelectTableColumn: tableColumn] == NO)
|
||||
if ([_delegate outlineView: self shouldSelectTableColumn: tableColumn]
|
||||
== NO)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
@ -1633,14 +1645,12 @@ static NSImage *unexpandable = nil;
|
|||
{
|
||||
int count = [rows count];
|
||||
int i;
|
||||
NSMutableArray *itemArray = [NSMutableArray
|
||||
arrayWithCapacity: count];
|
||||
NSMutableArray *itemArray = [NSMutableArray arrayWithCapacity: count];
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
[itemArray addObject:
|
||||
[self itemAtRow:
|
||||
[[rows objectAtIndex: i] intValue]]];
|
||||
[self itemAtRow: [[rows objectAtIndex: i] intValue]]];
|
||||
}
|
||||
|
||||
if ([_dataSource respondsToSelector:
|
||||
|
@ -1743,7 +1753,7 @@ static NSImage *unexpandable = nil;
|
|||
{
|
||||
int num;
|
||||
int i;
|
||||
id sitem = (startitem == nil)?[NSNull null]:startitem;
|
||||
id sitem = (startitem == nil) ? (id)[NSNull null] : (id)startitem;
|
||||
NSMutableArray *anarray;
|
||||
|
||||
anarray = NSMapGet(_itemDict, sitem);
|
||||
|
@ -1769,7 +1779,7 @@ static NSImage *unexpandable = nil;
|
|||
int num = [_dataSource outlineView: self
|
||||
numberOfChildrenOfItem: startitem];
|
||||
int i = 0;
|
||||
id sitem = (startitem == nil)?[NSNull null]:startitem;
|
||||
id sitem = (startitem == nil) ? (id)[NSNull null] : (id)startitem;
|
||||
NSMutableArray *anarray = nil;
|
||||
|
||||
if (num > 0)
|
||||
|
@ -1822,7 +1832,7 @@ static NSImage *unexpandable = nil;
|
|||
int i = 0;
|
||||
int insertionPoint = 0;
|
||||
id object = nil;
|
||||
id sitem = (item == nil)?[NSNull null]:item;
|
||||
id sitem = (item == nil) ? (id)[NSNull null] : (id)item;
|
||||
|
||||
object = NSMapGet(_itemDict, sitem);
|
||||
numchildren = [object count];
|
||||
|
@ -1872,7 +1882,7 @@ static NSImage *unexpandable = nil;
|
|||
{
|
||||
int numchildren = 0;
|
||||
int i = 0;
|
||||
id sitem = (startitem == nil)?[NSNull null]:startitem;
|
||||
id sitem = (startitem == nil) ? (id)[NSNull null] : (id)startitem;
|
||||
NSMutableArray *anarray;
|
||||
|
||||
anarray = NSMapGet(_itemDict, sitem);
|
||||
|
|
|
@ -529,8 +529,7 @@ enum {
|
|||
{
|
||||
RELEASE(customPapers);
|
||||
RELEASE(measurementString);
|
||||
|
||||
[super release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -536,6 +536,7 @@
|
|||
#include <Foundation/NSInvocation.h>
|
||||
#include <Foundation/NSLock.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
#include <Foundation/NSPortCoder.h>
|
||||
#include <Foundation/NSPortNameServer.h>
|
||||
#include <Foundation/NSProcessInfo.h>
|
||||
#include <Foundation/NSSerialization.h>
|
||||
|
|
|
@ -306,8 +306,7 @@ static NSPrintPanel *shared_instance;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Print panel buttonAction: from unknown sender - x%x\n",
|
||||
(unsigned)sender);
|
||||
NSLog(@"Print panel buttonAction: from unknown sender - x%p\n", sender);
|
||||
}
|
||||
[NSApp stopModalWithCode: _picked];
|
||||
}
|
||||
|
|
|
@ -78,15 +78,13 @@ GSSpellServerName(NSString *vendor, NSString *language)
|
|||
NSArray *userLanguages = [NSUserDefaults userLanguages];
|
||||
NSString *currentLanguage = [userLanguages objectAtIndex: 0];
|
||||
|
||||
[super init];
|
||||
|
||||
if ((self = [super init]) != nil)
|
||||
{
|
||||
_delegate = nil;
|
||||
_ignoredWords = nil;
|
||||
ASSIGN(_userDictionaries, [NSMutableDictionary dictionary]);
|
||||
ASSIGN(_currentLanguage, currentLanguage);
|
||||
|
||||
RETAIN(_userDictionaries);
|
||||
RETAIN(_currentLanguage);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -96,6 +94,7 @@ GSSpellServerName(NSString *vendor, NSString *language)
|
|||
{
|
||||
RELEASE(_userDictionaries);
|
||||
RELEASE(_currentLanguage);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// Checking in Your Service
|
||||
|
|
|
@ -151,13 +151,17 @@ Interface for a bunch of internal methods that need to be cleaned up.
|
|||
{
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
ASSIGN(backgroundColor, [aDecoder decodeObjectForKey: @"NSBackgroundColor"]);
|
||||
ASSIGN(paragraphStyle, [aDecoder decodeObjectForKey: @"NSDefaultParagraphStyle"]);
|
||||
ASSIGN(backgroundColor,
|
||||
[aDecoder decodeObjectForKey: @"NSBackgroundColor"]);
|
||||
ASSIGN(paragraphStyle,
|
||||
[aDecoder decodeObjectForKey: @"NSDefaultParagraphStyle"]);
|
||||
flags = [aDecoder decodeIntForKey: @"NSFlags"];
|
||||
ASSIGN(insertionColor, [aDecoder decodeObjectForKey: @"NSInsertionColor"]);
|
||||
ASSIGN(insertionColor,
|
||||
[aDecoder decodeObjectForKey: @"NSInsertionColor"]);
|
||||
ASSIGN(linkAttr, [aDecoder decodeObjectForKey: @"NSLinkAttributes"]);
|
||||
ASSIGN(markAttr, [aDecoder decodeObjectForKey: @"NSMarkedAttributes"]);
|
||||
ASSIGN(selectedAttr, [aDecoder decodeObjectForKey: @"NSSelectedAttributes"]);
|
||||
ASSIGN(selectedAttr,
|
||||
[aDecoder decodeObjectForKey: @"NSSelectedAttributes"]);
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -718,9 +722,10 @@ that makes decoding and encoding compatible with the old code.
|
|||
|
||||
if ([aDecoder containsValueForKey: @"NSSharedData"])
|
||||
{
|
||||
NSTextViewSharedData *shared = [aDecoder decodeObjectForKey: @"NSSharedData"];
|
||||
NSTextViewSharedData *shared;
|
||||
unsigned int flags = [shared flags];
|
||||
|
||||
shared = [aDecoder decodeObjectForKey: @"NSSharedData"];
|
||||
ASSIGN(_insertionPointColor, [shared insertionColor]);
|
||||
ASSIGN(_backgroundColor, [shared backgroundColor]);
|
||||
|
||||
|
@ -763,8 +768,7 @@ that makes decoding and encoding compatible with the old code.
|
|||
|
||||
if ([aDecoder containsValueForKey: @"NSTVFlags"])
|
||||
{
|
||||
//int vFlags = [aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||
// these flags are not used...
|
||||
[aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||
}
|
||||
|
||||
// register for services and subscribe to notifications.
|
||||
|
@ -911,7 +915,6 @@ that makes decoding and encoding compatible with the old code.
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
/**** Managing the text network ****/
|
||||
|
||||
/* This should only be called by [NSTextContainer -setTextView:]. If the
|
||||
|
@ -1755,7 +1758,7 @@ or add guards
|
|||
return NSMakeRange(NSNotFound, 0);
|
||||
}
|
||||
|
||||
-(void) setMarkedText: (NSString *)aString selectedRange: (NSRange)selRange
|
||||
- (void) setMarkedText: (id)aString selectedRange: (NSRange)selRange
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -536,7 +536,7 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
|
|||
NSAttributedString *attrString;
|
||||
NSDictionary *attr;
|
||||
NSColor *color;
|
||||
NSMutableParagraphStyle *pStyle = [NSMutableParagraphStyle defaultParagraphStyle];
|
||||
NSMutableParagraphStyle *pStyle;
|
||||
NSRect titleRect;
|
||||
NSRect viewBounds = [self bounds];
|
||||
|
||||
|
@ -549,12 +549,15 @@ NSString *GSMovableToolbarItemPboardType = @"GSMovableToolbarItemPboardType";
|
|||
color = [NSColor disabledControlTextColor];
|
||||
}
|
||||
|
||||
pStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
|
||||
[pStyle setAlignment: NSCenterTextAlignment];
|
||||
|
||||
// We draw the label
|
||||
attr = [NSDictionary dictionaryWithObjectsAndKeys: _font,
|
||||
NSFontAttributeName, color, NSForegroundColorAttributeName, pStyle,
|
||||
NSParagraphStyleAttributeName, nil];
|
||||
RELEASE(pStyle);
|
||||
|
||||
attrString = [[NSAttributedString alloc]
|
||||
initWithString: [_toolbarItem label] attributes: attr];
|
||||
|
||||
|
|
|
@ -1236,9 +1236,11 @@ many times.
|
|||
ASSIGN(_miniaturizedImage, image);
|
||||
if (_counterpart != 0 && (_styleMask & NSMiniWindowMask) == 0)
|
||||
{
|
||||
NSMiniWindow *mini = [NSApp windowWithWindowNumber: _counterpart];
|
||||
id v = [mini contentView];
|
||||
NSMiniWindow *mini;
|
||||
id v;
|
||||
|
||||
mini = (NSMiniWindow*)[NSApp windowWithWindowNumber: _counterpart];
|
||||
v = [mini contentView];
|
||||
if ([v respondsToSelector: @selector(setImage:)])
|
||||
{
|
||||
[v setImage: [self miniwindowImage]];
|
||||
|
@ -1251,9 +1253,11 @@ many times.
|
|||
ASSIGN(_miniaturizedTitle, title);
|
||||
if (_counterpart != 0 && (_styleMask & NSMiniWindowMask) == 0)
|
||||
{
|
||||
NSMiniWindow *mini = [NSApp windowWithWindowNumber: _counterpart];
|
||||
id v = [mini contentView];
|
||||
NSMiniWindow *mini;
|
||||
id v;
|
||||
|
||||
mini = (NSMiniWindow*)[NSApp windowWithWindowNumber: _counterpart];
|
||||
v = [mini contentView];
|
||||
if ([v respondsToSelector: @selector(setTitle:)])
|
||||
{
|
||||
[v setTitle: [self miniwindowTitle]];
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
|
||||
if ([self isWindowLoaded])
|
||||
{
|
||||
[[self window] setFrameAutosaveName: name ? name : @""];
|
||||
[[self window] setFrameAutosaveName: name ? (id)name : (id)@""];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -607,6 +607,7 @@ static NSString *_rootPath = @"/";
|
|||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Attempt to call dealloc for shared worksapace"];
|
||||
GSNOSUPERDEALLOC;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
|
@ -1938,7 +1939,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
|
|||
}
|
||||
else
|
||||
{
|
||||
[inf setObject: appName forKey: (role ? role : @"Editor")];
|
||||
[inf setObject: appName forKey: (role ? (id)role : (id)@"Editor")];
|
||||
}
|
||||
[map setObject: inf forKey: ext];
|
||||
RELEASE(inf);
|
||||
|
|
|
@ -99,12 +99,12 @@ findMisspelledWordInString:(NSString *)stringToCheck
|
|||
inLanguage:(NSString *)language
|
||||
{
|
||||
NSMutableArray *array = [NSMutableArray array];
|
||||
const char *p = [word UTF8String];
|
||||
int len = strlen(p);
|
||||
int words = 0;
|
||||
|
||||
#ifdef HAVE_ASPELL_H
|
||||
{
|
||||
const char *p = [word UTF8String];
|
||||
int len = strlen(p);
|
||||
int words = 0;
|
||||
const struct AspellWordList *list = aspell_speller_suggest(speller, p, len);
|
||||
AspellStringEnumeration *en;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue