Different patches by Andreas Höschler <ahoesch@smartsoft.de>.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24846 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2007-03-11 17:07:44 +00:00
parent df2318e0d9
commit b7cb6503ee
6 changed files with 34 additions and 23 deletions

View file

@ -1,3 +1,17 @@
2007-03-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (-abortModal): Call stopModalWithCode: to
make this mehtod work when not inside the modal loop.
* Source/GSToolbarView.m (-_takeInAccountFlexibleSpaces): Don't
call methods that return astructures on nil as this fails on Solaris.
* Source/NSTableColumn.m (-setWidth:): Add self tothe
notifiaction.
* Source/NSComboBoxCell.m (-_selectCompleted): Don't change
selection if no match is found.
* Source/NSMenuItemCell.m (-drawImageWithFrame:inView:): Use
[drawImage:withFrame:inView:] to do the drawing.
Patches by Andreas Höschler <ahoesch@smartsoft.de>.
2007-03-09 Nicola Pero <nicola.pero@meta-innovation.com>
Updated gnustep-gui to use versioned library resources.
@ -271,7 +285,7 @@
2007-02-16 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSMenuItSemCell.m: fixup glitch with drawing of horizontal
* Source/NSMenuItemCell.m: fixup glitch with drawing of horizontal
menu items overwriting menu border.
* Source/NSMenuView.m: use menubar font size to calculate menubar
height.

View file

@ -843,13 +843,18 @@ static void initSystemExtensionsColors(void)
NSEnumerator *e = [items objectEnumerator];
NSToolbarItem *item;
NSView *backView;
NSRect lastBackViewFrame = [[[items lastObject] _backView] frame];
float lengthAvailable = [self frame].size.width -
NSMaxX(lastBackViewFrame);
NSRect lastBackViewFrame;
float lengthAvailable;
unsigned int flexibleSpaceItemsNumber = 0;
BOOL mustAdjustNext = NO;
float x = 0;
if ([items count] == 0)
return;
lastBackViewFrame = [[[items lastObject] _backView] frame];
lengthAvailable = [self frame].size.width - NSMaxX(lastBackViewFrame);
if (lengthAvailable < 1)
return;

View file

@ -1415,12 +1415,20 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
*/
- (void) abortModal
{
/* FIXME: The previous, now commented out, code here did only work from within the modal loop,
which is contrary to the purpose of this method. Calling stopModalWithCode: works a bit better,
but still relies on the modal loop to cooperate. Calling that method via performSelectorOnMainThread:...
and moving the exception into stopModalWithCode:, looks like another option. Still this would
rely on the loop getting executed.
if (_session == 0)
{
[NSException raise: NSAbortModalException
format: @"abortModal called while not in a modal session"];
}
[NSException raise: NSAbortModalException format: @"abortModal"];
*/
[self stopModalWithCode: NSRunAbortedResponse];
}
/**

View file

@ -1985,10 +1985,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
{
[self _setSelectedItem: index];
}
else
{
[self _setSelectedItem: -1];
}
// Otherwise keep old selection
}
@end

View file

@ -616,22 +616,8 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
- (void) drawImageWithFrame: (NSRect)cellFrame
inView: (NSView *)controlView
{
NSSize size;
NSPoint position;
cellFrame = [self imageRectForBounds: cellFrame];
// FIXME: We could call drawImage:withFrame:inView: here, if we knew that the code there is correct.
size = [_imageToDisplay size];
position.x = MAX(NSMidX(cellFrame) - (size.width/2.), 0.);
position.y = MAX(NSMidY(cellFrame) - (size.height/2.), 0.);
/*
* Images are always drawn with their bottom-left corner at the origin
* so we must adjust the position to take account of a flipped view.
*/
if ([controlView isFlipped])
position.y += size.height;
[_imageToDisplay compositeToPoint: position operation: NSCompositeSourceOver];
[self drawImage: _imageToDisplay withFrame: cellFrame inView: controlView];
}
- (void) drawKeyEquivalentWithFrame:(NSRect)cellFrame

View file

@ -200,6 +200,7 @@
postNotificationName: NSTableViewColumnDidResizeNotification
object: _tableView
userInfo: [NSDictionary dictionaryWithObjectsAndKeys:
self, @"NSTableColumn",
[NSNumber numberWithFloat: oldWidth],
@"NSOldWidth", nil]];
}