mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 09:00:59 +00:00
Hanle key equivalents in popup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5675 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
936176ad81
commit
c69a12abec
2 changed files with 51 additions and 31 deletions
|
@ -109,6 +109,18 @@ NSApplication *NSApp = nil;
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
||||
{
|
||||
if (place == NSWindowOut)
|
||||
{
|
||||
NSLog(@"Argh - icon window ordered out");
|
||||
}
|
||||
else
|
||||
{
|
||||
[super orderWindow: place relativeTo: otherWin];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) initDefaults
|
||||
{
|
||||
[super initDefaults];
|
||||
|
|
|
@ -38,21 +38,20 @@
|
|||
#include <AppKit/NSMenuView.h>
|
||||
#include <AppKit/NSFont.h>
|
||||
|
||||
//
|
||||
// class variables
|
||||
//
|
||||
/*
|
||||
* class variables
|
||||
*/
|
||||
Class _nspopupbuttonCellClass = 0;
|
||||
|
||||
//
|
||||
// NSPopUpButton implementation
|
||||
//
|
||||
/*
|
||||
* NSPopUpButton implementation
|
||||
*/
|
||||
|
||||
@implementation NSPopUpButton
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Class methods
|
||||
//
|
||||
/*
|
||||
* Class methods
|
||||
*/
|
||||
+ (void) initialize
|
||||
{
|
||||
if (self == [NSPopUpButton class])
|
||||
|
@ -73,9 +72,9 @@ Class _nspopupbuttonCellClass = 0;
|
|||
_nspopupbuttonCellClass = classId;
|
||||
}
|
||||
|
||||
//
|
||||
// Initializing an NSPopUpButton
|
||||
//
|
||||
/*
|
||||
* Initializing an NSPopUpButton
|
||||
*/
|
||||
- (id) init
|
||||
{
|
||||
return [self initWithFrame: NSZeroRect pullsDown: NO];
|
||||
|
@ -148,6 +147,15 @@ Class _nspopupbuttonCellClass = 0;
|
|||
[self synchronizeTitleAndSelectedItem];
|
||||
}
|
||||
|
||||
- (BOOL) performKeyEquivalent: (NSEvent*)theEvent
|
||||
{
|
||||
NSMenu *m = [self menu];
|
||||
|
||||
if (m != nil)
|
||||
return [m performKeyEquivalent: theEvent];
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) removeAllItems
|
||||
{
|
||||
[_cell removeAllItems];
|
||||
|
@ -332,9 +340,9 @@ Class _nspopupbuttonCellClass = 0;
|
|||
|
||||
}
|
||||
|
||||
//
|
||||
// NSCoding protocol
|
||||
//
|
||||
/*
|
||||
* NSCoding protocol
|
||||
*/
|
||||
- (void) encodeWithCoder: (NSCoder*)aCoder
|
||||
{
|
||||
[super encodeWithCoder: aCoder];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue