Small patches and a missing CVS entry.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22346 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2006-01-22 21:23:44 +00:00
parent 5eb9fa6546
commit d5e163b00e
3 changed files with 52 additions and 14 deletions

View file

@ -531,12 +531,19 @@ static NSImage *_pbc_image[2];
{
index = [[_menu menuRepresentation] highlightedItemIndex];
if (index < 0)
index = [self indexOfSelectedItem];
if (index < 0)
index = 0;
[self selectItemAtIndex: index];
if (index < 0)
{
// If no item is highighted, display the selected one ...
index = [self indexOfSelectedItem];
// ... if there is nown, then the first one, but don't select it.
if (index < 0)
index = 0;
}
else
{
// Selected the highlighted item
[self selectItemAtIndex: index];
}
}
if ((index >= 0) && ([_menu numberOfItems] > index))