Bug 620, respect enable/disable state of entire menus when using native Cocoa menu
This commit is contained in:
parent
b70055a9a2
commit
b501dc97ce
1 changed files with 7 additions and 2 deletions
|
@ -127,8 +127,6 @@ private:
|
|||
NSMenuItem* item;
|
||||
};
|
||||
|
||||
|
||||
|
||||
FGCocoaMenuBar::CocoaMenuBarPrivate::CocoaMenuBarPrivate()
|
||||
{
|
||||
delegate = [[CocoaMenuDelegate alloc] init];
|
||||
|
@ -259,6 +257,13 @@ void FGCocoaMenuBar::init()
|
|||
p->menuFromProps(menu, n);
|
||||
++index;
|
||||
previousMenu = item;
|
||||
|
||||
// track menu enable/disable state
|
||||
if (!n->hasValue("enabled")) {
|
||||
n->setBoolValue("enabled", true);
|
||||
}
|
||||
|
||||
n->getNode("enabled")->addChangeListener(new EnabledListener(item));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue