mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 03:11:18 +00:00
Removed gcc 4.02 compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21846 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b6da6cd684
commit
0a310d0b60
10 changed files with 54 additions and 30 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
|||
2005-10-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Header/NSInputManager.h
|
||||
* Source/GSTitleView.m
|
||||
* Source/NSColor.m
|
||||
* Source/NSImageCell.m
|
||||
* Source/NSResponder.m
|
||||
* Source/NSSavePanel.m
|
||||
* Source/NSTabView.m
|
||||
* Source/NSTableHeaderView.m
|
||||
* Source/NSMenuView.m
|
||||
Removed compiler warnings from gcc 4.0.2.
|
||||
|
||||
2005-10-18 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSApplication.m (-terminate:): Call NSDocumentControllers
|
||||
|
|
|
@ -133,8 +133,8 @@
|
|||
}
|
||||
+ (NSInputManager *) currentInputManager;
|
||||
|
||||
- (id) initWithName: (NSString *)inputServerName
|
||||
host: (NSString *)hostName;
|
||||
- (NSInputManager *) initWithName: (NSString *)inputServerName
|
||||
host: (NSString *)hostName;
|
||||
|
||||
- (BOOL) handleMouseEvent: (NSEvent *)theMouseEvent;
|
||||
- (void) handleKeyboardEvents: (NSArray *)eventArray
|
||||
|
|
|
@ -351,7 +351,7 @@
|
|||
}
|
||||
|
||||
// We do not need app menu over menu
|
||||
- (void) rightMouseDown: (NSEvent*)theEvent
|
||||
- (NSMenu *) rightMouseDown: (NSEvent*)theEvent
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1090,8 +1090,9 @@ systemColorWithName(NSString *name)
|
|||
if ([aDecoder containsValueForKey: @"NSRGB"])
|
||||
{
|
||||
data = [aDecoder decodeBytesForKey: @"NSRGB"
|
||||
returnedLength: &length];
|
||||
str = [[NSString alloc] initWithCString: data length: length];
|
||||
returnedLength: &length];
|
||||
str = [[NSString alloc] initWithCString: (const char*)data
|
||||
length: length];
|
||||
scanner = [[NSScanner alloc] initWithString: str];
|
||||
[scanner scanFloat: &red];
|
||||
[scanner scanFloat: &green];
|
||||
|
@ -1127,8 +1128,9 @@ systemColorWithName(NSString *name)
|
|||
if ([aDecoder containsValueForKey: @"NSWhite"])
|
||||
{
|
||||
data = [aDecoder decodeBytesForKey: @"NSWhite"
|
||||
returnedLength: &length];
|
||||
str = [[NSString alloc] initWithCString: data length: length];
|
||||
returnedLength: &length];
|
||||
str = [[NSString alloc] initWithCString: (const char*)data
|
||||
length: length];
|
||||
scanner = [[NSScanner alloc] initWithString: str];
|
||||
[scanner scanFloat: &white];
|
||||
RELEASE(scanner);
|
||||
|
@ -1161,8 +1163,9 @@ systemColorWithName(NSString *name)
|
|||
if ([aDecoder containsValueForKey: @"NSCYMK"])
|
||||
{
|
||||
data = [aDecoder decodeBytesForKey: @"NSCYMK"
|
||||
returnedLength: &length];
|
||||
str = [[NSString alloc] initWithCString: data length: length];
|
||||
returnedLength: &length];
|
||||
str = [[NSString alloc] initWithCString: (const char*)data
|
||||
length: length];
|
||||
scanner = [[NSScanner alloc] initWithString: str];
|
||||
[scanner scanFloat: &cyan];
|
||||
[scanner scanFloat: &yellow];
|
||||
|
@ -1829,7 +1832,9 @@ systemColorWithName(NSString *name)
|
|||
}
|
||||
// FIXME: Missing handling of alpha value
|
||||
str = [[NSString alloc] initWithFormat: @"%f", _white_component];
|
||||
[aCoder encodeBytes: [str cString] length: [str cStringLength] forKey: @"NSWhite"];
|
||||
[aCoder encodeBytes: (const uint8_t*)[str cString]
|
||||
length: [str cStringLength]
|
||||
forKey: @"NSWhite"];
|
||||
RELEASE(str);
|
||||
}
|
||||
else
|
||||
|
@ -2127,7 +2132,9 @@ systemColorWithName(NSString *name)
|
|||
[aCoder encodeInt: 5 forKey: @"NSColorSpace"];
|
||||
str = [[NSString alloc] initWithFormat: @"%f %f %f %f", _cyan_component,
|
||||
_magenta_component, _yellow_component, _black_component];
|
||||
[aCoder encodeBytes: [str cString] length: [str cStringLength] forKey: @"NSCYMK"];
|
||||
[aCoder encodeBytes: (const uint8_t*)[str cString]
|
||||
length: [str cStringLength]
|
||||
forKey: @"NSCYMK"];
|
||||
RELEASE(str);
|
||||
}
|
||||
else
|
||||
|
@ -2385,7 +2392,9 @@ systemColorWithName(NSString *name)
|
|||
// FIXME: Missing handling of alpha value
|
||||
str = [[NSString alloc] initWithFormat: @"%f %f %f", _red_component,
|
||||
_green_component, _blue_component];
|
||||
[aCoder encodeBytes: [str cString] length: [str cStringLength] forKey: @"NSRGB"];
|
||||
[aCoder encodeBytes: (const uint8_t*)[str cString]
|
||||
length: [str cStringLength]
|
||||
forKey: @"NSRGB"];
|
||||
RELEASE(str);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -314,6 +314,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
switch (_frameStyle)
|
||||
{
|
||||
case NSImageFrameNone:
|
||||
default:
|
||||
borderSize = NSZeroSize;
|
||||
break;
|
||||
case NSImageFramePhoto:
|
||||
|
@ -344,18 +345,19 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
|||
// Get border size
|
||||
switch (_frameStyle)
|
||||
{
|
||||
case NSImageFrameNone:
|
||||
borderSize = NSZeroSize;
|
||||
break;
|
||||
case NSImageFramePhoto:
|
||||
// what does this one look like? TODO (in sync with the rest of the code)
|
||||
borderSize = _sizeForBorderType (NSNoBorder);
|
||||
break;
|
||||
case NSImageFrameGrayBezel:
|
||||
case NSImageFrameGroove:
|
||||
case NSImageFrameButton:
|
||||
borderSize = _sizeForBorderType (NSBezelBorder);
|
||||
break;
|
||||
case NSImageFrameNone:
|
||||
default:
|
||||
borderSize = NSZeroSize;
|
||||
break;
|
||||
case NSImageFramePhoto:
|
||||
// what does this one look like? TODO (in sync with the rest of the code)
|
||||
borderSize = _sizeForBorderType (NSNoBorder);
|
||||
break;
|
||||
case NSImageFrameGrayBezel:
|
||||
case NSImageFrameGroove:
|
||||
case NSImageFrameButton:
|
||||
borderSize = _sizeForBorderType (NSBezelBorder);
|
||||
break;
|
||||
}
|
||||
|
||||
return NSInsetRect (theRect, borderSize.width, borderSize.height);
|
||||
|
|
|
@ -91,8 +91,8 @@ _addLeftBorderOffsetToRect(NSRect aRect)
|
|||
return YES;
|
||||
}
|
||||
|
||||
// We do not want to popup menus in this menu.
|
||||
- (id) menuForEvent: (NSEvent*) theEvent
|
||||
// We do not want to popup menus in this menu view.
|
||||
- (NSMenu *) menuForEvent: (NSEvent*) theEvent
|
||||
{
|
||||
NSDebugLLog (@"NSMenu", @"Query for menu in view");
|
||||
return nil;
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
/*
|
||||
* Managing the next responder
|
||||
*/
|
||||
- (id) nextResponder
|
||||
- (NSResponder*) nextResponder
|
||||
{
|
||||
return _next_responder;
|
||||
}
|
||||
|
|
|
@ -632,7 +632,7 @@ selectCellWithString: (NSString*)title
|
|||
}
|
||||
|
||||
/** Returns the shared NSSavePanel instance */
|
||||
+ (id) savePanel
|
||||
+ (NSSavePanel *) savePanel
|
||||
{
|
||||
if (_gs_gui_save_panel == nil)
|
||||
{
|
||||
|
|
|
@ -357,7 +357,7 @@
|
|||
NSGraphicsContext *ctxt = GSCurrentContext();
|
||||
int howMany = [_items count];
|
||||
int i;
|
||||
NSRect previousRect;
|
||||
NSRect previousRect = NSMakeRect(0, 0, 0, 0);
|
||||
int previousState = 0;
|
||||
NSRect aRect = _bounds;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*/
|
||||
|
||||
// TODO: Remove this method, if not really needed
|
||||
- (NSTableHeaderView*)initWithFrame:(NSRect)frameRect
|
||||
- (id)initWithFrame:(NSRect)frameRect
|
||||
{
|
||||
self = [super initWithFrame: frameRect];
|
||||
_tableView = nil;
|
||||
|
|
Loading…
Reference in a new issue