mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 16:21:56 +00:00
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:
parent
58ba497278
commit
b3c6e86043
2 changed files with 18 additions and 0 deletions
|
@ -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
|
2010-12-14 Riccardo Mottola
|
||||||
|
|
||||||
* Source/NSWorkspace.m
|
* Source/NSWorkspace.m
|
||||||
|
|
|
@ -552,6 +552,17 @@
|
||||||
return template;
|
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
|
- (void) _openPopup: (id)sender
|
||||||
{
|
{
|
||||||
NSMenu *template;
|
NSMenu *template;
|
||||||
|
@ -565,6 +576,8 @@
|
||||||
|
|
||||||
template = [self searchMenuTemplate];
|
template = [self searchMenuTemplate];
|
||||||
popupmenu = [[NSMenu alloc] init];
|
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
|
// Fill the popup menu
|
||||||
for (i = 0; i < [template numberOfItems]; i++)
|
for (i = 0; i < [template numberOfItems]; i++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue