Fixed Nspopupbutton problem.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4627 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
michael 1999-07-20 09:51:55 +00:00
parent aad0a24a11
commit 3d22b9b098
2 changed files with 41 additions and 38 deletions

View file

@ -1,3 +1,11 @@
1999-07-20 Michael Hanni <mhanni@sprintmail.com>
* Source/NSMenuView.m: trackEvent: fixed problems that existed for
NSPopUpButton. Should now work as desired. However, I believe I
need to once again rewrite NSPopUp to make proper use of
setMenu:, that will make the code sharing between NSMenu and
NSPopUp complete.
1999-07-19 Michael Hanni <mhanni@sprintmail.com>
* Source/NSTableView.m: very incomplete implementation.

View file

@ -626,14 +626,14 @@ static float GSMenuBarHeight = 25.0; // a guess.
[self setHighlightedItemIndex: -1];
NSLog(@"just mouseUp'ed.");
if ([selectedCell action] && ![selectedCell target])
[menuv_menu performActionForItem:
[menuv_items_link objectAtIndex: lastIndex]];
else
else if ([selectedCell action] && [selectedCell target])
[menuv_popb performSelector:[selectedCell action] withObject:selectedCell];
if (menuv_menu)
{
while (!finished)
{ // "forward"cursive menu find.
if ([aMenu attachedMenu])
@ -651,7 +651,6 @@ static float GSMenuBarHeight = 25.0; // a guess.
if ([aMenu supermenu] && ![aMenu isTornOff])
{
[[[aMenu supermenu] menuView] setHighlightedItemIndex: -1];
// [aMenu close];
aMenu = [aMenu supermenu];
}
else
@ -660,16 +659,12 @@ static float GSMenuBarHeight = 25.0; // a guess.
[window flushWindow];
}
}
else if ([[menuv_items_link objectAtIndex:
menuv_highlightedItemIndex]
hasSubmenu] && [[[menuv_items_link objectAtIndex:
menuv_highlightedItemIndex] target] isTornOff])
if (menuv_popb)
{
// This code does not work. Please ignore. FIXME, Michael.
// close transient.
// [self setHighlightedItemIndex: -1];
//
// [[[menuv_menu supermenu] menuView] setHighlightedItemIndex: -1];
[menuv_popb close];
}
}
}
else if (weRightMenu)