Tidied some stuff up for IB

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5373 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-12-03 14:51:56 +00:00
parent 9ebe5e5592
commit 2b1663a41e
4 changed files with 33 additions and 5 deletions

View file

@ -1,8 +1,10 @@
Fri Dec 3 14:38:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk> Fri Dec 3 14:53:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSOpenPanel.m ([-browser:selectCellWithString:inColumn:]) * Source/NSOpenPanel.m: ([-browser:selectCellWithString:inColumn:])
fixed to set the _fullFileName ivar so that the panel can return fixed to set the _fullFileName ivar so that the panel can return
the selected filename. the selected filename.
* Source/NSWindow.m: Encode/decode top-left point of window for
positioning.
Fri Dec 3 11:34:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk> Fri Dec 3 11:34:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>

View file

@ -89,6 +89,18 @@
- (void) replaceObject: (id)anObject withObject: (id)anotherObject - (void) replaceObject: (id)anObject withObject: (id)anotherObject
{ {
if (_src == anObject)
{
ASSIGN(_src, anotherObject);
}
if (_dst == anObject)
{
ASSIGN(_dst, anotherObject);
}
if (_tag == anObject)
{
ASSIGN(_tag, anotherObject);
}
} }
- (id) source - (id) source
@ -241,7 +253,6 @@
val = [nameTable objectForKey: [connection destination]]; val = [nameTable objectForKey: [connection destination]];
[connection setDestination: val]; [connection setDestination: val];
[connection establishConnection]; [connection establishConnection];
[connection establishConnection];
} }
/* /*

View file

@ -765,9 +765,11 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
- (void) sizeToFit - (void) sizeToFit
{ {
NSRect windowFrame;
NSRect menuFrame; NSRect menuFrame;
NSSize size; NSSize size;
windowFrame = [aWindow frame];
[menu_view sizeToFit]; [menu_view sizeToFit];
menuFrame = [menu_view frame]; menuFrame = [menu_view frame];
@ -779,13 +781,20 @@ static NSString* NSMenuLocationsKey = @"NSMenuLocations";
{ {
size.height += 23; size.height += 23;
[aWindow setContentSize: size]; [aWindow setContentSize: size];
[aWindow setFrameTopLeftPoint:
NSMakePoint(NSMinX(windowFrame),NSMaxY(windowFrame))];
windowFrame = [bWindow frame];
[bWindow setContentSize: size]; [bWindow setContentSize: size];
[bWindow setFrameTopLeftPoint:
NSMakePoint(NSMinX(windowFrame),NSMaxY(windowFrame))];
[menu_view setFrameOrigin: NSMakePoint(0, 0)]; [menu_view setFrameOrigin: NSMakePoint(0, 0)];
[titleView setFrame: NSMakeRect(0,size.height-23,size.width,23)]; [titleView setFrame: NSMakeRect(0,size.height-23,size.width,23)];
} }
else else
{ {
[aWindow setContentSize: size]; [aWindow setContentSize: size];
[aWindow setFrameTopLeftPoint:
NSMakePoint(NSMinX(windowFrame),NSMaxY(windowFrame))];
} }
[aWindow display]; [aWindow display];

View file

@ -2773,6 +2773,7 @@ resetCursorRectsForView(NSView *theView)
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
BOOL flag; BOOL flag;
NSPoint p;
id nxt = RETAIN([self nextResponder]); id nxt = RETAIN([self nextResponder]);
[self setNextResponder: nil]; [self setNextResponder: nil];
@ -2780,10 +2781,12 @@ resetCursorRectsForView(NSView *theView)
[super encodeWithCoder: aCoder]; [super encodeWithCoder: aCoder];
NSDebugLog(@"NSWindow: start encoding\n"); NSDebugLog(@"NSWindow: start encoding\n");
[aCoder encodeRect: [[self contentView] frame]]; [aCoder encodeRect: [[self contentView] frame]];
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &style_mask]; [aCoder encodeValueOfObjCType: @encode(unsigned) at: &style_mask];
[aCoder encodeValueOfObjCType: @encode(NSBackingStoreType) at: &backing_type]; [aCoder encodeValueOfObjCType: @encode(NSBackingStoreType) at: &backing_type];
[aCoder encodePoint: NSMakePoint(NSMinX([self frame]), NSMaxY([self frame]))];
[aCoder encodeObject: content_view]; [aCoder encodeObject: content_view];
[aCoder encodeObject: background_color]; [aCoder encodeObject: background_color];
[aCoder encodeObject: represented_filename]; [aCoder encodeObject: represented_filename];
@ -2839,6 +2842,7 @@ resetCursorRectsForView(NSView *theView)
{ {
NSSize aSize; NSSize aSize;
NSRect aRect; NSRect aRect;
NSPoint p;
unsigned aStyle; unsigned aStyle;
NSBackingStoreType aBacking; NSBackingStoreType aBacking;
int anInt; int anInt;
@ -2857,6 +2861,7 @@ resetCursorRectsForView(NSView *theView)
defer: NO defer: NO
screen: nil]; screen: nil];
p = [aDecoder decodePoint];
obj = [aDecoder decodeObject]; obj = [aDecoder decodeObject];
[self setContentView: obj]; [self setContentView: obj];
obj = [aDecoder decodeObject]; obj = [aDecoder decodeObject];
@ -2915,6 +2920,7 @@ resetCursorRectsForView(NSView *theView)
[aDecoder decodeValueOfObjCType: @encode(id) [aDecoder decodeValueOfObjCType: @encode(id)
at: &_initial_first_responder]; at: &_initial_first_responder];
[self setFrameTopLeftPoint: p];
NSDebugLog(@"NSWindow: finish decoding\n"); NSDebugLog(@"NSWindow: finish decoding\n");
} }