diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-09 00:48:36 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2010-01-09 00:48:36 (GMT) |
commit | 0d5ee63431a40ebbe9d3a895d1ca2a3bb9a30cd0 (patch) | |
tree | b96c64e99d40e9797e3a01fd72f2950b78e67200 /unix | |
parent | 7540b82fe0542de05038049569f2b6656338dd18 (diff) | |
download | tk-0d5ee63431a40ebbe9d3a895d1ca2a3bb9a30cd0.zip tk-0d5ee63431a40ebbe9d3a895d1ca2a3bb9a30cd0.tar.gz tk-0d5ee63431a40ebbe9d3a895d1ca2a3bb9a30cd0.tar.bz2 |
TIP 360: Remove special handling of .help menu on X11.
Tk is the only toolkit to continue the Motif scheme of anchoring a Help
menu to the extreme right of the menubar. This patch disables the special
handling of the .help menu so that the help menu will be grouped with the
other menu items as is common with other toolkits.
The old behaviour can be restored by setting the option *Menu.useMotifHelp
to true or by calling 'tk::classic::restore menu'.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixMenu.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/unix/tkUnixMenu.c b/unix/tkUnixMenu.c index 9becd73..f7611d2 100644 --- a/unix/tkUnixMenu.c +++ b/unix/tkUnixMenu.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkUnixMenu.c,v 1.23 2009/01/28 20:47:49 nijtmans Exp $ + * RCS: @(#) $Id: tkUnixMenu.c,v 1.24 2010/01/09 00:48:36 patthoyts Exp $ */ #include "default.h" @@ -1262,6 +1262,18 @@ SetHelpMenu( TkMenu *menuPtr) /* The menu we are checking */ { TkMenuEntry *cascadeEntryPtr; + int useMotifHelp = 0; + const char *option = NULL; + if (menuPtr->tkwin) { + option = Tk_GetOption(menuPtr->tkwin, "useMotifHelp", "UseMotifHelp"); + if (option != NULL) { + Tcl_GetBoolean(NULL, option, &useMotifHelp); + } + } + + if (!useMotifHelp) { + return; + } for (cascadeEntryPtr = menuPtr->menuRefPtr->parentEntryPtr; cascadeEntryPtr != NULL; |