summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to bedkf2011-03-121-30/+25
| | | using useful casts internally.
* Revise Tcl_Panic() calls ending with a newline removing the newline, because ↵nijtmans2010-11-191-3/+3
| | | | Tcl_Panic() outputs a final newline already
* CONSTify TkCopyAndGlobalEval, TkpSetMainMenubar,nijtmans2010-05-101-3/+3
| | | | | TkpMenuNotifyToplevelCreate, and TkSetWindowMenuBar Bring Tk_CreateBinding doc and signature (param name) in line.
* generic/tkMenu.c: Defer TkMenuOptionTables cleanup to CallWhenDeleted() time,jenglish2010-02-171-4/+5
| | | | | to ensure that the record doesn't get freed until after all widget instance commands have been deleted (Fixes [Bug#2952745]).
* fix more gcc warnings: missing initializernijtmans2010-01-181-57/+57
| | | | | Apply patch [#2932808]: Canvas items not updating on widget state change
* Eliminate tkpMenubuttonClassnijtmans2010-01-131-3/+5
| | | | | make tkpButtonProcs CONST fix gcc warnings: missing initializer
* [Bug 220950]: Don't delete the last menu entry when it is obvious that is notdkf2010-01-051-2/+13
| | | | what was intended.
* SMALL FIX: Remove useless explicit casts now that we require C89 or later.dkf2010-01-021-2/+2
|
* Patch 2879789: Make torn-off menu entrys activate across whole windowpatthoyts2009-12-301-13/+25
| | | | | | | | The torn-off menu entries do not activate except immediately over the label or icon. If the window containing the torn-off menu is expanded then a lot of dead space may be created, including the cascade arrow. This patch fixes this making the whole width for any menu entry capable of activation when the pointer hovers over the item.
* Improve generation of EWMH hints for windows.dkf2009-12-091-19/+41
|
* * generic/tkFocus.c: fix potential null dereference flagged by clangdas2009-09-071-2/+2
| | | | | | | | | | | | | | * generic/tkMenu.c: static analyzer. * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextIndex.c: * generic/tkConsole.c: silence false positives from clang static * generic/tkTest.c: analyzer about potential null dereference. * generic/tkText.c: * generic/tkTextBTree.c: * generic/tkTextTag.c: * generic/tkVisual.c:
* * generic/tkMenu.c (PostProcessEntry): delay call todas2009-04-101-5/+5
| | | | TkpConfigureMenuEntry() until all menu entry attributes are setup.
* * generic/tkImgPhInstance.c: fix numerous leaks discovered with thedas2009-02-061-2/+10
| | | | | | | | | | | * generic/tkMenu.c: Mac OS X Instruments.app Leaks tool. * generic/tkText.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkUndo.c: * generic/tkUtil.c: * generic/ttk/ttkFrame.c: * macosx/tkMacOSXWm.c:
* - fix for aMSN compatibility [tcl-Bug 2507326]nijtmans2009-01-141-24/+25
| | | | | - CONSTify Tk(Create|Find)menuReferences - various internal "const" decorations
* elminate warning: unused variable 'tkwin'nijtmans2008-11-271-3/+3
| | | | | Replace Tcl_SetResult(interp, NULL, ....) calls with Tcl_ResetResult(interp) everywhere
* More small changes to use C89 better and manage the result more efficiently.dkf2008-11-081-2/+2
|
* more internal -Wwrite-strings warning fixesnijtmans2008-10-301-2/+2
|
* Add "const" to many internalnijtmans2008-10-171-9/+9
| | | | | | | | const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
* Greatly clean up Tk's handling of the writability of the Tcl result object.dkf2008-10-051-4/+4
|
* fix [2021443] inconsistant "wrong # args" messages (for Tk)nijtmans2008-07-231-6/+6
|
* Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-66/+65
|
* merge stable branch onto HEADdgp2007-12-131-1/+1
|
* header cleanupdgp2007-09-071-2/+2
|
* Cleaning up whitespace, comments, declarations. No functional changes.dkf2007-06-241-79/+76
|
* various "const" additions, in line with TIP #27nijtmans2007-01-031-10/+10
|
* TIP#286 implementation. [Patch 1152376]dkf2006-12-041-19/+64
|
* * generic/tkMenu.c (DeleteMenuCloneEntries): Modify entry indexhobbs2006-05-251-4/+5
| | | | changes to work around VC6 optimization bug. [Bug 1224330]
* * generic/tkMenu.c (TkSetWindowMenuBar): remove extra TkMenuInithobbs2006-04-051-12/+1
| | | | | | | | | | call that caused finalization panic. [Bug 1456851] * win/tkWinMenu.c (FreeID, TkpNewMenu, MenuExitHandler) (MenuThreadExitHandler, TkpMenuInit, TkpMenuThreadInit): rework Windows menu init/finalization to better respect per-process and per-thread boundaries. [Bug 1456851] (TkWinMenuKeyObjCmd): Do not error when unknown window is passed in. [Bug 1236306]
* * unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),das2005-11-271-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to configure (flag can't be present twice, so can't be in both CFLAGS and LDFLAGS during configure), don't use -prebind when deploying on 10.4, define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542). (SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete autoconf macros. Sync with tcl/unix/tcl.m4. * unix/configure.in: fix obsolete autoconf macros, sync gratuitous formatting/ordering differences with tcl/unix/configure.in. * unix/Makefile.in: add CFLAGS to wish/tktest link to make executable linking the same as during configure (needed to avoid loosing any linker relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS). Avoid concurrent linking of wish and compiling of tkTestInit.o during parallel make, fix dependencies and flags for building tkMacOSXInit.o (checkstubs, checkexports): dependency and Darwin fixes (dist): add new macosx files. * macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent): * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent): * macosx/tkMacOSXCarbonEvents.c: install standard application event handler, add & call functions to start and stop carbon even timer that runs the tcl event loop periodically during a nested carbon event loop in the toolbox (e.g. during menutracking) to ensure tcl timers etc continue to fire, register app event handler for menu tracking and HI command carbon events, move menu event handling to new handlers for those carbon events, no longer register for/handle appleevent carbon event (now dealt with by standard application event handler), event debugging code dynamically acquires carbon event debugging functions to allow use on Tiger where they are no longer exported from HIToolbox. * macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText): * macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout): * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: abstract common code to dynamically acquire address of a named symbol (from a loaded dynamic library) into new function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol. * macosx/tkMacOSXMenu.c (TkpNewMenu): * macosx/tkMacOSXMenubutton.c (MenuButtonInitControl): * macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to modern utf8 aware menu manager API, remove obsolete code, add error handling. * macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants if necessary to allow compilation on OSX 10.2 * macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never executed. * xlib/xgc.c (XCreateGC): sync with core-8-4-branch change. * generic/tk.h: add/correct location of version numbers in macosx files. * generic/tkInt.h: clarify fat compile comment. * macosx/Wish.pbproj/default.pbxuser (new file): * macosx/Wish.pbproj/jingham.pbxuser: * macosx/Wish.pbproj/project.pbxproj: * macosx/Wish.xcode/default.pbxuser: * macosx/Wish.xcode/project.pbxproj: * macosx/Wish.xcodeproj/default.pbxuser (new file): * macosx/Wish.xcodeproj/project.pbxproj (new file): new/updated projects for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with native tktest targets and support for universal (fat) compiles. * macosx/Tk-Info.plist (removed): * macosx/Wish-Info.plist (removed): * macosx/buildTkConfig.tcl (removed): remove obsolete build files. * macosx/README: clarification/cleanup, document new Xcode projects and universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time). * unix/Makefile.in: * unix/aclocal.m4: * unix/configure.in: * macosx/configure.ac (new file): add support for inclusion of unix/configure.in by macosx/configure.ac, allows generation of a config headers enabled configure script in macosx (required by Xcode projects). * macosx/GNUmakefile: rename from Makefile to avoid overwriting by configure run in tk/macosx, add support for reusing configure cache, build target fixes. * generic/tk3d.h: * generic/tkButton.h: * generic/tkCanvas.c: * generic/tkCanvas.h: * generic/tkColor.h: * generic/tkEntry.h: * generic/tkFileFilter.h: * generic/tkFont.c: * generic/tkFont.h: * generic/tkImage.c: * generic/tkImgPhoto.c: * generic/tkInt.h: * generic/tkMenu.c: * generic/tkMenu.h: * generic/tkMenubutton.h: * generic/tkScale.h: * generic/tkScrollbar.h: * generic/tkSelect.h: * generic/tkStubInit.c: * generic/tkStubLib.c: * generic/tkText.h: * generic/tkUndo.h: * macosx/tkMacOSXButton.c: * macosx/tkMacOSXDebug.c: * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDialog.c: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXEntry.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenubutton.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXSend.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnixButton.c: * unix/tkUnixMenu.c: * xlib/xgc.c: ensure externally visible symbols not contained in stubs table are declared as MODULE_SCOPE (or as static if not used outside of own source file), #ifdef out a few Xlib and aqua functions that are never called. These changes allow 'make checkstubs' to complete without error on Darwin with gcc 4. * macosx/tkMacOSXTest.c: * macosx/tkMacOSXPort.h: * win/tkWinTest.c: * generic/tkInt.decls: add functions needed by tktest to internal stubs table, correct signature of TkMacOSXHandleMenuSelect, add XSync to aqua Xlib stubs. * unix/tkUnixSend.c: * generic/tkText.c: * generic/tkTest.c: #ifdef unix only declarations. (TestmetricsCmd): unify win and mac implementation. (TestsendCmd): move to tkUnixSend.c to avoid access to global var. (TesttextCmd): move to tkText.c to avoid having to put all the internal text functions it uses into the stubs table. * generic/tkTextDisp.c: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXXStubs.c: fix gcc 4 warnings. * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXScrlbr.c: sync with core-8-4-branch. * generic/tkIntDecls.h: * generic/tkIntPlatDecls.h: * generic/tkIntXlibDecls.h: * generic/tkStubInit.c: * unix/configure: * unix/tkConfig.h.in: regen.
* ANSIfy and reduce casting of NULL to promote readabilitydkf2005-11-171-943/+906
|
* Lots of ANSIfying of function decls.dkf2005-11-171-9/+10
| | | | Also a few spots where code has been cleaned up more completely.
* Undo accidental checkindkf2005-10-121-5/+1
|
* Arrange the test suite so that it only accesses images in the same directory.dkf2005-10-121-1/+5
| | | | This enables packaging of the test suite as a starkit.
* * generic/tkMenu.c (TkSetWindowMenuBar): do not call TkMenuInit ifhobbs2005-10-101-2/+10
| | | | | | the winPtr indicates TK_ALREADY_DEAD. This prevents reinit that creates a Tk exit handler after all exit handlers should be called. [Bug 749908, 1322294]
* whitespace changes onlyhobbs2005-10-101-201/+199
|
* * generic/tkMenu.c (MenuCmd): create event handler earlier tohobbs2005-05-311-37/+15
| | | | | ensure proper destruction of menu through DestroyNotify. [Bug 1159367]
* * generic/tkMenu.c (MenuWorldChanged): ensure that we recomputehobbs2004-09-161-7/+7
| | | | | the menu geometry on WorldChanged to handle font size changes. [Bug 607649]
* * generic/tk3d.c: All uses of 'panic' (the macro) changeddavygrvy2004-01-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tkBind.c: to 'Tcl_Panic' (the function). The #define * generic/tkBitmap.c: of panic in tcl.h clearly states it is * generic/tkCanvArc.c: deprecated in the comments. * generic/tkCanvBmap.c: [Tcl Patch 865264] * generic/tkCanvImg.c: * generic/tkCanvLine.c: * generic/tkCanvPoly.c: * generic/tkCanvText.c: * generic/tkCanvWind.c: * generic/tkColor.c: * generic/tkConfig.c: * generic/tkCursor.c: * generic/tkError.c: * generic/tkEvent.c: * generic/tkFocus.c: * generic/tkFont.c: * generic/tkFrame.c: * generic/tkGC.c: * generic/tkGrid.c: * generic/tkImgBmap.c: * generic/tkImgPhoto.c: * generic/tkImgUtil.c: * generic/tkMenu.c: * generic/tkObj.c: * generic/tkPack.c: * generic/tkPlace.c: * generic/tkRectOval.c: * generic/tkSelect.c: * generic/tkText.c: * generic/tkTextBTree.c: * generic/tkTextDisp.c: * generic/tkTextImage.c: * generic/tkTextIndex.c: * generic/tkTextMark.c: * generic/tkTextWind.c: * generic/tkVisual.c: * generic/tkWindow.c: * mac/tkMacAppInit.c: * mac/tkMacAppearanceStubs.c: * mac/tkMacButton.c: * mac/tkMacDraw.c: * mac/tkMacEmbed.c: * mac/tkMacFont.c: * mac/tkMacInit.c: * mac/tkMacMenus.c: * mac/tkMacPort.h: * mac/tkMacSubwindows.c: * mac/tkMacWm.c: * mac/tkMacXStubs.c: * macosx/tkMacOSXEmbed.c: * macosx/tkMacOSXFont.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXNotify.c: * macosx/tkMacOSXPort.h: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * unix/tkUnix3d.c: * unix/tkUnixColor.c: * unix/tkUnixEmbed.c: * unix/tkUnixEvent.c: * unix/tkUnixFocus.c: * unix/tkUnixFont.c: * unix/tkUnixSelect.c: * unix/tkUnixSend.c: * unix/tkUnixWm.c: * win/tkWin3d.c: * win/tkWinButton.c: * win/tkWinColor.c: * win/tkWinDialog.c: * win/tkWinDraw.c: * win/tkWinEmbed.c: * win/tkWinFont.c: * win/tkWinPixmap.c: * win/tkWinPointer.c: * win/tkWinScrlbr.c: * win/tkWinWm.c: * win/tkWinX.c:
* * generic/tkEvent.c: Added three new functions: TkCreateExitHandler,davygrvy2003-12-211-2/+2
| | | | | | | | | | | | | | | | | * generic/tkInt.h: TkDeleteExitHandler, and TkFinalize. This adds * generic/tkMenu.c: an insertion point so Tk's exit handlers can be * generic/tkWindow.c: called on their own from tk85.dll's DllMain * mac/tkMacButton.c: for DLL_PROCESS_DETACH. These are private to * unix/tkUnixEvent.c: the binary and not exported. It is possible * win/tkWin32Dll.c: the Windows OS can unload Tk _prior_ to Tcl * win/tkWinEmbed.c: under some conditions such as ExitProcess(). * win/tkWinMenu.c: This avoids a dangling pointer problem when Tcl * win/tkWinX.c: does Tcl_Finalize after Tk has been unloaded. * win/winMain.c: DllMain's DLL_PROCESS_DETACH now protected with SEH as DeleteWindowsExitProc is causing an exception of its own under some teardown conditions. AT&T assembly syntax has not been added for MinGW yet. [Tcl Patch 858493]
* Typo fixdkf2003-12-031-2/+2
|
* * generic/tkMenu.c (MenuVarProc): prevent this from triggeringhobbs2003-12-031-5/+13
| | | | while interp is being destroyed.
* fix to menu clone deletion bugvincentdarley2003-05-301-60/+138
|
* * generic/tkMenu.c (TkMenuCleanup): make sure to reset statichobbs2003-02-261-2/+30
| | | | menusInitialized on finalize. [Bug #548729]
* Applied companion patch for Tcl Patch 585105,dgp2002-08-051-4/+4
| | | | | | | | | | | | | | | | | | | | | updating Tk to use Tcl 8.4's fully CONST-ified interface, and fully CONSTifying Tk at the same time. This patch includes purging Tk of its last direct access to interp->result. [Bug 589853] The substantial changes include copying event sequence strings into Tcl_DStrings in tkBind.c, and copying [text] indices into Tcl_DStrings because parsing them involved overwriting them. If this causes performance trouble, that can be resolved by further converting them to Tcl_Obj's. The #defines USE_NON_CONST and USE_COMPAT_CONST have the same effect for Tk as they do for Tcl. (They actually change tcl.h)
* generic/tkMenu.c (ConfigureMenu): freed saved options in all error caseshobbs2002-04-121-9/+14
|
* * Updates to handle change in type of part2 argument ofdgp2002-03-201-3/+3
| | | | Tcl_VarTraceProc typedef. [TIP 27] [Patch 532644].
* Correct and test for logic error when cloning menus. Bug 508988uid382262002-01-311-2/+2
|
* * Updated callers of Tcl_SplitList and Tcl_Merge.dgp2002-01-251-2/+2
| | | | | | | | | * Updated callers of Tcl_GetStringResult. Rewrote PrintScrollFractions to ScrollFractions to stop scribbling directly on interp->result. * Updated callers of Tcl_GetVar, Tcl_GetVar2 * Updated callers of Tcl_SplitPath, Tcl_JoinPath, and Tcl_TranslateFileName.
* * Updates to handle change in type of tablePtrdgp2002-01-171-8/+10
| | | | | argument of Tcl_GetIndexFromObj(Struct) from (char **) to (CONST char **). [TIP 27] [Patch 504705]
* implementation of TIP 63 (accepted) -compound option to menu items.macosx_8_4_branchpointtmh2001-10-121-1/+13
|