Bug #3713 » tcltklib.c.diff
ruby_1_8_6/ext/tk/tcltklib.c 2010-08-27 14:02:02.000000000 +0900 | ||
---|---|---|
char *dummy3;
|
||
};
|
||
#if 0 /* was available on Tk8.0 -- Tk8.4 */
|
||
EXTERN struct dummy_TkMenuRef *TkFindMenuReferences(Tcl_Interp*, char*);
|
||
#else /* based on Tk8.0 -- Tk8.5.0 */
|
||
#define MENU_HASH_KEY "tkMenus"
|
||
#endif
|
||
#endif
|
||
... | ... | |
StringValue(menu_path);
|
||
menuRefPtr = TkFindMenuReferences(ptr->ip, RSTRING(menu_path)->ptr);
|
||
#if 0 /* was available on Tk8.0 -- Tk8.4 */
|
||
menuRefPtr = TkFindMenuReferences(ptr->ip, RSTRING_PTR(menu_path));
|
||
#else /* based on Tk8.0 -- Tk8.5b1 */
|
||
if ((menuTablePtr
|
||
= (Tcl_HashTable *) Tcl_GetAssocData(ptr->ip, MENU_HASH_KEY, NULL))
|
||
!= NULL) {
|
||
if ((hashEntryPtr
|
||
= Tcl_FindHashEntry(menuTablePtr, RSTRING_PTR(menu_path)))
|
||
!= NULL) {
|
||
menuRefPtr = (struct dummy_TkMenuRef *) Tcl_GetHashValue(hashEntryPtr);
|
||
}
|
||
}
|
||
#endif
|
||
if (menuRefPtr == (struct dummy_TkMenuRef *) NULL) {
|
||
rb_raise(rb_eArgError, "not a menu widget, or invalid widget path");
|
||
}
|
||
... | ... | |
}
|
||
#endif
|
||
#if 0 /* was available on Tk8.0 -- Tk8.4 */
|
||
TkEventuallyRecomputeMenu(menuRefPtr->menuPtr);
|
||
TkEventuallyRedrawMenu(menuRefPtr->menuPtr,
|
||
TkEventuallyRedrawMenu(menuRefPtr->menuPtr,
|
||
(struct dummy_TkMenuEntry *)NULL);
|
||
#else /* based on Tk8.0 -- Tk8.5b1 */
|
||
memset((void *) &event, 0, sizeof(event));
|
||
event.xany.type = ConfigureNotify;
|
||
event.xany.serial = NextRequest(Tk_Display((menuRefPtr->menuPtr)->tkwin));
|
||
event.xany.send_event = 0; /* FALSE */
|
||
event.xany.window = Tk_WindowId((menuRefPtr->menuPtr)->tkwin);
|
||
event.xany.display = Tk_Display((menuRefPtr->menuPtr)->tkwin);
|
||
event.xconfigure.window = event.xany.window;
|
||
Tk_HandleEvent(&event);
|
||
#endif
|
||
#else /* TCL_MAJOR_VERSION <= 7 */
|
||
rb_notimplement();
|