mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 09:00:56 +00:00
beep on click when no items to display
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16454 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9ad516dd0a
commit
69fc3b2540
1 changed files with 13 additions and 0 deletions
|
@ -338,6 +338,12 @@ this to return nil to indicate that we have no context menu.
|
||||||
if ([self isEnabled] == NO)
|
if ([self isEnabled] == NO)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if ([[_cell menu] numberOfItems] == 0)
|
||||||
|
{
|
||||||
|
NSBeep ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Attach the popUp
|
// Attach the popUp
|
||||||
[_cell attachPopUpWithFrame: _bounds
|
[_cell attachPopUpWithFrame: _bounds
|
||||||
inView: self];
|
inView: self];
|
||||||
|
@ -422,6 +428,13 @@ this to return nil to indicate that we have no context menu.
|
||||||
NSMenuView *menuView;
|
NSMenuView *menuView;
|
||||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||||
|
|
||||||
|
// Beep, as on OS, and then return.
|
||||||
|
if ([[_cell menu] numberOfItems] == 0)
|
||||||
|
{
|
||||||
|
NSBeep();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
menuView = [[_cell menu] menuRepresentation];
|
menuView = [[_cell menu] menuRepresentation];
|
||||||
if ([[menuView window] isVisible] == NO)
|
if ([[menuView window] isVisible] == NO)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue