mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 22:10:58 +00:00
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:
parent
a0add9e9bd
commit
294089db95
6 changed files with 34 additions and 23 deletions
16
ChangeLog
16
ChangeLog
|
@ -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>
|
2007-03-09 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||||
|
|
||||||
Updated gnustep-gui to use versioned library resources.
|
Updated gnustep-gui to use versioned library resources.
|
||||||
|
@ -271,7 +285,7 @@
|
||||||
|
|
||||||
2007-02-16 Richard Frith-Macdonald <rfm@gnu.org>
|
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.
|
menu items overwriting menu border.
|
||||||
* Source/NSMenuView.m: use menubar font size to calculate menubar
|
* Source/NSMenuView.m: use menubar font size to calculate menubar
|
||||||
height.
|
height.
|
||||||
|
|
|
@ -843,13 +843,18 @@ static void initSystemExtensionsColors(void)
|
||||||
NSEnumerator *e = [items objectEnumerator];
|
NSEnumerator *e = [items objectEnumerator];
|
||||||
NSToolbarItem *item;
|
NSToolbarItem *item;
|
||||||
NSView *backView;
|
NSView *backView;
|
||||||
NSRect lastBackViewFrame = [[[items lastObject] _backView] frame];
|
NSRect lastBackViewFrame;
|
||||||
float lengthAvailable = [self frame].size.width -
|
float lengthAvailable;
|
||||||
NSMaxX(lastBackViewFrame);
|
|
||||||
unsigned int flexibleSpaceItemsNumber = 0;
|
unsigned int flexibleSpaceItemsNumber = 0;
|
||||||
BOOL mustAdjustNext = NO;
|
BOOL mustAdjustNext = NO;
|
||||||
float x = 0;
|
float x = 0;
|
||||||
|
|
||||||
|
if ([items count] == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
lastBackViewFrame = [[[items lastObject] _backView] frame];
|
||||||
|
lengthAvailable = [self frame].size.width - NSMaxX(lastBackViewFrame);
|
||||||
|
|
||||||
if (lengthAvailable < 1)
|
if (lengthAvailable < 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1415,12 +1415,20 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
*/
|
*/
|
||||||
- (void) abortModal
|
- (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)
|
if (_session == 0)
|
||||||
{
|
{
|
||||||
[NSException raise: NSAbortModalException
|
[NSException raise: NSAbortModalException
|
||||||
format: @"abortModal called while not in a modal session"];
|
format: @"abortModal called while not in a modal session"];
|
||||||
}
|
}
|
||||||
[NSException raise: NSAbortModalException format: @"abortModal"];
|
[NSException raise: NSAbortModalException format: @"abortModal"];
|
||||||
|
*/
|
||||||
|
[self stopModalWithCode: NSRunAbortedResponse];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1985,10 +1985,7 @@ static inline NSRect buttonCellFrameFromRect(NSRect cellRect)
|
||||||
{
|
{
|
||||||
[self _setSelectedItem: index];
|
[self _setSelectedItem: index];
|
||||||
}
|
}
|
||||||
else
|
// Otherwise keep old selection
|
||||||
{
|
|
||||||
[self _setSelectedItem: -1];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -616,22 +616,8 @@ static NSImage *arrowImage = nil; /* Cache arrow image. */
|
||||||
- (void) drawImageWithFrame: (NSRect)cellFrame
|
- (void) drawImageWithFrame: (NSRect)cellFrame
|
||||||
inView: (NSView *)controlView
|
inView: (NSView *)controlView
|
||||||
{
|
{
|
||||||
NSSize size;
|
|
||||||
NSPoint position;
|
|
||||||
|
|
||||||
cellFrame = [self imageRectForBounds: cellFrame];
|
cellFrame = [self imageRectForBounds: cellFrame];
|
||||||
// FIXME: We could call drawImage:withFrame:inView: here, if we knew that the code there is correct.
|
[self drawImage: _imageToDisplay withFrame: cellFrame inView: controlView];
|
||||||
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];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) drawKeyEquivalentWithFrame:(NSRect)cellFrame
|
- (void) drawKeyEquivalentWithFrame:(NSRect)cellFrame
|
||||||
|
|
|
@ -200,6 +200,7 @@
|
||||||
postNotificationName: NSTableViewColumnDidResizeNotification
|
postNotificationName: NSTableViewColumnDidResizeNotification
|
||||||
object: _tableView
|
object: _tableView
|
||||||
userInfo: [NSDictionary dictionaryWithObjectsAndKeys:
|
userInfo: [NSDictionary dictionaryWithObjectsAndKeys:
|
||||||
|
self, @"NSTableColumn",
|
||||||
[NSNumber numberWithFloat: oldWidth],
|
[NSNumber numberWithFloat: oldWidth],
|
||||||
@"NSOldWidth", nil]];
|
@"NSOldWidth", nil]];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue