diff options
-rw-r--r-- | ChangeLog | 61 | ||||
-rw-r--r-- | generic/tkUndo.c | 39 |
2 files changed, 38 insertions, 62 deletions
@@ -1,3 +1,8 @@ +2005-12-28 Donal K. Fellows <dkf@users.sf.net> + + * generic/tkUndo.c (TkUndoSetDepth): Apply [Patch 1391939] from + Ludwig Callewaert to fix [Bug 1380427]. + 2005-12-14 Daniel Steffen <das@users.sourceforge.net> * macosx/Wish.xcode/project.pbxproj: @@ -8,8 +13,8 @@ * library/demos/cscroll.tcl: add MouseWheel bindings for aqua. * macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents): - * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent, - GenerateMouseWheelEvent): add support for kEventMouseScroll events + * macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent) + (GenerateMouseWheelEvent): add support for kEventMouseScroll events (smooth mouse wheel scrolling from mighty mouse or scrolling trackpad) by handling kEventMouseWheelMoved on application target as well as on dispatcher, in order to pick up synthesized MouseWheel events from @@ -23,19 +28,16 @@ 2005-12-09 Mo DeJong <mdejong@users.sourceforge.net> - * win/tkWinWm.c (WinSetIcon): Don't check result - of SetClassLong() or SetClassLongPtr() since - it was generating an incorrect error and - the MSDN docs indicate that the result need - not be checked. + * win/tkWinWm.c (WinSetIcon): Don't check result of SetClassLong() or + SetClassLongPtr() since it was generating an incorrect error and the + MSDN docs indicate that the result need not be checked. 2005-12-09 Mo DeJong <mdejong@users.sourceforge.net> * win/configure: Regen. - * win/tcl.m4 (SC_CONFIG_CFLAGS): Define MACHINE - for gcc builds. The lack of a definition of this - variable in the manifest file was causing a - runtime error in wish built with gcc. + * win/tcl.m4 (SC_CONFIG_CFLAGS): Define MACHINE for gcc builds. The + lack of a definition of this variable in the manifest file was causing + a runtime error in wish built with gcc. 2005-12-09 Daniel Steffen <das@users.sourceforge.net> @@ -46,7 +48,7 @@ * win/Makefile.in: * win/makefile.vc: * win/tkWinTest.c: - + * generic/tkIntPlatDecls.h: * generic/tkStubInit.c: regen. @@ -88,10 +90,10 @@ 2005-12-05 Reinhard Max <max@suse.de> - * unix/tkUnixEvent.c (OpenIM): Added a workaround to allow at - least ASCII and the Compose key when typing into text and entry - widgets on a system that uses SCIM. This has to be taken out again - once the SCIM problems have been fixed. + * unix/tkUnixEvent.c (OpenIM): Added a workaround to allow at least + ASCII and the Compose key when typing into text and entry widgets on a + system that uses SCIM. This has to be taken out again once the SCIM + problems have been fixed. 2005-12-01 Daniel Steffen <das@users.sourceforge.net> @@ -114,8 +116,8 @@ * generic/tkImgGIF.c: cast calls to blockOut - * win/Makefile.in: place TCL_BIN_DIR first in PATH for targets to - get Tcl built dll first. + * win/Makefile.in: place TCL_BIN_DIR first in PATH for targets to get + Tcl built dll first. Add tkWinTest.obj to tk84.dll to handle some needed test functions being defined in stubs (TkplatformtestInit). @@ -139,12 +141,12 @@ * 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 + * 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. @@ -197,10 +199,9 @@ * macosx/Wish.xcode/default.pbxuser: * macosx/Wish.xcode/project.pbxproj: * macosx/Wish.xcodeproj/default.pbxuser (new): - * macosx/Wish.xcodeproj/project.pbxproj (new): 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/Wish.xcodeproj/project.pbxproj (new): 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): @@ -214,8 +215,8 @@ * unix/configure.in: * macosx/configure.ac (new): 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). + 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, diff --git a/generic/tkUndo.c b/generic/tkUndo.c index 76046f8..db6a5a8 100644 --- a/generic/tkUndo.c +++ b/generic/tkUndo.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: tkUndo.c,v 1.8 2005/11/17 16:21:56 dkf Exp $ + * RCS: @(#) $Id: tkUndo.c,v 1.9 2005/12/28 17:26:22 dkf Exp $ */ #include "tkUndo.h" @@ -373,12 +373,12 @@ TkUndoSetDepth( TkUndoRedoStack *stack, /* An Undo/Redo stack */ int maxdepth) /* The maximum stack depth */ { - TkUndoAtom *elem, *prevelem; - int sepNumber = 0; - stack->maxdepth = maxdepth; if (stack->maxdepth>0 && stack->depth>stack->maxdepth) { + TkUndoAtom *elem, *prevelem; + int sepNumber = 0; + /* * Maximum stack depth exceeded. We have to remove the last compound * elements on the stack. @@ -386,8 +386,8 @@ TkUndoSetDepth( elem = stack->undoStack; prevelem = NULL; - while (sepNumber <= stack->maxdepth) { - if (elem != NULL && elem->type == TK_UNDO_SEPARATOR) { + while ((elem != NULL) && (sepNumber <= stack->maxdepth)) { + if (elem->type == TK_UNDO_SEPARATOR) { sepNumber++; } prevelem = elem; @@ -400,6 +400,7 @@ TkUndoSetDepth( while (sub->next != NULL) { TkUndoSubAtom *next = sub->next; + if (sub->action != NULL) { Tcl_DecrRefCount(sub->action); } @@ -485,35 +486,9 @@ void TkUndoInsertUndoSeparator( TkUndoRedoStack *stack) { - /* - * TkUndoAtom * elem; - * TkUndoAtom * prevelem; - * int sepNumber = 0; - */ - if (TkUndoInsertSeparator(&stack->undoStack)) { stack->depth++; TkUndoSetDepth(stack, stack->maxdepth); -#ifdef OBSOLETE_OR_BUGGY_CODE - if (stack->maxdepth>0 && stack->depth>stack->maxdepth) { - elem = stack->undoStack; - prevelem = NULL; - while (sepNumber < stack->depth) { - if (elem != NULL && elem->type == TK_UNDO_SEPARATOR) { - sepNumber++; - } - prevelem = elem; - elem = elem->next; - } - prevelem->next = NULL; - while (elem) { - prevelem = elem; - elem = elem->next; - ckfree((char *) elem); - } - stack->depth; - } -#endif /* OBSOLETE_OR_BUGGY_CODE */ } } |