Set search menu 'ownedByPopup' to make it work on Windows.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31747 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Doug Simons 2010-12-17 21:27:48 +00:00
parent 774ac5ba02
commit 3a9b7dbab3
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2010-12-17 Doug Simons <doug.simons@testplant.com>
* Source/NSSearchFieldCell.m:
Set search menu 'ownedByPopup' to make it work on Windows.
2010-12-14 Riccardo Mottola
* Source/NSWorkspace.m

View file

@ -552,6 +552,17 @@
return template;
}
/* These two methods allow the NSSearchFieldCell to act enough like an
NSPopUpButtonCell that it can serve as the "owner" of the popup menu. */
- (BOOL) pullsDown
{
return NO;
}
- (void) selectItemAtIndex:(int)anIndex
{
// do nothing
}
- (void) _openPopup: (id)sender
{
NSMenu *template;
@ -565,6 +576,8 @@
template = [self searchMenuTemplate];
popupmenu = [[NSMenu alloc] init];
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil) == NSWindows95InterfaceStyle)
[popupmenu _setOwnedByPopUp:(NSPopUpButtonCell *)self]; // needed for menu to show up in NSWindows95InterfaceStyle
// Fill the popup menu
for (i = 0; i < [template numberOfItems]; i++)