1
0
Fork 0

Bug 620, respect enable/disable state of entire menus when using native Cocoa menu

This commit is contained in:
James Turner 2012-01-25 18:56:51 +00:00
parent b70055a9a2
commit b501dc97ce

View file

@ -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));
}
}