From c30d40b30f86963a0c36810efdcd76302cc7c5b3 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sat, 4 Aug 2012 14:30:13 +0000 Subject: Fixed [Bug 3554273]: Test textDisp-32.2 failed --- ChangeLog | 4 ++++ generic/tkTextTag.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index d356eee..5b0160d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-08-?? Francois Vogel + + * generic/tkTextTag.c: [Bug 3554273]: Test textDisp-32.2 failed + 2012-08-03 Francois Vogel * tests/bind.test: [Bug 3554081]: Test bind-22.10 failed diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c index 2df950a..5162e16 100644 --- a/generic/tkTextTag.c +++ b/generic/tkTextTag.c @@ -457,6 +457,11 @@ TkTextTagCmd( &tagPtr->elide) != TCL_OK) { return TCL_ERROR; } + /* Indices are potentially obsolete after changing -elide, + * especially those computed with "display" or "any" + * submodifier, therefore increase the epoch. + */ + textPtr->sharedTextPtr->stateEpoch++; } /* -- cgit v0.12 From 3938a19b4a11bdae6dd2549706c83f8cac1e8b94 Mon Sep 17 00:00:00 2001 From: stwo Date: Tue, 7 Aug 2012 06:52:58 +0000 Subject: Installer improvements, like [a3b936f0a1]. --- unix/Makefile.in | 53 ++--- unix/configure | 28 +-- unix/configure.in | 16 +- unix/install-sh | 580 ++++++++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 533 insertions(+), 144 deletions(-) mode change 100755 => 100644 unix/install-sh diff --git a/unix/Makefile.in b/unix/Makefile.in index 9c8082b..6047263 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -219,10 +219,11 @@ TKTEST_EXE = tktest@EXEEXT@ INSTALL_STRIP_PROGRAM = -s INSTALL_STRIP_LIBRARY = -S -x -INSTALL = @srcdir@/install-sh -c +INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c INSTALL_PROGRAM = ${INSTALL} INSTALL_LIBRARY = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_DATA_DIR = ${INSTALL} -d -m 755 # The symbol below provides support for dynamic loading and shared # libraries. See configure.in for a description of what it means. @@ -570,7 +571,6 @@ binaries: ${LIB_FILE} ${STUB_LIB_FILE} ${WISH_EXE} libraries: $(TOP_DIR)/doc/man.macros: - chmod +x $(UNIX_DIR)/install-sh $(INSTALL_DATA) @TCL_SRC_DIR@/doc/man.macros $(TOP_DIR)/doc/man.macros doc: $(TOP_DIR)/doc/man.macros @@ -709,14 +709,10 @@ install-binaries: $(TK_LIB_FILE) $(TK_STUB_LIB_FILE) ${WISH_EXE} do \ if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ - mkdir -p "$$i"; \ - chmod 755 "$$i"; \ + $(INSTALL_DATA_DIR) "$$i"; \ else true; \ fi; \ done; - @if test ! -x $(SRC_DIR)/install-sh; then \ - chmod +x $(SRC_DIR)/install-sh; \ - fi @if test "x$(TK_SHARED_BUILD)" = "x1"; then \ echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ @@ -761,15 +757,11 @@ install-libraries: libraries do \ if [ -n "$$i" -a ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ - mkdir -p "$$i"; \ - chmod 755 "$$i"; \ + $(INSTALL_DATA_DIR) "$$i"; \ else true; \ fi; \ done; - @if test ! -x $(SRC_DIR)/install-sh; then \ - chmod +x $(SRC_DIR)/install-sh; \ - fi - @echo "Installing header files"; + @echo "Installing header files to $(INCLUDE_INSTALL_DIR)/"; @for i in $(PUBLIC_HDRS); \ do \ $(INSTALL_DATA) $$i "$(INCLUDE_INSTALL_DIR)"; \ @@ -778,27 +770,27 @@ install-libraries: libraries do \ $(INSTALL_DATA) $$i "$(INCLUDE_INSTALL_DIR)/X11"; \ done; - @echo "Installing library files to $(SCRIPT_INSTALL_DIR)"; + @echo "Installing Tk library files to $(SCRIPT_INSTALL_DIR)/"; @for i in $(TOP_DIR)/library/*.tcl \ $(TOP_DIR)/library/tclIndex $(UNIX_DIR)/tkAppInit.c; \ do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \ done; - @echo "Installing library ttk directory"; + @echo "Installing Ttk library files to $(SCRIPT_INSTALL_DIR)/ttk/"; @for i in $(TOP_DIR)/library/ttk/*.tcl; \ do \ if [ -f $$i ] ; then \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/ttk"; \ fi; \ done; - @echo "Installing library images directory"; + @echo "Installing library image files to $(SCRIPT_INSTALL_DIR)/images/"; @for i in $(TOP_DIR)/library/images/*; \ do \ if [ -f $$i ] ; then \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/images"; \ fi; \ done; - @echo "Installing translation directory"; + @echo "Installing message catalog files to $(SCRIPT_INSTALL_DIR)/msgs/"; @for i in $(TOP_DIR)/library/msgs/*.msg; \ do \ if [ -f $$i ] ; then \ @@ -811,12 +803,11 @@ install-demos: do \ if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ - mkdir -p "$$i"; \ - chmod 755 "$$i"; \ + $(INSTALL_DATA_DIR) "$$i"; \ else true; \ fi; \ done; - @echo "Installing demos to $(DEMO_INSTALL_DIR)/"; + @echo "Installing demo files to $(DEMO_INSTALL_DIR)/"; @for i in $(TOP_DIR)/library/demos/*; \ do \ if [ -f $$i ] ; then \ @@ -832,7 +823,7 @@ install-demos: chmod 755 "$(DEMO_INSTALL_DIR)/$$i"; \ fi; \ done; - @echo "Installing demo images"; + @echo "Installing demo image files to $(DEMO_INSTALL_DIR)/images/"; @for i in $(TOP_DIR)/library/demos/images/*; \ do \ if [ -f $$i ] ; then \ @@ -845,22 +836,19 @@ install-doc: do \ if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ - mkdir -p "$$i"; \ - chmod 755 "$$i"; \ + $(INSTALL_DATA_DIR) "$$i"; \ else true; \ fi; \ done; - @echo "Installing and cross-linking top-level (.1) docs"; + @echo "Installing and cross-linking top-level (.1) docs to $(MAN1_INSTALL_DIR)/"; @for i in $(TOP_DIR)/doc/*.1; do \ $(SHELL) $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN1_INSTALL_DIR)"; \ done - - @echo "Installing and cross-linking C API (.3) docs"; + @echo "Installing and cross-linking C API (.3) docs to $(MAN3_INSTALL_DIR)/"; @for i in $(TOP_DIR)/doc/*.3; do \ $(SHELL) $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MAN3_INSTALL_DIR)"; \ done - - @echo "Installing and cross-linking command (.n) docs"; + @echo "Installing and cross-linking command (.n) docs to $(MANN_INSTALL_DIR)/"; @for i in $(TOP_DIR)/doc/*.n; do \ $(SHELL) $(UNIX_DIR)/installManPage $(MAN_FLAGS) $$i "$(MANN_INSTALL_DIR)"; \ done @@ -871,15 +859,11 @@ install-private-headers: libraries do \ if [ ! -d "$$i" ] ; then \ echo "Making directory $$i"; \ - mkdir -p "$$i"; \ - chmod 755 "$$i"; \ + $(INSTALL_DATA_DIR) "$$i"; \ else true; \ fi; \ done; - @if test ! -x $(SRC_DIR)/install-sh; then \ - chmod +x $(SRC_DIR)/install-sh; \ - fi - @echo "Installing private header files"; + @echo "Installing private header files to $(PRIVATE_INCLUDE_INSTALL_DIR)/"; @for i in $(PRIVATE_HDRS); \ do \ $(INSTALL_DATA) $$i "$(PRIVATE_INCLUDE_INSTALL_DIR)"; \ @@ -1538,7 +1522,6 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tkConfig.h.in $(MAC_OSX_DIR)/configure $(UNIX_DIR)/README $(UNIX_DIR)/installManPage \ $(UNIX_DIR)/tkConfig.h.in $(DISTDIR)/unix chmod 775 $(DISTDIR)/unix/configure $(DISTDIR)/unix/configure.in - chmod +x $(DISTDIR)/unix/install-sh mkdir $(DISTDIR)/bitmaps @(cd $(TOP_DIR); for i in bitmaps/* ; do \ if [ -f $$i ] ; then \ diff --git a/unix/configure b/unix/configure index 93eceb5..3e85092 100755 --- a/unix/configure +++ b/unix/configure @@ -10106,7 +10106,7 @@ ac_x_header_dirs=' /usr/openwin/share/include' if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. + # Guess where to find include files, by looking for Intrinsic.h. # First, try using that file with no special directory specified. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -10114,7 +10114,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 @@ -10141,7 +10141,7 @@ else sed 's/^/| /' conftest.$ac_ext >&5 for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then + if test -r "$ac_dir/X11/Intrinsic.h"; then ac_x_includes=$ac_dir break fi @@ -10155,18 +10155,18 @@ if test "$ac_x_libraries" = no; then # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" + LIBS="-lXt $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { -XrmInitialize () +XtMalloc (0) ; return 0; } @@ -11364,15 +11364,15 @@ _ACEOF HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk" EXTRA_INSTALL="install-private-headers html-tk" EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TkTOC.html' - EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' + EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' if test $tk_aqua = yes; then - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${TK_RSRC_FILE} to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "${TK_RSRC_FILE}" "$(LIB_INSTALL_DIR)/Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'" && mkdir -p "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${TK_RSRC_FILE} to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "${TK_RSRC_FILE}" "$(LIB_INSTALL_DIR)/Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'/" && $(INSTALL_DATA_DIR) "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"' bindir="${libdir}/Resources/Wish.app/Contents/MacOS" - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/.." && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources" && mkdir -p "$(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/../" && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA_DIR) "$(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"' fi EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tk.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tkConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' # Don't use AC_DEFINE for the following as the framework version define @@ -11404,7 +11404,7 @@ if test $tk_aqua = yes; then REZ=/Developer/Tools/Rez REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro' if test "$SHARED_BUILD" = 0; then - EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"' + EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"' TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" WISH_BUILD_LIB_SPEC="$WISH_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}" diff --git a/unix/configure.in b/unix/configure.in index 059bb07..d700a15 100644 --- a/unix/configure.in +++ b/unix/configure.in @@ -662,15 +662,15 @@ if test "$FRAMEWORK_BUILD" = "1" ; then HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk" EXTRA_INSTALL="install-private-headers html-tk" EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TkTOC.html' - EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' + EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' if test $tk_aqua = yes; then - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${TK_RSRC_FILE} to $(LIB_INSTALL_DIR)/Resources" && mkdir -p "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "${TK_RSRC_FILE}" "$(LIB_INSTALL_DIR)/Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'" && mkdir -p "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${TK_RSRC_FILE} to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) "${TK_RSRC_FILE}" "$(LIB_INSTALL_DIR)/Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'/" && $(INSTALL_DATA_DIR) "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"' bindir="${libdir}/Resources/Wish.app/Contents/MacOS" - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/.." && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources" && mkdir -p "$(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/../" && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA_DIR) "$(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.icns" "$(BIN_INSTALL_DIR)/../Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing ${WISH_RSRC_FILE} to $(BIN_INSTALL_DIR)/../Resources/" && $(INSTALL_DATA) "${WISH_RSRC_FILE}" "$(BIN_INSTALL_DIR)/../Resources"' fi EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tk.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tkConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' # Don't use AC_DEFINE for the following as the framework version define @@ -702,7 +702,7 @@ if test $tk_aqua = yes; then REZ=/Developer/Tools/Rez REZ_FLAGS='-d "SystemSevenOrLater=1" -useDF -ro' if test "$SHARED_BUILD" = 0; then - EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"' + EXTRA_INSTALL_BINARIES='@echo "Installing $(TK_RSRC_FILE) to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA) $(TK_RSRC_FILE) "$(LIB_INSTALL_DIR)"' TK_BUILD_LIB_SPEC="$TK_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" WISH_BUILD_LIB_SPEC="$WISH_BUILD_LIB_SPEC -sectcreate __TEXT __tk_rsrc `pwd | sed -e 's/ /\\\\ /g'`/\${TK_RSRC_FILE}" TK_LIB_SPEC="$TK_LIB_SPEC -sectcreate __TEXT __tk_rsrc ${libdir}/\${TK_RSRC_FILE}" diff --git a/unix/install-sh b/unix/install-sh old mode 100755 new mode 100644 index 1572b93..7c34c3f --- a/unix/install-sh +++ b/unix/install-sh @@ -1,122 +1,528 @@ #!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2011-04-20.01; # UTC +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. # -# install - install a program, script, or datafile -# This comes from X11R5; it is not part of GNU. +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. -# +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi + +# Put in absolute file names if you don't have them in your path; +# or use environment vars. +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} -# put in absolute paths if you don't have them in your path; or use env. vars. +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" +posix_mkdir= -instcmd="$mvprog" -chmodcmd="" -chowncmd="" -chgrpcmd="" -stripcmd="" +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -S) stripcmd="$stripprog $2" - shift - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - dst=$1 - fi - shift - continue;; - esac +stripcmd= + +src= +dst= +dir_arg= +dst_arg= + +copy_on_change=false +no_target_directory= + +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... + +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. + +Options: + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -S $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" + +while test $# -ne 0; do + case $1 in + -c) ;; + + -C) copy_on_change=true;; + + -d) dir_arg=true;; + + -g) chgrpcmd="$chgrpprog $2" + shift;; + + --help) echo "$usage"; exit $?;; + + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -S) stripcmd="$stripprog $2" + shift;; + + -t) dst_arg=$2 + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift done -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done fi -if [ x"$dst" = x ] -then - echo "install: no destination specified" - exit 1 +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 fi +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; -if [ -d "$dst" ] -then - dst="$dst/`basename "$src"`" + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac fi -# Make a temp file name in the proper directory. +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 -dstdir="`dirname "$dst"`" -dsttmp="$dstdir"/#inst.$$# + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS -# Move or copy the file name to the temp name + prefixes= -$doit $instcmd "$src" "$dsttmp" + for d + do + test -z "$d" && continue -# and set any options; do chmod last to preserve setuid bits + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done -if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; fi -if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; fi -if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; fi -if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; fi + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi -# Now rename the file to the real destination. + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else -$doit $rmcmd "$dst" -$doit $mvcmd "$dsttmp" "$dst" + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done -exit 0 +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: -- cgit v0.12 From 6a53e1bcab0c83c50e6a686c0ac485687ff29b8f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Aug 2012 07:25:45 +0000 Subject: partly backport from 8.6 --- generic/ttk/ttkLabel.c | 4 +++ library/demos/mclist.tcl | 17 +++++++++++- library/demos/toolbar.tcl | 68 +++++++++++++++++++---------------------------- 3 files changed, 48 insertions(+), 41 deletions(-) diff --git a/generic/ttk/ttkLabel.c b/generic/ttk/ttkLabel.c index 52782ea..6dd1a9e 100644 --- a/generic/ttk/ttkLabel.c +++ b/generic/ttk/ttkLabel.c @@ -344,10 +344,14 @@ static void ImageDraw( * stipple the image. * @@@ Possibly: Don't do disabled-stippling at all; * @@@ it's ugly and out of fashion. + * Do not stipple at all under Aqua, just draw the image: it shows up + * as a white rectangle otherwise. */ if (state & TTK_STATE_DISABLED) { if (TtkSelectImage(image->imageSpec, 0ul) == image->tkimg) { +#ifndef MAC_OSX_TK StippleOver(image, tkwin, d, b.x,b.y); +#endif } } } diff --git a/library/demos/mclist.tcl b/library/demos/mclist.tcl index d1d3f47..21dcf29 100644 --- a/library/demos/mclist.tcl +++ b/library/demos/mclist.tcl @@ -77,6 +77,16 @@ foreach {country capital currency} $data { ## Code to do the sorting of the tree contents when clicked on proc SortBy {tree col direction} { + # Determine currently sorted column and its sort direction + foreach c {country capital currency} { + set s [$tree heading $c state] + if {("selected" in $s || "alternate" in $s) && $col ne $c} { + # Sorted column has changed + $tree heading $c state {!selected !alternate !user1} + set direction [expr {"alternate" in $s}] + } + } + # Build something we can sort set data {} foreach row [$tree children {}] { @@ -92,5 +102,10 @@ proc SortBy {tree col direction} { } # Switch the heading so that it will sort in the opposite direction - $tree heading $col -command [list SortBy $tree $col [expr {!$direction}]] + $tree heading $col -command [list SortBy $tree $col [expr {!$direction}]] \ + state [expr {$direction?"!selected alternate":"selected !alternate"}] + if {[tk windowingsystem] eq "aqua"} { + # Aqua theme displays native sort arrows when user1 state is set + $tree heading $col state "user1" + } } diff --git a/library/demos/toolbar.tcl b/library/demos/toolbar.tcl index 541e8ba..0ae4669 100644 --- a/library/demos/toolbar.tcl +++ b/library/demos/toolbar.tcl @@ -7,7 +7,6 @@ if {![info exists widgetDemo]} { } package require Tk -package require Ttk set w .toolbar destroy $w @@ -16,57 +15,46 @@ wm title $w "Toolbar Demonstration" wm iconname $w "toolbar" positionWindow $w -if {[tk windowingsystem] ne "aqua"} { - ttk::label $w.msg -wraplength 4i -text "This is a demonstration of how to do\ - a toolbar that is styled correctly and which can be torn off. The\ - buttons are configured to be \u201Ctoolbar style\u201D buttons by\ - telling them that they are to use the Toolbutton style. At the left\ - end of the toolbar is a simple marker that the cursor changes to a\ - movement icon over; drag that away from the toolbar to tear off the\ - whole toolbar into a separate toplevel widget. When the dragged-off\ - toolbar is no longer needed, just close it like any normal toplevel\ - and it will reattach to the window it was torn off from." -} else { ttk::label $w.msg -wraplength 4i -text "This is a demonstration of how to do\ - a toolbar that is styled correctly. The buttons are configured to\ - be \u201Ctoolbar style\u201D buttons by telling them that they are\ - to use the Toolbutton style." -} + a toolbar that is styled correctly and which can be torn off. The\ + buttons are configured to be \u201Ctoolbar style\u201D buttons by\ + telling them that they are to use the Toolbutton style. At the left\ + end of the toolbar is a simple marker that the cursor changes to a\ + movement icon over; drag that away from the toolbar to tear off the\ + whole toolbar into a separate toplevel widget. When the dragged-off\ + toolbar is no longer needed, just close it like any normal toplevel\ + and it will reattach to the window it was torn off from." ## Set up the toolbar hull set t [frame $w.toolbar] ;# Must be a frame! ttk::separator $w.sep ttk::frame $t.tearoff -cursor fleur -if {[tk windowingsystem] ne "aqua"} { - ttk::separator $t.tearoff.to -orient vertical - ttk::separator $t.tearoff.to2 -orient vertical - pack $t.tearoff.to -fill y -expand 1 -padx 2 -side left - pack $t.tearoff.to2 -fill y -expand 1 -side left -} +ttk::separator $t.tearoff.to -orient vertical +ttk::separator $t.tearoff.to2 -orient vertical +pack $t.tearoff.to -fill y -expand 1 -padx 2 -side left +pack $t.tearoff.to2 -fill y -expand 1 -side left ttk::frame $t.contents grid $t.tearoff $t.contents -sticky nsew grid columnconfigure $t $t.contents -weight 1 grid columnconfigure $t.contents 1000 -weight 1 -if {[tk windowingsystem] ne "aqua"} { - ## Bindings so that the toolbar can be torn off and reattached - bind $t.tearoff [list tearoff $t %X %Y] - bind $t.tearoff.to [list tearoff $t %X %Y] - bind $t.tearoff.to2 [list tearoff $t %X %Y] - proc tearoff {w x y} { - if {[string match $w* [winfo containing $x $y]]} { - return - } - grid remove $w - grid remove $w.tearoff - wm manage $w - wm protocol $w WM_DELETE_WINDOW [list untearoff $w] - } - proc untearoff {w} { - wm forget $w - grid $w.tearoff - grid $w +## Bindings so that the toolbar can be torn off and reattached +bind $t.tearoff [list tearoff $t %X %Y] +bind $t.tearoff.to [list tearoff $t %X %Y] +bind $t.tearoff.to2 [list tearoff $t %X %Y] +proc tearoff {w x y} { + if {[string match $w* [winfo containing $x $y]]} { + return } + grid remove $w + grid remove $w.tearoff + wm manage $w + wm protocol $w WM_DELETE_WINDOW [list untearoff $w] +} +proc untearoff {w} { + wm forget $w + grid $w.tearoff + grid $w } ## Toolbar contents -- cgit v0.12 From b33639f20e412831ed8724517ba70b2cdab6be57 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Aug 2012 10:23:56 +0000 Subject: it's no longer necessary to set _USE_32BIT_TIME_T in Tk --- generic/tkMain.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/generic/tkMain.c b/generic/tkMain.c index fddad3a..706f444 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -29,11 +29,6 @@ # endif #endif -#ifndef _WIN64 -/* See [Bug 2935503]: file mtime sets wrong time */ -# define _USE_32BIT_TIME_T -#endif - #include "tkInt.h" #include #include -- cgit v0.12 From c022d991663c8b76a27664090d92df0ad1a01dbb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Aug 2012 11:03:00 +0000 Subject: [Bug 3555644]: Better use of virtual events. --- ChangeLog | 4 ++++ library/console.tcl | 6 ++---- library/demos/entry3.tcl | 4 ++-- library/entry.tcl | 10 ---------- library/iconlist.tcl | 4 ++-- library/listbox.tcl | 12 ++++++------ library/menu.tcl | 4 ++-- library/scale.tcl | 12 ++++++------ library/scrlbar.tcl | 12 ++++++------ library/spinbox.tcl | 10 ---------- library/text.tcl | 24 +----------------------- library/tk.tcl | 12 ++++++------ library/ttk/entry.tcl | 2 -- library/ttk/scale.tcl | 15 +++++++++------ 14 files changed, 46 insertions(+), 85 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a98897..3b3e1aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-08-?? Jan Nijtmans + + * library/*.tcl: [Bug 3555644]: Better use of virtual events. + 2012-07-31 Donal K. Fellows * unix/tkUnixKey.c (TkpSetKeycodeAndState, TkpInitKeymapInfo) diff --git a/library/console.tcl b/library/console.tcl index e6b7ce9..37832f2 100644 --- a/library/console.tcl +++ b/library/console.tcl @@ -499,18 +499,16 @@ proc ::tk::ConsoleBind {w} { } bind Console [bind Console ] - bind Console { + bind Console <> { if {[%W compare insert < promptEnd]} { tk::TextSetCursor %W {insert linestart} } else { tk::TextSetCursor %W promptEnd } } - bind Console [bind Console ] - bind Console { + bind Console <> { tk::TextSetCursor %W {insert lineend} } - bind Console [bind Console ] bind Console { if {[%W compare insert < promptEnd]} { break diff --git a/library/demos/entry3.tcl b/library/demos/entry3.tcl index 3d76c2e..d4435c6 100644 --- a/library/demos/entry3.tcl +++ b/library/demos/entry3.tcl @@ -169,8 +169,8 @@ bind $w.l3.e { after idle {%W selection clear} } } -bind $w.l3.e {phoneSkipLeft %W} -bind $w.l3.e {phoneSkipRight %W} +bind $w.l3.e <> {phoneSkipLeft %W} +bind $w.l3.e <> {phoneSkipRight %W} pack $w.l3.e -fill x -expand 1 -padx 1m -pady 1m labelframe $w.l4 -text "Password Entry" diff --git a/library/entry.tcl b/library/entry.tcl index de6c463..5dbf063 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -227,11 +227,6 @@ if {[tk windowingsystem] ne "win32"} { # Additional emacs-like bindings: -bind Entry { - if {!$tk_strictMotif} { - tk::EntrySetCursor %W 0 - } -} bind Entry { if {!$tk_strictMotif} { tk::EntrySetCursor %W [expr {[%W index insert] - 1}] @@ -242,11 +237,6 @@ bind Entry { %W delete insert } } -bind Entry { - if {!$tk_strictMotif} { - tk::EntrySetCursor %W end - } -} bind Entry { if {!$tk_strictMotif} { tk::EntrySetCursor %W [expr {[%W index insert] + 1}] diff --git a/library/iconlist.tcl b/library/iconlist.tcl index fc8128d..15a4f53 100644 --- a/library/iconlist.tcl +++ b/library/iconlist.tcl @@ -446,8 +446,8 @@ package require Tk 8.6 bind $canvas [namespace code {my UpDown -1}] bind $canvas [namespace code {my UpDown 1}] - bind $canvas [namespace code {my LeftRight -1}] - bind $canvas [namespace code {my LeftRight 1}] + bind $canvas <> [namespace code {my LeftRight -1}] + bind $canvas <> [namespace code {my LeftRight 1}] bind $canvas [namespace code {my ReturnKey}] bind $canvas [namespace code {my KeyPress %A}] bind $canvas ";" diff --git a/library/listbox.tcl b/library/listbox.tcl index 99047f4..eae513a 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -81,16 +81,16 @@ bind Listbox { bind Listbox { tk::ListboxExtendUpDown %W 1 } -bind Listbox { +bind Listbox <> { %W xview scroll -1 units } -bind Listbox { +bind Listbox <> { %W xview scroll -1 pages } -bind Listbox { +bind Listbox <> { %W xview scroll 1 units } -bind Listbox { +bind Listbox <> { %W xview scroll 1 pages } bind Listbox { @@ -107,10 +107,10 @@ bind Listbox { bind Listbox { %W xview scroll 1 pages } -bind Listbox { +bind Listbox <> { %W xview moveto 0 } -bind Listbox { +bind Listbox <> { %W xview moveto 1 } bind Listbox { diff --git a/library/menu.tcl b/library/menu.tcl index cc57532..8261e82 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -149,10 +149,10 @@ bind Menu { bind Menu { tk::MenuEscape %W } -bind Menu { +bind Menu <> { tk::MenuLeftArrow %W } -bind Menu { +bind Menu <> { tk::MenuRightArrow %W } bind Menu { diff --git a/library/scale.tcl b/library/scale.tcl index b4da824..72a254a 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -77,10 +77,10 @@ bind Scale { bind Scale { tk::ScaleIncrement %W down little noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W up little noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W down little noRepeat } bind Scale { @@ -89,16 +89,16 @@ bind Scale { bind Scale { tk::ScaleIncrement %W down big noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W up big noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W down big noRepeat } -bind Scale { +bind Scale <> { %W set [%W cget -from] } -bind Scale { +bind Scale <> { %W set [%W cget -to] } diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 9277160..4a16f0b 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -103,16 +103,16 @@ bind Scrollbar { bind Scrollbar { tk::ScrollByPages %W v 1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByUnits %W h -1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByUnits %W h 1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByPages %W h -1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByPages %W h 1 } bind Scrollbar { @@ -121,10 +121,10 @@ bind Scrollbar { bind Scrollbar { tk::ScrollByPages %W hv 1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollToPos %W 0 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollToPos %W 1 } } diff --git a/library/spinbox.tcl b/library/spinbox.tcl index 20b477a..d5b4d79 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -231,11 +231,6 @@ if {[tk windowingsystem] ne "win32"} { # Additional emacs-like bindings: -bind Spinbox { - if {!$tk_strictMotif} { - ::tk::EntrySetCursor %W 0 - } -} bind Spinbox { if {!$tk_strictMotif} { ::tk::EntrySetCursor %W [expr {[%W index insert] - 1}] @@ -246,11 +241,6 @@ bind Spinbox { %W delete insert } } -bind Spinbox { - if {!$tk_strictMotif} { - ::tk::EntrySetCursor %W end - } -} bind Spinbox { if {!$tk_strictMotif} { ::tk::EntrySetCursor %W [expr {[%W index insert] + 1}] diff --git a/library/text.tcl b/library/text.tcl index 331d1b4..a71150a 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -287,11 +287,6 @@ if {[tk windowingsystem] eq "aqua"} { # Additional emacs-like bindings: -bind Text { - if {!$tk_strictMotif} { - tk::TextSetCursor %W {insert display linestart} - } -} bind Text { if {!$tk_strictMotif} { tk::TextSetCursor %W insert-1displayindices @@ -302,11 +297,6 @@ bind Text { %W delete insert } } -bind Text { - if {!$tk_strictMotif} { - tk::TextSetCursor %W {insert display lineend} - } -} bind Text { if {!$tk_strictMotif} { tk::TextSetCursor %W insert+1displayindices @@ -390,31 +380,19 @@ bind Text { # Macintosh only bindings: if {[tk windowingsystem] eq "aqua"} { -bind Text { - tk::TextSetCursor %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord] -} -bind Text { - tk::TextSetCursor %W [tk::TextNextWord %W insert] -} bind Text { tk::TextSetCursor %W [tk::TextPrevPara %W insert] } bind Text { tk::TextSetCursor %W [tk::TextNextPara %W insert] } -bind Text { - tk::TextKeySelect %W [tk::TextPrevPos %W insert tcl_startOfPreviousWord] -} -bind Text { - tk::TextKeySelect %W [tk::TextNextWord %W insert] -} bind Text { tk::TextKeySelect %W [tk::TextPrevPara %W insert] } bind Text { tk::TextKeySelect %W [tk::TextNextPara %W insert] } -bind Text { +bind Text <> { tk::TextScrollPages %W 1 } diff --git a/library/tk.tcl b/library/tk.tcl index 928fc2e..33671ed 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -377,9 +377,9 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> # Some OS's define a goofy (as in, not ) keysym that is @@ -418,9 +418,9 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> } "aqua" { @@ -447,8 +447,8 @@ switch -exact -- [tk windowingsystem] { event add <> # Not official, but logical extensions of above. Also derived from # bindings present in MS Word on OSX. - event add <> - event add <> + event add <> + event add <> } } diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index a27921a..9e0d6e1 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -141,10 +141,8 @@ bind TEntry {# nothing} ## Additional emacs-like bindings: # -bind TEntry { ttk::entry::Move %W home } bind TEntry { ttk::entry::Move %W prevchar } bind TEntry { ttk::entry::Delete %W } -bind TEntry { ttk::entry::Move %W end } bind TEntry { ttk::entry::Move %W nextchar } bind TEntry { ttk::entry::Backspace %W } bind TEntry { %W delete insert end } diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl index 23d08ed..f270697 100644 --- a/library/ttk/scale.tcl +++ b/library/ttk/scale.tcl @@ -21,16 +21,19 @@ bind TScale { ttk::scale::Jump %W %x %y } bind TScale { ttk::scale::Drag %W %x %y } bind TScale { ttk::scale::Release %W %x %y } -bind TScale { ttk::scale::Increment %W -1 } +## Keyboard navigation bindings: +# +bind TScale <> { %W set [%W cget -from] } +bind TScale <> { %W set [%W cget -to] } + +bind TScale <> { ttk::scale::Increment %W -1 } bind TScale { ttk::scale::Increment %W -1 } -bind TScale { ttk::scale::Increment %W 1 } +bind TScale <> { ttk::scale::Increment %W 1 } bind TScale { ttk::scale::Increment %W 1 } -bind TScale { ttk::scale::Increment %W -10 } +bind TScale <> { ttk::scale::Increment %W -10 } bind TScale { ttk::scale::Increment %W -10 } -bind TScale { ttk::scale::Increment %W 10 } +bind TScale <> { ttk::scale::Increment %W 10 } bind TScale { ttk::scale::Increment %W 10 } -bind TScale { %W set [%W cget -from] } -bind TScale { %W set [%W cget -to] } proc ttk::scale::Press {w x y} { variable State -- cgit v0.12 From 37ceb5fe2eba6473a2fbdb5407e449ef96345a43 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 9 Aug 2012 14:59:12 +0000 Subject: 8 new virtual events (doc not updated yet) --- library/demos/items.tcl | 2 +- library/entry.tcl | 14 ++------------ library/iconlist.tcl | 4 ++-- library/listbox.tcl | 8 ++++---- library/menu.tcl | 4 ++-- library/scale.tcl | 8 ++++---- library/scrlbar.tcl | 8 ++++---- library/spinbox.tcl | 14 ++------------ library/text.tcl | 48 ++++++++---------------------------------------- library/tk.tcl | 28 ++++++++++++++++++++++++++++ library/ttk/entry.tcl | 4 ++-- library/ttk/scale.tcl | 8 ++++---- 12 files changed, 63 insertions(+), 87 deletions(-) diff --git a/library/demos/items.tcl b/library/demos/items.tcl index 31a1570..177e9a4 100644 --- a/library/demos/items.tcl +++ b/library/demos/items.tcl @@ -173,7 +173,7 @@ bind $c <2> "$c scan mark %x %y" bind $c "$c scan dragto %x %y" bind $c <3> "itemMark $c %x %y" bind $c "itemStroke $c %x %y" -bind $c "itemsUnderArea $c" +bind $c <> "itemsUnderArea $c" bind $c <1> "itemStartDrag $c %x %y" bind $c "itemDrag $c %x %y" diff --git a/library/entry.tcl b/library/entry.tcl index 5dbf063..026363c 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -214,8 +214,8 @@ if {[tk windowingsystem] eq "aqua"} { bind Entry {# nothing} } # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] -bind Entry {# nothing} -bind Entry {# nothing} +bind Entry <> {# nothing} +bind Entry <> {# nothing} # On Windows, paste is done using Shift-Insert. Shift-Insert already # generates the <> event, so we don't need to do anything here. @@ -227,21 +227,11 @@ if {[tk windowingsystem] ne "win32"} { # Additional emacs-like bindings: -bind Entry { - if {!$tk_strictMotif} { - tk::EntrySetCursor %W [expr {[%W index insert] - 1}] - } -} bind Entry { if {!$tk_strictMotif} { %W delete insert } } -bind Entry { - if {!$tk_strictMotif} { - tk::EntrySetCursor %W [expr {[%W index insert] + 1}] - } -} bind Entry { if {!$tk_strictMotif} { tk::EntryBackspace %W diff --git a/library/iconlist.tcl b/library/iconlist.tcl index 15a4f53..ce1aae2 100644 --- a/library/iconlist.tcl +++ b/library/iconlist.tcl @@ -444,8 +444,8 @@ package require Tk 8.6 bind $canvas {;} bind $canvas [namespace code {my ShiftMotion1 %x %y}] - bind $canvas [namespace code {my UpDown -1}] - bind $canvas [namespace code {my UpDown 1}] + bind $canvas <> [namespace code {my UpDown -1}] + bind $canvas <> [namespace code {my UpDown 1}] bind $canvas <> [namespace code {my LeftRight -1}] bind $canvas <> [namespace code {my LeftRight 1}] bind $canvas [namespace code {my ReturnKey}] diff --git a/library/listbox.tcl b/library/listbox.tcl index eae513a..2715385 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -69,16 +69,16 @@ bind Listbox { tk::CancelRepeat } -bind Listbox { +bind Listbox <> { tk::ListboxUpDown %W -1 } -bind Listbox { +bind Listbox <> { tk::ListboxExtendUpDown %W -1 } -bind Listbox { +bind Listbox <> { tk::ListboxUpDown %W 1 } -bind Listbox { +bind Listbox <> { tk::ListboxExtendUpDown %W 1 } bind Listbox <> { diff --git a/library/menu.tcl b/library/menu.tcl index 8261e82..a51c96f 100644 --- a/library/menu.tcl +++ b/library/menu.tcl @@ -155,10 +155,10 @@ bind Menu <> { bind Menu <> { tk::MenuRightArrow %W } -bind Menu { +bind Menu <> { tk::MenuUpArrow %W } -bind Menu { +bind Menu <> { tk::MenuDownArrow %W } bind Menu { diff --git a/library/scale.tcl b/library/scale.tcl index 72a254a..d9e7d27 100644 --- a/library/scale.tcl +++ b/library/scale.tcl @@ -71,10 +71,10 @@ if {[tk windowingsystem] eq "win32"} { bind Scale { tk::ScaleControlPress %W %x %y } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W up little noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W down little noRepeat } bind Scale <> { @@ -83,10 +83,10 @@ bind Scale <> { bind Scale <> { tk::ScaleIncrement %W down little noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W up big noRepeat } -bind Scale { +bind Scale <> { tk::ScaleIncrement %W down big noRepeat } bind Scale <> { diff --git a/library/scrlbar.tcl b/library/scrlbar.tcl index 4a16f0b..1f8c7d2 100644 --- a/library/scrlbar.tcl +++ b/library/scrlbar.tcl @@ -91,16 +91,16 @@ bind Scrollbar { tk::ScrollTopBottom %W %x %y } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByUnits %W v -1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByUnits %W v 1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByPages %W v -1 } -bind Scrollbar { +bind Scrollbar <> { tk::ScrollByPages %W v 1 } bind Scrollbar <> { diff --git a/library/spinbox.tcl b/library/spinbox.tcl index d5b4d79..54d8fe6 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -120,10 +120,10 @@ bind Spinbox { %W icursor @%x } -bind Spinbox { +bind Spinbox <> { %W invoke buttonup } -bind Spinbox { +bind Spinbox <> { %W invoke buttondown } @@ -231,21 +231,11 @@ if {[tk windowingsystem] ne "win32"} { # Additional emacs-like bindings: -bind Spinbox { - if {!$tk_strictMotif} { - ::tk::EntrySetCursor %W [expr {[%W index insert] - 1}] - } -} bind Spinbox { if {!$tk_strictMotif} { %W delete insert } } -bind Spinbox { - if {!$tk_strictMotif} { - ::tk::EntrySetCursor %W [expr {[%W index insert] + 1}] - } -} bind Spinbox { if {!$tk_strictMotif} { ::tk::EntryBackspace %W diff --git a/library/text.tcl b/library/text.tcl index a71150a..94bb223 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -92,10 +92,10 @@ bind Text <> { bind Text <> { tk::TextSetCursor %W insert+1displayindices } -bind Text { +bind Text <> { tk::TextSetCursor %W [tk::TextUpDownLine %W -1] } -bind Text { +bind Text <> { tk::TextSetCursor %W [tk::TextUpDownLine %W 1] } bind Text <> { @@ -104,10 +104,10 @@ bind Text <> { bind Text <> { tk::TextKeySelect %W [%W index {insert + 1displayindices}] } -bind Text { +bind Text <> { tk::TextKeySelect %W [tk::TextUpDownLine %W -1] } -bind Text { +bind Text <> { tk::TextKeySelect %W [tk::TextUpDownLine %W 1] } bind Text <> { @@ -116,10 +116,10 @@ bind Text <> { bind Text <> { tk::TextSetCursor %W [tk::TextNextWord %W insert] } -bind Text { +bind Text <> { tk::TextSetCursor %W [tk::TextPrevPara %W insert] } -bind Text { +bind Text <> { tk::TextSetCursor %W [tk::TextNextPara %W insert] } bind Text <> { @@ -128,10 +128,10 @@ bind Text <> { bind Text <> { tk::TextKeySelect %W [tk::TextNextWord %W insert] } -bind Text { +bind Text <> { tk::TextKeySelect %W [tk::TextPrevPara %W insert] } -bind Text { +bind Text <> { tk::TextKeySelect %W [tk::TextNextPara %W insert] } bind Text { @@ -287,21 +287,11 @@ if {[tk windowingsystem] eq "aqua"} { # Additional emacs-like bindings: -bind Text { - if {!$tk_strictMotif} { - tk::TextSetCursor %W insert-1displayindices - } -} bind Text { if {!$tk_strictMotif && [%W compare end != insert+1c]} { %W delete insert } } -bind Text { - if {!$tk_strictMotif} { - tk::TextSetCursor %W insert+1displayindices - } -} bind Text { if {!$tk_strictMotif && [%W compare end != insert+1c]} { if {[%W compare insert == {insert lineend}]} { @@ -311,22 +301,12 @@ bind Text { } } } -bind Text { - if {!$tk_strictMotif} { - tk::TextSetCursor %W [tk::TextUpDownLine %W 1] - } -} bind Text { if {!$tk_strictMotif} { %W insert insert \n %W mark set insert insert-1c } } -bind Text { - if {!$tk_strictMotif} { - tk::TextSetCursor %W [tk::TextUpDownLine %W -1] - } -} bind Text { if {!$tk_strictMotif} { tk::TextTranspose %W @@ -380,18 +360,6 @@ bind Text { # Macintosh only bindings: if {[tk windowingsystem] eq "aqua"} { -bind Text { - tk::TextSetCursor %W [tk::TextPrevPara %W insert] -} -bind Text { - tk::TextSetCursor %W [tk::TextNextPara %W insert] -} -bind Text { - tk::TextKeySelect %W [tk::TextPrevPara %W insert] -} -bind Text { - tk::TextKeySelect %W [tk::TextNextPara %W insert] -} bind Text <> { tk::TextScrollPages %W 1 } diff --git a/library/tk.tcl b/library/tk.tcl index 33671ed..b810dc6 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -311,6 +311,10 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} { event $op <> event $op <> event $op <> + event $op <> + event $op <> + event $op <> + event $op <> } #---------------------------------------------------------------------- @@ -381,6 +385,14 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> # Some OS's define a goofy (as in, not ) keysym that is # returned when the user presses . In order for tab @@ -422,6 +434,14 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> } "aqua" { event add <> @@ -449,6 +469,14 @@ switch -exact -- [tk windowingsystem] { # bindings present in MS Word on OSX. event add <> event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> } } diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index 9e0d6e1..dc835e9 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -136,8 +136,8 @@ if {[tk windowingsystem] eq "aqua"} { bind TEntry {# nothing} } # Tk-on-Cocoa generates characters for these two keys. [Bug 2971663] -bind TEntry {# nothing} -bind TEntry {# nothing} +bind TEntry <> {# nothing} +bind TEntry <> {# nothing} ## Additional emacs-like bindings: # diff --git a/library/ttk/scale.tcl b/library/ttk/scale.tcl index f270697..69b9dd8 100644 --- a/library/ttk/scale.tcl +++ b/library/ttk/scale.tcl @@ -27,13 +27,13 @@ bind TScale <> { %W set [%W cget -from] } bind TScale <> { %W set [%W cget -to] } bind TScale <> { ttk::scale::Increment %W -1 } -bind TScale { ttk::scale::Increment %W -1 } +bind TScale <> { ttk::scale::Increment %W -1 } bind TScale <> { ttk::scale::Increment %W 1 } -bind TScale { ttk::scale::Increment %W 1 } +bind TScale <> { ttk::scale::Increment %W 1 } bind TScale <> { ttk::scale::Increment %W -10 } -bind TScale { ttk::scale::Increment %W -10 } +bind TScale <> { ttk::scale::Increment %W -10 } bind TScale <> { ttk::scale::Increment %W 10 } -bind TScale { ttk::scale::Increment %W 10 } +bind TScale <> { ttk::scale::Increment %W 10 } proc ttk::scale::Press {w x y} { variable State -- cgit v0.12 From 4170dadb2c17a28bfbe04fcdba16d8e1038616df Mon Sep 17 00:00:00 2001 From: stwo Date: Thu, 9 Aug 2012 16:38:57 +0000 Subject: Remove useless (void *) casts introduced in checkin [81e50c85ed]. The warnings were false flags from a faulty OpenBSD C compiler. --- ChangeLog | 7 +++++++ generic/tkEvent.c | 6 +++--- unix/tkUnixEvent.c | 2 +- unix/tkUnixKey.c | 4 ++-- unix/tkUnixRFont.c | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a98897..7d331d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-08-09 Stuart Cassoff + + * generic/tkEvent.c: Remove useless (void *) casts + * unix/tkUnixEvent.c: introduced in checkin [81e50c85ed]. + * unix/tkUnixKey.c: The warnings were false flags from a + * unix/tkUnixRFont.c: faulty OpenBSD C compiler. + 2012-07-31 Donal K. Fellows * unix/tkUnixKey.c (TkpSetKeycodeAndState, TkpInitKeymapInfo) diff --git a/generic/tkEvent.c b/generic/tkEvent.c index dfa46ff..1fbf1dd 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -337,7 +337,7 @@ CreateXIC( preedit_attlist = XVaCreateNestedList(0, XNSpotLocation, &spot, XNFontSet, dispPtr->inputXfs, - (void *) NULL); + NULL); } winPtr->inputContext = XCreateIC(dispPtr->inputMethod, @@ -345,7 +345,7 @@ CreateXIC( XNClientWindow, winPtr->window, XNFocusWindow, winPtr->window, preedit_attname, preedit_attlist, - (void *) NULL); + NULL); if (preedit_attlist) { XFree(preedit_attlist); @@ -360,7 +360,7 @@ CreateXIC( /* * Adjust the window's event mask if the IM requires it. */ - XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, (void *) NULL); + XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, NULL); if ((winPtr->atts.event_mask & im_event_mask) != im_event_mask) { winPtr->atts.event_mask |= im_event_mask; XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mask); diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index 0987129..4d0ccfa 100644 --- a/unix/tkUnixEvent.c +++ b/unix/tkUnixEvent.c @@ -646,7 +646,7 @@ OpenIM( } if ((XGetIMValues(dispPtr->inputMethod, XNQueryInputStyle, &stylePtr, - (void *) NULL) != NULL) || (stylePtr == NULL)) { + NULL) != NULL) || (stylePtr == NULL)) { goto error; } diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index f13adf7..d07f13a 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -64,9 +64,9 @@ Tk_SetCaretPos( spot.x = dispPtr->caret.x; spot.y = dispPtr->caret.y + dispPtr->caret.height; - preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, (void *) NULL); + preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, NULL); XSetICValues(winPtr->inputContext, XNPreeditAttributes, preedit_attr, - (void *) NULL); + NULL); XFree(preedit_attr); } #endif diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index 50642ad..ab2ed4a 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -123,7 +123,7 @@ GetFont( FC_FAMILY, FcTypeString, "sans", FC_SIZE, FcTypeDouble, 12.0, FC_MATRIX, FcTypeMatrix, &mat, - (void *) NULL); + NULL); } if (!ftFont) { /* -- cgit v0.12 From 60370012590a96ccb9b812f8688a0f8822c9883b Mon Sep 17 00:00:00 2001 From: stwo Date: Thu, 9 Aug 2012 16:40:41 +0000 Subject: Remove useless (void *) casts introduced in checkin [b7a58eae61]. The warnings were false flags from a faulty OpenBSD C compiler. --- ChangeLog | 7 +++++++ generic/tkEvent.c | 6 +++--- unix/tkUnixEvent.c | 2 +- unix/tkUnixKey.c | 4 ++-- unix/tkUnixRFont.c | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index d356eee..54e9c74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-08-09 Stuart Cassoff + + * generic/tkEvent.c: Remove useless (void *) casts + * unix/tkUnixEvent.c: introduced in checkin [b7a58eae61]. + * unix/tkUnixKey.c: The warnings were false flags from a + * unix/tkUnixRFont.c: faulty OpenBSD C compiler. + 2012-08-03 Francois Vogel * tests/bind.test: [Bug 3554081]: Test bind-22.10 failed diff --git a/generic/tkEvent.c b/generic/tkEvent.c index 7c41c22..03e7283 100644 --- a/generic/tkEvent.c +++ b/generic/tkEvent.c @@ -343,7 +343,7 @@ CreateXIC( preedit_attlist = XVaCreateNestedList(0, XNSpotLocation, &spot, XNFontSet, dispPtr->inputXfs, - (void *) NULL); + NULL); } winPtr->inputContext = XCreateIC(dispPtr->inputMethod, @@ -351,7 +351,7 @@ CreateXIC( XNClientWindow, winPtr->window, XNFocusWindow, winPtr->window, preedit_attname, preedit_attlist, - (void *) NULL); + NULL); if (preedit_attlist) { XFree(preedit_attlist); @@ -366,7 +366,7 @@ CreateXIC( /* * Adjust the window's event mask if the IM requires it. */ - XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, (void *) NULL); + XGetICValues(winPtr->inputContext, XNFilterEvents, &im_event_mask, NULL); if ((winPtr->atts.event_mask & im_event_mask) != im_event_mask) { winPtr->atts.event_mask |= im_event_mask; XSelectInput(winPtr->display, winPtr->window, winPtr->atts.event_mask); diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index 09dde72..59fba29 100644 --- a/unix/tkUnixEvent.c +++ b/unix/tkUnixEvent.c @@ -639,7 +639,7 @@ OpenIM( } if ((XGetIMValues(dispPtr->inputMethod, XNQueryInputStyle, &stylePtr, - (void *) NULL) != NULL) || (stylePtr == NULL)) { + NULL) != NULL) || (stylePtr == NULL)) { goto error; } diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index ed77877..f422111 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -65,10 +65,10 @@ Tk_SetCaretPos( spot.x = dispPtr->caret.x; spot.y = dispPtr->caret.y + dispPtr->caret.height; - preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, (void *) NULL); + preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &spot, NULL); XSetICValues(winPtr->inputContext, XNPreeditAttributes, preedit_attr, - (void *) NULL); + NULL); XFree(preedit_attr); } #endif diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index c3ece5e..fd0b556 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -101,7 +101,7 @@ GetFont( ftFont = XftFontOpen(fontPtr->display, fontPtr->screen, FC_FAMILY, FcTypeString, "sans", FC_SIZE, FcTypeDouble, 12.0, - (void *) NULL); + NULL); } if (!ftFont) { /* -- cgit v0.12 From b7a61d63d4aabbd30586eea219f7402f3da61ac6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Aug 2012 10:20:50 +0000 Subject: define two more virtual bindings, and correct various Mac bindings according to Apple OSX documentation. Doc updated as well --- ChangeLog | 2 ++ doc/event.n | 48 ++++++++++++++++++++++++++++++++ library/entry.tcl | 4 +-- library/listbox.tcl | 4 +-- library/spinbox.tcl | 4 +-- library/text.tcl | 4 +-- library/tk.tcl | 77 ++++++++++++++++++++++++++------------------------- library/ttk/entry.tcl | 4 +-- 8 files changed, 100 insertions(+), 47 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3b3e1aa..92088bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2012-08-?? Jan Nijtmans * library/*.tcl: [Bug 3555644]: Better use of virtual events. + Pre-define 10 new Virtual events, and correct various + bindings according to the Mac OSX documentation. 2012-07-31 Donal K. Fellows diff --git a/doc/event.n b/doc/event.n index 214e6b7..f45a13f 100644 --- a/doc/event.n +++ b/doc/event.n @@ -373,6 +373,16 @@ selected contents. Move to the next item (i.e., visible character) in the current widget while deselecting any selected contents. .TP +\fB<>\fR +. +Move to the next line in the current widget while deselecting any selected +contents. +.TP +\fB<>\fR +. +Move to the next paragraph in the current widget while deselecting any +selected contents. +.TP \fB<>\fR . Move to the next group of items (i.e., visible word) in the current widget @@ -391,6 +401,16 @@ event has meaningful \fB%x\fR and \fB%y\fR substitutions). Move to the previous item (i.e., visible character) in the current widget while deselecting any selected contents. .TP +\fB<>\fR +. +Move to the previous line in the current widget while deselecting any selected +contents. +.TP +\fB<>\fR +. +Move to the previous paragraph in the current widget while deselecting any +selected contents. +.TP \fB<>\fR Traverse to the previous window. .TP @@ -402,6 +422,10 @@ while deselecting any selected contents. \fB<>\fR Redo one undone action. .TP +\fB<>\fR +. +Set the range of selected contents to the complete widget. +.TP \fB<>\fR . Move to the end of the line in the current widget while extending the range @@ -417,16 +441,40 @@ of selected contents. Move to the next item (i.e., visible character) in the current widget while extending the range of selected contents. .TP +\fB<>\fR +. +Move to the next line in the current widget while extending the range of +selected contents. +.TP +\fB<>\fR +. +Move to the next paragraph in the current widget while extending the range +of selected contents. +.TP \fB<>\fR . Move to the next group of items (i.e., visible word) in the current widget while extending the range of selected contents. .TP +\fB<>\fR +. +Reset the range of selected contents to be empty. +.TP \fB<>\fR . Move to the previous item (i.e., visible character) in the current widget while extending the range of selected contents. .TP +\fB<>\fR +. +Move to the previous line in the current widget while extending the range of +selected contents. +.TP +\fB<>\fR +. +Move to the previous paragraph in the current widget while extending the +range of selected contents. +.TP \fB<>\fR . Move to the previous group of items (i.e., visible word) in the current widget diff --git a/library/entry.tcl b/library/entry.tcl index 026363c..f28547e 100644 --- a/library/entry.tcl +++ b/library/entry.tcl @@ -185,10 +185,10 @@ bind Entry { bind Entry { %W selection adjust insert } -bind Entry { +bind Entry <> { %W selection range 0 end } -bind Entry { +bind Entry <> { %W selection clear } bind Entry { diff --git a/library/listbox.tcl b/library/listbox.tcl index 2715385..31d0fbb 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -154,10 +154,10 @@ bind Listbox { bind Listbox { tk::ListboxCancel %W } -bind Listbox { +bind Listbox <> { tk::ListboxSelectAll %W } -bind Listbox { +bind Listbox <> { if {[%W cget -selectmode] ne "browse"} { %W selection clear 0 end event generate %W <> diff --git a/library/spinbox.tcl b/library/spinbox.tcl index 54d8fe6..06c002c 100644 --- a/library/spinbox.tcl +++ b/library/spinbox.tcl @@ -193,10 +193,10 @@ bind Spinbox { bind Spinbox { %W selection adjust insert } -bind Spinbox { +bind Spinbox <> { %W selection range 0 end } -bind Spinbox { +bind Spinbox <> { %W selection clear } bind Spinbox { diff --git a/library/text.tcl b/library/text.tcl index 94bb223..e59a86e 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -240,10 +240,10 @@ bind Text { set tk::Priv(selectMode) char tk::TextKeyExtend %W insert } -bind Text { +bind Text <> { %W tag add sel 1.0 end } -bind Text { +bind Text <> { %W tag remove sel 1.0 end } bind Text <> { diff --git a/library/tk.tcl b/library/tk.tcl index b810dc6..8a0e3ff 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -362,17 +362,19 @@ if {![llength [info command tk_chooseDirectory]]} { switch -exact -- [tk windowingsystem] { "x11" { - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> if {[info exists tcl_platform(os)] && $tcl_platform(os) eq "Darwin"} { - event add <> + event add <> } + event add <> + event add <> event add <> event add <> event add <> @@ -411,17 +413,16 @@ switch -exact -- [tk windowingsystem] { set ::tk::AlwaysShowSelection 1 } "win32" { - event add <> \ - - event add <> \ - - event add <> \ - - event add <> - event add <> - event add <> - event add <> - + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + + event add <> + event add <> event add <> event add <> event add <> @@ -444,35 +445,37 @@ switch -exact -- [tk windowingsystem] { event add <> } "aqua" { - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> # Official bindings # See http://support.apple.com/kb/HT1343 - event add <> + event add <> + event add <> + event add <> + event add <> + event add <> event add <> - event add <> + event add <> event add <> event add <> event add <> event add <> event add <> - event add <> - event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> # Not official, but logical extensions of above. Also derived from # bindings present in MS Word on OSX. - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> event add <> event add <> event add <> diff --git a/library/ttk/entry.tcl b/library/ttk/entry.tcl index dc835e9..22c4115 100644 --- a/library/ttk/entry.tcl +++ b/library/ttk/entry.tcl @@ -107,8 +107,8 @@ bind TEntry <> { ttk::entry::Extend %W nextword } bind TEntry <> { ttk::entry::Extend %W home } bind TEntry <> { ttk::entry::Extend %W end } -bind TEntry { %W selection range 0 end } -bind TEntry { %W selection clear } +bind TEntry <> { %W selection range 0 end } +bind TEntry <> { %W selection clear } bind TEntry <> { %W selection range 0 end; %W icursor end } -- cgit v0.12 From b883e880976a068be12cf29c379b97be348ea79c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 10 Aug 2012 11:28:09 +0000 Subject: Shift-Control -> Control-Shift, for consisancy everywhere --- doc/ttk_notebook.n | 2 +- library/listbox.tcl | 4 ++-- library/text.tcl | 4 ++-- library/tk.tcl | 8 ++++---- library/ttk/notebook.tcl | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/ttk_notebook.n b/doc/ttk_notebook.n index 6b4b2bc..fe89994 100644 --- a/doc/ttk_notebook.n +++ b/doc/ttk_notebook.n @@ -184,7 +184,7 @@ containing the notebook as follows: .IP \(bu \fBControl-Tab\fR selects the tab following the currently selected one. .IP \(bu -\fBShift-Control-Tab\fR selects the tab preceding the currently selected one. +\fBControl-Shift-Tab\fR selects the tab preceding the currently selected one. .IP \(bu \fBAlt-\fIK\fR, where \fIK\fR is the mnemonic (underlined) character of any tab, will select that tab. diff --git a/library/listbox.tcl b/library/listbox.tcl index 99047f4..c7dd32e 100644 --- a/library/listbox.tcl +++ b/library/listbox.tcl @@ -120,7 +120,7 @@ bind Listbox { %W selection set 0 event generate %W <> } -bind Listbox { +bind Listbox { tk::ListboxDataExtend %W 0 } bind Listbox { @@ -130,7 +130,7 @@ bind Listbox { %W selection set end event generate %W <> } -bind Listbox { +bind Listbox { tk::ListboxDataExtend %W [%W index end] } bind Listbox <> { diff --git a/library/text.tcl b/library/text.tcl index 331d1b4..8a72152 100644 --- a/library/text.tcl +++ b/library/text.tcl @@ -128,10 +128,10 @@ bind Text <> { bind Text <> { tk::TextKeySelect %W [tk::TextNextWord %W insert] } -bind Text { +bind Text { tk::TextKeySelect %W [tk::TextPrevPara %W insert] } -bind Text { +bind Text { tk::TextKeySelect %W [tk::TextNextPara %W insert] } bind Text { diff --git a/library/tk.tcl b/library/tk.tcl index 928fc2e..2520d12 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -374,9 +374,9 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> event add <> event add <> @@ -415,9 +415,9 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> event add <> event add <> diff --git a/library/ttk/notebook.tcl b/library/ttk/notebook.tcl index d424b6c..72b85e6 100644 --- a/library/ttk/notebook.tcl +++ b/library/ttk/notebook.tcl @@ -108,7 +108,7 @@ proc ttk::notebook::enableTraversal {nb} { bind $top {+ttk::notebook::TLCycleTab %W 1} bind $top {+ttk::notebook::TLCycleTab %W -1} bind $top {+ttk::notebook::TLCycleTab %W 1} - bind $top {+ttk::notebook::TLCycleTab %W -1} + bind $top {+ttk::notebook::TLCycleTab %W -1} catch { bind $top {+ttk::notebook::TLCycleTab %W -1} } @@ -170,7 +170,7 @@ proc ttk::notebook::EnclosingNotebook {w} { } # TLCycleTab -- -# toplevel binding procedure for Control-Tab / Shift-Control-Tab +# toplevel binding procedure for Control-Tab / Control-Shift-Tab # Select the next/previous tab in the nearest ancestor notebook. # proc ttk::notebook::TLCycleTab {w dir} { -- cgit v0.12 From 2b0aa341dd7556d42bd7ac7ebc11e6d767455775 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 11 Aug 2012 08:25:36 +0000 Subject: don't put that many bindings under tk_strictMotif handling, it was not done before --- ChangeLog | 2 +- library/tk.tcl | 36 ++++++++++++------------------------ 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 227f0b9..66e9bcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2012-08-?? Jan Nijtmans +2012-08-11 Jan Nijtmans * library/*.tcl: [Bug 3555644]: Better use of virtual events. Pre-define 10 new Virtual events, and correct various diff --git a/library/tk.tcl b/library/tk.tcl index fb16418..1a42aea 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -311,18 +311,6 @@ proc ::tk::EventMotifBindings {n1 dummy dummy} { event $op <> event $op <> event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> - event $op <> } #---------------------------------------------------------------------- @@ -383,22 +371,22 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> - event add <> - event add <> - event add <> - event add <> + event add <> + event add <> + event add <> + event add <> event add <> event add <> event add <> event add <> - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> - event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> + event add <> event add <> event add <> event add <> -- cgit v0.12 From b72f65a36074b558606887f642e92d19518a0a09 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sat, 11 Aug 2012 16:54:41 +0000 Subject: Sync with tcl version of rules.vc --- ChangeLog | 1 + win/rules.vc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6bc9a8d..5ba3e29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * library/*.tcl: [Bug 3555644]: Better use of virtual events. Pre-define 10 new Virtual events, and correct various bindings according to the Mac OSX documentation. + * win/rules.vc: Sync with tcl version of rules.vc 2012-08-11 Francois Vogel diff --git a/win/rules.vc b/win/rules.vc index 3fbaaaf..f09e2ea 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -8,7 +8,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # Copyright (c) 2001-2003 David Gravereaux. -# Copyright (c) 2003-2007 Patrick Thoyts +# Copyright (c) 2003-2008 Patrick Thoyts #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -243,9 +243,9 @@ TCL_USE_STATIC_PACKAGES = 1 TCL_USE_STATIC_PACKAGES = 0 !endif !if [nmakehlp -f $(OPTS) "nothreads"] +!message *** Compile explicitly for non-threaded tcl TCL_THREADS = 0 !else -!message *** Doing threads TCL_THREADS = 1 USE_THREAD_ALLOC= 1 !endif @@ -287,7 +287,7 @@ LOIMPACT = 0 USE_THREAD_ALLOC = 1 !endif !if [nmakehlp -f $(OPTS) "tclalloc"] -!message *** Doing thrdalloc +!message *** Doing tclalloc USE_THREAD_ALLOC = 0 !endif !if [nmakehlp -f $(OPTS) "unchecked"] -- cgit v0.12 From c7492578c7af6a586a3797ba790569ac6abacab2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 13 Aug 2012 15:12:34 +0000 Subject: two missing bindings for Mac OSX --- library/tk.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/tk.tcl b/library/tk.tcl index 1a42aea..7ef25ec 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -455,9 +455,9 @@ switch -exact -- [tk windowingsystem] { event add <> event add <> event add <> - event add <> + event add <> event add <> - event add <> + event add <> event add <> event add <> event add <> -- cgit v0.12