summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2004-09-16 20:05:42 (GMT)
committerhobbs <hobbs>2004-09-16 20:05:42 (GMT)
commit3f999b55e1c6f3d9a0e4dfacd93971b125e4c59f (patch)
tree9d11872ad75d87718db56d7b5c55ee70a58d171b
parentc2aaaa239e56cd20c235d676baa9683c2a1df95e (diff)
downloadtk-3f999b55e1c6f3d9a0e4dfacd93971b125e4c59f.zip
tk-3f999b55e1c6f3d9a0e4dfacd93971b125e4c59f.tar.gz
tk-3f999b55e1c6f3d9a0e4dfacd93971b125e4c59f.tar.bz2
* generic/tkMenu.c (MenuWorldChanged): ensure that we recompute
the menu geometry on WorldChanged to handle font size changes. [Bug 607649]
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkMenu.c14
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 6fee6f1..c64ae5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-16 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkMenu.c (MenuWorldChanged): ensure that we recompute
+ the menu geometry on WorldChanged to handle font size
+ changes. [Bug 607649]
+
2004-09-16 Peter Spjuth <peter.spjuth@space.se>
* tests/place.test:
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 9055c7a..a2f791a 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMenu.c,v 1.20.2.2 2003/12/03 04:57:37 hobbs Exp $
+ * RCS: @(#) $Id: tkMenu.c,v 1.20.2.3 2004/09/16 20:05:44 hobbs Exp $
*/
/*
@@ -1384,7 +1384,7 @@ UnhookCascadeEntry(mePtr)
* Singularly linked list deletion. The two special cases are
* 1. one element; 2. The first element is the one we want.
*/
-
+
if (cascadeEntryPtr == mePtr) {
if (cascadeEntryPtr->nextCascadePtr == NULL) {
@@ -1393,7 +1393,7 @@ UnhookCascadeEntry(mePtr)
* menu, so we need to clear out the list pointer in the
* cascade itself.
*/
-
+
menuRefPtr->parentEntryPtr = NULL;
/*
* The original field is set to zero below, after it is
@@ -1448,7 +1448,6 @@ DestroyMenuEntry(memPtr)
TkMenu *menuPtr = mePtr->menuPtr;
if (menuPtr->postedCascade == mePtr) {
-
/*
* Ignore errors while unposting the menu, since it's possible
* that the menu has already been deleted and the unpost will
@@ -1537,20 +1536,21 @@ DestroyMenuEntry(memPtr)
*
*---------------------------------------------------------------------------
*/
-
+
static void
MenuWorldChanged(instanceData)
ClientData instanceData; /* Information about widget. */
{
TkMenu *menuPtr = (TkMenu *) instanceData;
int i;
-
+
TkMenuConfigureDrawOptions(menuPtr);
for (i = 0; i < menuPtr->numEntries; i++) {
TkMenuConfigureEntryDrawOptions(menuPtr->entries[i],
menuPtr->entries[i]->index);
- TkpConfigureMenuEntry(menuPtr->entries[i]);
+ TkpConfigureMenuEntry(menuPtr->entries[i]);
}
+ TkEventuallyRecomputeMenu(menuPtr);
}
/*