mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Fixed popup button bug.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4679 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
97f15c9e67
commit
2edde21185
2 changed files with 12 additions and 9 deletions
|
@ -4,7 +4,8 @@
|
|||
code. New initialiser - initWithPopUpButton:. New ivar
|
||||
menu_isBeholdenToPopUpButton.
|
||||
* Source/NSMenuView.m: ditto. removed code that dealt with
|
||||
popupbutton.
|
||||
popupbutton. Also fixed bug which disallowed selecting an item if
|
||||
you dragged of a popup and dragged back up.
|
||||
* Source/NSPopUpButton.m: complete rewrite. now this class should
|
||||
be almost completly MacOSX compliant. For kicks try
|
||||
popupbuttons.app in core/Testing to see.
|
||||
|
|
|
@ -572,6 +572,7 @@ static float GSMenuBarHeight = 25.0; // a guess.
|
|||
if (lastLocation.y > [[self window] frame].size.height
|
||||
|| lastLocation.y < 0)
|
||||
{
|
||||
weWereOut = YES;
|
||||
[self setHighlightedItemIndex: -1];
|
||||
}
|
||||
|
||||
|
@ -711,7 +712,7 @@ cell do the following */
|
|||
|
||||
/* If we are a menu */
|
||||
|
||||
if (menuv_menu)
|
||||
if (![menuv_menu _isBeholdenToPopUpButton])
|
||||
{
|
||||
while (!finished)
|
||||
{ // "forward"cursive menu find.
|
||||
|
@ -738,19 +739,20 @@ cell do the following */
|
|||
[window flushWindow];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[menuv_menu close];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* If the mouse is released and there is no highlighted cell */
|
||||
|
||||
else if (menuv_highlightedItemIndex == -1 && menuv_popb)
|
||||
else if (menuv_highlightedItemIndex == -1
|
||||
&& [menuv_menu _isBeholdenToPopUpButton])
|
||||
{
|
||||
NSLog(@"This is the popupbutton close if not selected test.\n");
|
||||
|
||||
if (menuv_popb)
|
||||
{
|
||||
[menuv_popb close];
|
||||
}
|
||||
[menuv_menu close];
|
||||
}
|
||||
|
||||
/* We went to the left of the current NSMenuView. BOOL is a misnomer. */
|
||||
|
|
Loading…
Reference in a new issue