Some unrelated bug fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18672 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2004-02-25 23:27:46 +00:00
parent 3f2c127a97
commit 0df92e1637
5 changed files with 24 additions and 6 deletions

View file

@ -1,3 +1,14 @@
2004-02-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m: (-beginSheet:...contextInfo:)
Corrected signature of didEnd function.
* Source/NSMenu.m: (-update)
Tried to handle case for autoenabling correctly where a popup
button doesn't have an action.
* Source/NSBezierPath.m: (-contributionToContains:)
* Source/NSStringDrawing.m: (cache_match())
Replaced random() with rand() to increase portability.
2004-02-24 Quentin Mathé <qmathe@club-internet.fr>
committed by Gregory John Casamento <greg_casamento@yahoo.com>

View file

@ -1446,11 +1446,11 @@ See -runModalForWindow:
if ([modalDelegate respondsToSelector: didEndSelector])
{
void (*didEnd)(id, SEL, int, void*);
void (*didEnd)(id, SEL, id, int, void*);
didEnd = (void (*)(id, SEL, int, void*))[modalDelegate methodForSelector:
didEnd = (void (*)(id, SEL, id, int, void*))[modalDelegate methodForSelector:
didEndSelector];
didEnd(modalDelegate, didEndSelector, ret, contextInfo);
didEnd(modalDelegate, didEndSelector, sheet, ret, contextInfo);
}
}

View file

@ -1211,7 +1211,7 @@ int contribution(NSPoint point, float dir, NSPoint start, NSPoint end, BOOL *hit
NSPoint first_p, last_p;
int count = [self elementCount];
BOOL first = YES;
float dir = 2 * PI * random() / RAND_MAX;
float dir = 2 * PI * rand() / RAND_MAX;
BOOL hit;
for(i = 0; i < count; i++)

View file

@ -783,7 +783,14 @@ static NSNotificationCenter *nc;
if (validator == nil)
{
shouldBeEnabled = NO;
if ((action == NULL) && (_popUpButtonCell != nil))
{
shouldBeEnabled = YES;
}
else
{
shouldBeEnabled = NO;
}
}
else if ([validator
respondsToSelector: @selector(validateMenuItem:)])

View file

@ -171,7 +171,7 @@ static int cache_match(int hasSize, NSSize size, int useScreenFonts, int *matche
By starting at a random index, we avoid this kind of problem.
*/
j = random() % NUM_CACHE_ENTRIES;
j = rand() % NUM_CACHE_ENTRIES;
for (i = 0; i < NUM_CACHE_ENTRIES; i++, j++)
{
if (j == NUM_CACHE_ENTRIES)