summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwordtech <wordtech>2011-01-06 04:44:51 (GMT)
committerwordtech <wordtech>2011-01-06 04:44:51 (GMT)
commit18c820c6017eabf6e1f2ebcce5dcf7d84bf45911 (patch)
tree20325809989d89cf54a9513cbfff24a7687ffd36
parent2e8bf0670b941c095a40ed4d105ee7470ae806d3 (diff)
downloadtk-18c820c6017eabf6e1f2ebcce5dcf7d84bf45911.zip
tk-18c820c6017eabf6e1f2ebcce5dcf7d84bf45911.tar.gz
tk-18c820c6017eabf6e1f2ebcce5dcf7d84bf45911.tar.bz2
Fix for 3012605, enables menu entries if parent is enabled.
-rw-r--r--macosx/tkMacOSXMenu.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index bd867b9..5c40ed8 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.54 2010/05/10 20:58:18 nijtmans Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.55 2011/01/06 04:44:51 wordtech Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -665,6 +665,16 @@ TkpConfigureMenuEntry(
}
}
[menuItem setSubmenu:submenu];
+
+ /*Disabling parent menu disables entries; we must re-enable the entries here.*/
+ NSArray *itemArray = [submenu itemArray];
+
+ if ([menuItem isEnabled]) {
+ for (NSMenuItem *item in itemArray) {
+ [item setEnabled:YES];
+ }
+ }
+
return TCL_OK;
}