summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-08-05 23:53:09 (GMT)
committerhobbs <hobbs>2000-08-05 23:53:09 (GMT)
commit5b5b6e4d1496daf49370c468d89671fd5fd0e076 (patch)
tree7d003d614af5987da37517b22016022aec422d9d /win
parent911c2f792cf63b4bfcd8dd396925f69a47f48cd5 (diff)
downloadtk-5b5b6e4d1496daf49370c468d89671fd5fd0e076.zip
tk-5b5b6e4d1496daf49370c468d89671fd5fd0e076.tar.gz
tk-5b5b6e4d1496daf49370c468d89671fd5fd0e076.tar.bz2
* BACKPORTED FROM 8.4 (HEAD) BRANCH:
* tests/button.test: * generic/tkButton.c: Added -activeforeground, -activebackground for labels, for the -state option. * doc/label.n: Added -disabledforeground to list of options [Bug: 6053]. * tests/focus.test (focusSetupAlt): removed wm withdraw from proc as it would cause a hang for tkwait visibility * tests/menu.test: * generic/tk3d.c: * generic/tkColor.c: * generic/tkCursor.c: corrected handling of 3DBorder, Cursor and Color objects on multiple screens. [Bug: 5454] * generic/tkCursor.c: Added initialization for nextPtr field of TkCursor, patch from Nijtmans/Howlett. * canvas.test: added test for 5783. * generic/tkCanvPoly.c (DisplayPolygon): added checks for the polygon fillGC not being empty to prevent segfault. [Bug: 5783] * generic/tkImgGIF.c: Applied patch from Jan Nijtmans to fix a problem with the GIF writing code [Bug: 5823]. * generic/tkImgGIF.c: Changed defines for GIF87a/GIF89a to be static char arrays with integer initialization, to address EBCIDIC vs. ASCII encoding issues and to handle compilers that don't deal with "\xAB" syntax for specifying hex values in strings. * generic/tkMenu.c (DeleteMenuCloneEntries): Applied fix from [Bug: 5275], which corrected a segfault-causing indexing problem when deleting entries from torn-off menus. * generic/tkPlace.c (Tk_PlaceCmd): reworked place master/slave table init'n to prevent seg fault when using place on multiple displays. * tests/text.test: Added tests for -regexp -nocase searches with backslash character classes. * tests/text.test: Added tests for searching when text is elided. * generic/tkText.c (TextSearchCmd): Text search did not work properly when -regexp and -nocase were used, in combination with backslash character classes represented by capital letters (ie, \W, \M); altered implementation of -regexp -nocase searches to use new regexp interfaces to fix this problem. [Bug: 5988]. * generic/tkText.c (TextSearchCmd): Text search was not returning the correct index when the search covered (but did not search) elided characters; corrected this by adjusting the match index by the number of elided characters preceeding the start of the match, just as is done with embedded windows, etc. [Bug: 5470]. * generic/tkText.c (TextSearchCmd): Added a test for a NULL segment pointer when doing backwards searches for "" on an empty text widget. [Bug: 6007]. * library/focus.tcl: fixed calling of takeFocus proc [Bug: 5372] * win/tkWinMenu.c (ReconfigureWindowsMenu): Added MF_GRAYED bit for disabled menu entries, to ensure that those which are drawn by the system are shown grayed (such as entries on menubars) [Bug: 4372]. * win/tkWinMenu.c (ReconfigureWindowsMenu): Added code to add the MF_SEPARATOR bit for SEPARATOR_ENTRY menu items. This causes separator entries on the system menu to be drawn correctly [Bug: 5451]. * win/tkWinMenu.c (GetMenuSeparatorGeometry): Tweaked height requested for separator bars to be (linespace - (2*descent)) instead of just (linespace); this makes the separator occupy a more correct amount of vertical space. [Bug: 5303].
Diffstat (limited to 'win')
-rw-r--r--win/tkWinMenu.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index e379faa..733978d 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinMenu.c,v 1.8 2000/04/13 20:51:55 ericm Exp $
+ * RCS: @(#) $Id: tkWinMenu.c,v 1.8.2.1 2000/08/05 23:53:15 hobbs Exp $
*/
#define OEMRESOURCE
@@ -82,8 +82,6 @@ static int defaultBorderWidth; /* The windows default border width. */
static Tcl_DString menuFontDString;
/* A buffer to store the default menu font
* string. */
-TCL_DECLARE_MUTEX(winMenuMutex)
-
/*
* Forward declarations for procedures defined later in this file:
*/
@@ -149,7 +147,6 @@ static void GetTearoffEntryGeometry _ANSI_ARGS_((TkMenu *menuPtr,
int *heightPtr));
static int GetNewID _ANSI_ARGS_((TkMenuEntry *mePtr,
int *menuIDPtr));
-static void MenuExitProc _ANSI_ARGS_((ClientData clientData));
static int MenuKeyBindProc _ANSI_ARGS_((
ClientData clientData,
Tcl_Interp *interp, XEvent *eventPtr,
@@ -579,13 +576,13 @@ ReconfigureWindowsMenu(
lpNewItem = (LPCTSTR) mePtr;
flags |= MF_OWNERDRAW;
}
-
+
/*
* Set enabling and disabling correctly.
*/
if (mePtr->state == ENTRY_DISABLED) {
- flags |= MF_DISABLED;
+ flags |= MF_DISABLED | MF_GRAYED;
}
/*
@@ -598,6 +595,18 @@ ReconfigureWindowsMenu(
flags |= MF_CHECKED;
}
+ /*
+ * Set the SEPARATOR bit for separator entries. This bit is not
+ * used by our internal drawing functions, but it is used by the
+ * system when drawing the system menu (we do not draw the system menu
+ * ourselves). If this bit is not set, separator entries on the system
+ * menu will not be drawn correctly.
+ */
+
+ if (mePtr->type == SEPARATOR_ENTRY) {
+ flags |= MF_SEPARATOR;
+ }
+
if (mePtr->columnBreak) {
flags |= MF_MENUBREAK;
}
@@ -1384,7 +1393,7 @@ GetMenuSeparatorGeometry (
int *heightPtr) /* The resulting height */
{
*widthPtr = 0;
- *heightPtr = fmPtr->linespace;
+ *heightPtr = fmPtr->linespace - (2 * fmPtr->descent);
}
/*