From 5e0e6ceb8fbcce0cbce97e1e383c1acf99cce033 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Sun, 3 Dec 2000 18:25:13 +0000 Subject: [PATCH] Added accelerators to Undo/Redo menu items git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/zipdist.sh | 640 +++++++++++++++++++++++---------------------- docs/latex/wx/cmdlpars.tex | 18 +- docs/latex/wx/cmdproc.tex | 24 ++ include/wx/docview.h | 9 + include/wx/textfile.h | 2 +- include/wx/treebase.h | 2 +- src/common/docview.cpp | 16 +- 7 files changed, 379 insertions(+), 332 deletions(-) rewrite distrib/msw/zipdist.sh (60%) diff --git a/distrib/msw/zipdist.sh b/distrib/msw/zipdist.sh dissimilarity index 60% index ad11c7d..17fd994 100644 --- a/distrib/msw/zipdist.sh +++ b/distrib/msw/zipdist.sh @@ -1,318 +1,322 @@ -#! /bin/sh - -# Zip up an external, generic + Windows distribution of wxWindows 2 -src=`cygpath -u $WXWIN` -dest=$src/deliver -wise=0 -wiseonly=0 - -# Set this to the required version -version=2.3.0 - -dowise() -{ - cd $dest - - # Unzip the Windows files into 'wx' - mkdir $dest/wx - - # After this change of directory, we're in the - # temporary 'wx' directory and not acting on - # the source wxWindows directory. - cd $dest/wx - unzip -o ../wxWindows-$version-msw.zip - unzip -o ../wxWindows-$version-gen.zip - unzip -o ../wxWindows-$version-vc.zip - unzip -o ../wxWindows-$version-bc.zip - unzip -o ../wxWindows-$version-HTMLHelp.zip - unzip -o ../extradoc.zip - # Need Word file, for Remstar DB classes - unzip -o ../wxWindows-$version-Word.zip - unzip -o ../ogl3.zip - unzip -o ../jpeg.zip - unzip -o ../tiff.zip - unzip -o ../tex2rtf2.zip - - # Now delete a few files that are unnecessary - # attrib -R * - rm -f BuildCVS.txt *.in *.spec *.guess *.sub mkinstalldirs modules install-sh *.sh descrip.mms - rm -f configure samples/configure samples/*.in demos/configure demos/*.in contrib/configure contrib/*.in - rm -f setup.h.in setup.h_vms - rm -f -r Makefile.in - rm -f docs/html/wxbook.htm docs/html/roadmap.htm - rm -f contrib/docs/winhelp/mmedia.* - rm -f contrib/docs/winhelp/stc.* - rm -f contrib/docs/htmlhelp/mmedia.* - rm -f contrib/docs/htmlhelp/stc.* - rm -f contrib/docs/pdf/*.* - rm -f -r contrib/docs/latex/ogl - rm -f src/mingegcs.bat - rm -f distrib - - # Now copy some binary files to 'bin' - mkdir bin - cp $src/bin/dialoged.exe bin - cp $src/bin/tex2rtf.exe bin - cp $src/bin/dbgview.* bin - cp $src/bin/life.exe bin - cp $src/docs/winhelp/dialoged.hlp $src/docs/winhelp/dialoged.cnt bin - cp $src/docs/winhelp/tex2rtf.hlp $src/docs/winhelp/tex2rtf.cnt bin - - # Make wxMSW-xxx.zip - zip -r ../wxMSW-$version.zip * - - # Time to regenerate the WISE install script, wxwin2.wse. - # NB: if you've changed wxwin2.wse using WISE, call splitwise.exe - # from within distrib/msw, to split off wisetop.txt and wisebott.txt. - echo Calling 'makewise' to generate wxwin2.wse... - - sh $WXWIN/distrib/msw/makewise.sh - - rm -f $dest/setup.* - - # Now invoke WISE install on the new wxwin2.wse - echo Invoking WISE... - /c/progra~1/wise/wise32.exe /C $WXWIN\\distrib\\msw\\wxwin2.wse - echo Press return to continue with the wxWindows distribution... - read dummy - - cd $dest - - # tidy up capitalisation of filenames - mv setup.EXE s - mv s setup.exe - - mv setup.w02 s - mv s setup.w02 - - mv setup.w03 s - mv s setup.w03 - - mv setup.w04 s - mv s setup.w04 - - mv setup.w05 s - mv s setup.w05 - - mv setup.w06 s - mv s setup.w06 - - mv setup.w07 s - mv s setup.w07 - - mv setup.w08 s - mv s setup.w08 - - mv setup.w09 s - mv s setup.w09 - - # Put all the setup files into a single zip archive. - zip wxMSW-$version-setup.zip readme.txt setup.* -} - -expandlines() -{ - toexpand=$1 - outputfile=$2 - - rm -f $outputfile - touch $outputfile - for line in `cat $toexpand` ; do - if [ $line != "" ]; then - ls $line >> $outputfile - fi - done -} - -# Process command line options. -for i in "$@"; do - case "$i" in - --wise) wise=1 ;; - --wiseonly) wiseonly=1 ;; - *) - echo Usage: $0 "[ options ]" 1>&2 - echo Options: - echo " --help Display this help message" - echo " --wise Build setup.exe" - exit 1 - ;; - esac -done - -if [ ! -d "$src" ]; then - echo $src not found. - exit 1 -fi - -if [ ! -d "$dest" ]; then - echo $dest not found. - exit 1 -fi - -echo Creating distribution in $dest. Press return to continue. -read dummy - -if [ "$wiseonly" != "0" ]; then - dowise - exit 0 -fi - -# Remove all existing files -rm -f $dest/wx*.zip -rm -f $dest/*.htb -rm -f $dest/ogl3.zip -rm -f $dest/tex2rtf2.zip -rm -f $dest/jpeg.zip -rm -f $dest/tiff.zip -rm -f $dest/dialoged.zip -rm -f $dest/utils.zip -rm -f $dest/extradoc.zip -rm -f $dest/*-win32.zip - -if [ ! -d "$dest/wx" ]; then - rm -f -r $dest/wx -fi - - -cd $src -echo Zipping... - -# Below is the old-style separated-out format. This is retained only -# for local use, and for creating wxMSW-xxx.zip. - -# We can't use e.g. this: -# ls `cat $src/distrib/msw/makefile.rsp` zip -@ -u $dest/wxWindows-$version-gen.zip -# because there's not enough space on the command line, plus we need to ignore the -# blank lines. - -expandlines $src/distrib/msw/generic.rsp temp.txt -zip -@ $dest/wxWindows-$version-gen.zip < temp.txt - -expandlines $src/distrib/msw/makefile.rsp temp.txt -zip -@ -u $dest/wxWindows-$version-gen.zip < temp.txt - -expandlines $src/distrib/msw/msw.rsp temp.txt -zip -@ $dest/wxWindows-$version-msw.zip < temp.txt - -expandlines $src/distrib/msw/makefile.rsp temp.txt -zip -@ -u $dest/wxWindows-$version-msw.zip < temp.txt - -expandlines $src/distrib/msw/gtk.rsp temp.txt -zip -@ $dest/wxWindows-$version-gtk.zip < temp.txt - -expandlines $src/distrib/msw/makefile.rsp temp.txt -zip -@ -u $dest/wxWindows-$version-gtk.zip < temp.txt - -expandlines $src/distrib/msw/stubs.rsp temp.txt -zip -@ $dest/wxWindows-$version-stubs.zip < temp.txt - -expandlines $src/distrib/msw/motif.rsp temp.txt -zip -@ $dest/wxWindows-$version-mot.zip < temp.txt - -expandlines $src/distrib/msw/makefile.rsp temp.txt -zip -@ -u $dest/wxWindows-$version-mot.zip < temp.txt - - -expandlines $src/distrib/msw/docsrc.rsp temp.txt -zip -@ $dest/wxWindows-$version-DocSource.zip < temp.txt - -expandlines $src/distrib/msw/wx_hlp.rsp temp.txt -zip -@ $dest/wxWindows-$version-WinHelp.zip < temp.txt - -expandlines $src/distrib/msw/wx_html.rsp temp.txt -zip -@ $dest/wxWindows-$version-HTML.zip < temp.txt - -expandlines $src/distrib/msw/wx_pdf.rsp temp.txt -zip -@ $dest/wxWindows-$version-PDF.zip < temp.txt - -expandlines $src/distrib/msw/wx_word.rsp temp.txt -zip -@ $dest/wxWindows-$version-Word.zip < temp.txt - -expandlines $src/distrib/msw/wx_htb.rsp temp.txt -zip -@ $dest/wxWindows-$version-HTB.zip < temp.txt - -expandlines $src/distrib/msw/wx_chm.rsp temp.txt -zip -@ $dest/wxWindows-$version-HTMLHelp.zip < temp.txt - -# PDF/HTML docs that should go into the Windows setup because -# there are no WinHelp equivalents -expandlines $src/distrib/msw/extradoc.rsp temp.txt -zip -@ $dest/extradoc.zip < temp.txt - -# VC++ project files -expandlines $src/distrib/msw/vc.rsp temp.txt -zip -@ $dest/wxWindows-$version-vc.zip < temp.txt - -# BC++ project files -expandlines $src/distrib/msw/bc.rsp temp.txt -zip -@ $dest/wxWindows-$version-bc.zip < temp.txt - -# CodeWarrior project files -expandlines $src/distrib/msw/cw.rsp temp.txt -zip -@ $dest/wxWindows-$version-cw.zip < temp.txt - -# OGL 3 -expandlines $src/distrib/msw/ogl.rsp temp.txt -zip -@ $dest/ogl3.zip < temp.txt - -# MMedia -expandlines $src/distrib/msw/mmedia.rsp temp.txt -zip -@ $dest/mmedia.zip < temp.txt - -# STC (Scintilla widget) -expandlines $src/distrib/msw/stc.rsp temp.txt -zip -@ $dest/stc.zip < temp.txt - -# Tex2RTF -expandlines $src/distrib/msw/tex2rtf.rsp temp.txt -zip -@ $dest/tex2rtf2.zip < temp.txt - -# JPEG source -expandlines $src/distrib/msw/jpeg.rsp temp.txt -zip -@ $dest/jpeg.zip < temp.txt - -# TIFF source -expandlines $src/distrib/msw/tiff.rsp temp.txt -zip -@ $dest/tiff.zip < temp.txt - -# Dialog Editor source and binary -rm -f $dest/dialoged_source.zip -expandlines $src/distrib/msw/dialoged.rsp temp.txt -zip -@ $dest/dialoged_source.zip < temp.txt -zip -j $dest/dialoged.zip $dest/dialoged_source.zip $src/bin/dialoged.exe $src/docs/winhelp/dialoged.hlp $src/docs/winhelp/dialoged.cnt -rm -f $dest/dialoged_source.zip - -# Misc. utils not in the main distribution -expandlines $src/distrib/msw/utils.rsp temp.txt -zip -@ $dest/utils.zip < temp.txt -expandlines $src/distrib/msw/utilmake.rsp temp.txt -zip -@ -u $dest/utilmake.zip < temp.txt - -rm -f temp.txt - -# Make dialoged-win32.zip and tex2rtf-win32.zip - -cd $src/bin - -zip $dest/dialoged-win32.zip dialoged.* -zip $dest/tex2rtf-win32.zip tex2rtf.* - -cp $src/docs/changes.txt $dest -cp $src/docs/msw/install.txt $dest/install_msw.txt -cp $src/docs/motif/install.txt $dest/install_motif.txt -cp $src/docs/gtk/install.txt $dest/install_gtk.txt -cp $src/docs/readme.txt $dest -cp $src/docs/motif/readme.txt $dest/readme_motif.txt -cp $src/docs/gtk/readme.txt $dest/readme_gtk.txt -cp $src/docs/msw/readme.txt $dest/readme_msw.txt -cp $src/docs/readme_vms.txt $dest -cp $src/docs/motif/makewxmotif $dest -cp $src/docs/gtk/makewxgtk $dest - -# Skip WISE setup if wise is 0. -if [ "$wise" = "1" ]; then - dowise -fi - -echo wxWindows archived. - +#!/bin/sh + +# Zip up an external, generic + Windows distribution of wxWindows 2 +SRC=`cygpath -u $WXWIN` +DEST=$SRC/deliver +WISE=0 +WISEONLY=0 +# If your zip accepts Cygwin-style paths, then +# use cygpath, else substitute echo +CYGPATHPROG=cygpath +#CYGPATHPROG=echo + +# Set this to the required version +VERSION=2.3.0 + +dowise() +{ + cd $DEST + + # Unzip the Windows files into 'wx' + mkdir $DEST/wx + + # After this change of directory, we're in the + # temporary 'wx' directory and not acting on + # the source wxWindows directory. + cd $DEST/wx + unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-msw.zip` + unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-gen.zip` + unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-vc.zip` + unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-bc.zip` + unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-HTMLHelp.zip` + unzip -o `$CYGPATHPROG -w ../extradoc.zip` + # Need Word file, for Remstar DB classes + unzip -o `$CYGPATHPROG -w ../wxWindows-$VERSION-Word.zip` + unzip -o `$CYGPATHPROG -w ../ogl3.zip` + unzip -o `$CYGPATHPROG -w ../jpeg.zip` + unzip -o `$CYGPATHPROG -w ../tiff.zip` + unzip -o `$CYGPATHPROG -w ../tex2rtf2.zip` + + # Now delete a few files that are unnecessary + # attrib -R * + rm -f BuildCVS.txt *.in *.spec *.guess *.sub mkinstalldirs modules install-sh *.sh descrip.mms + rm -f configure samples/configure samples/*.in demos/configure demos/*.in contrib/configure contrib/*.in + rm -f setup.h.in setup.h_vms + rm -f -r Makefile.in + rm -f docs/html/wxbook.htm docs/html/roadmap.htm + rm -f contrib/docs/winhelp/mmedia.* + rm -f contrib/docs/winhelp/stc.* + rm -f contrib/docs/htmlhelp/mmedia.* + rm -f contrib/docs/htmlhelp/stc.* + rm -f contrib/docs/pdf/*.* + rm -f -r contrib/docs/latex/ogl + rm -f SRC/mingegcs.bat + rm -f distrib + + # Now copy some binary files to 'bin' + mkdir bin + cp $SRC/bin/dialoged.exe bin + cp $SRC/bin/tex2rtf.exe bin + cp $SRC/bin/dbgview.* bin + cp $SRC/bin/life.exe bin + cp $SRC/docs/winhelp/dialoged.hlp $SRC/docs/winhelp/dialoged.cnt bin + cp $SRC/docs/winhelp/tex2rtf.hlp $SRC/docs/winhelp/tex2rtf.cnt bin + + # Make wxMSW-xxx.zip + zip -r `$CYGPATHPROG -w ../wxMSW-$VERSION.zip` * + + # Time to regenerate the WISE install script, wxwin2.wse. + # NB: if you've changed wxwin2.wse using WISE, call splitwise.exe + # from within distrib/msw, to split off wisetop.txt and wisebott.txt. + echo Calling 'makewise' to generate wxwin2.wse... + + sh $WXWIN/distrib/msw/makewise.sh + + rm -f $DEST/setup.* + + # Now invoke WISE install on the new wxwin2.wse + echo Invoking WISE... + /c/progra~1/wise/wise32.exe /C $WXWIN\\distrib\\msw\\wxwin2.wse + echo Press return to continue with the wxWindows distribution... + read dummy + + cd $DEST + + # tidy up capitalisation of filenames + mv setup.EXE s + mv s setup.exe + + mv setup.w02 s + mv s setup.w02 + + mv setup.w03 s + mv s setup.w03 + + mv setup.w04 s + mv s setup.w04 + + mv setup.w05 s + mv s setup.w05 + + mv setup.w06 s + mv s setup.w06 + + mv setup.w07 s + mv s setup.w07 + + mv setup.w08 s + mv s setup.w08 + + mv setup.w09 s + mv s setup.w09 + + # Put all the setup files into a single zip archive. + zip wxMSW-$VERSION-setup.zip readme.txt setup.* +} + +expandlines() +{ + toexpand=$1 + outputfile=$2 + + rm -f $outputfile + touch $outputfile + for line in `cat $toexpand` ; do + if [ $line != "" ]; then + ls $line >> $outputfile + fi + done +} + +# Process command line options. +for i in "$@"; do + case "$i" in + --wise) WISE=1 ;; + --wiseonly) WISEONLY=1 ;; + *) + echo Usage: $0 "[ options ]" 1>&2 + echo Options: + echo " --help Display this help message" + echo " --wise Build setup.exe" + exit 1 + ;; + esac +done + +if [ ! -d "$SRC" ]; then + echo $SRC not found. + exit 1 +fi + +if [ ! -d "$DEST" ]; then + echo $DEST not found. + exit 1 +fi + +echo Creating distribution in $DEST. Press return to continue. +read dummy + +if [ "$WISEONLY" != "0" ]; then + dowise + exit 0 +fi + +# Remove all existing files +rm -f $DEST/wx*.zip +rm -f $DEST/*.htb +rm -f $DEST/ogl3.zip +rm -f $DEST/tex2rtf2.zip +rm -f $DEST/jpeg.zip +rm -f $DEST/tiff.zip +rm -f $DEST/dialoged.zip +rm -f $DEST/utils.zip +rm -f $DEST/extradoc.zip +rm -f $DEST/*-win32.zip + +if [ ! -d "$DEST/wx" ]; then + rm -f -r $DEST/wx +fi + + +cd $SRC +echo Zipping... + +# Below is the old-style separated-out format. This is retained only +# for local use, and for creating wxMSW-xxx.zip. + +# We can't use e.g. this: +# ls `cat $SRC/distrib/msw/makefile.rsp` zip -@ -u $DEST/wxWindows-$VERSION-gen.zip +# because there's not enough space on the command line, plus we need to ignore the +# blank lines. + +expandlines $SRC/distrib/msw/generic.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gen.zip` < temp.txt + +expandlines $SRC/distrib/msw/makefile.rsp temp.txt +zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gen.zip` < temp.txt + +expandlines $SRC/distrib/msw/msw.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-msw.zip` < temp.txt + +expandlines $SRC/distrib/msw/makefile.rsp temp.txt +zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-msw.zip` < temp.txt + +expandlines $SRC/distrib/msw/gtk.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gtk.zip` < temp.txt + +expandlines $SRC/distrib/msw/makefile.rsp temp.txt +zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-gtk.zip` < temp.txt + +expandlines $SRC/distrib/msw/stubs.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-stubs.zip` < temp.txt + +expandlines $SRC/distrib/msw/motif.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-mot.zip` < temp.txt + +expandlines $SRC/distrib/msw/makefile.rsp temp.txt +zip -@ -u `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-mot.zip` < temp.txt + + +expandlines $SRC/distrib/msw/docsrc.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-DocSource.zip` < temp.txt + +expandlines $SRC/distrib/msw/wx_hlp.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-WinHelp.zip` < temp.txt + +expandlines $SRC/distrib/msw/wx_html.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-HTML.zip` < temp.txt + +expandlines $SRC/distrib/msw/wx_pdf.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-PDF.zip` < temp.txt + +expandlines $SRC/distrib/msw/wx_word.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-Word.zip` < temp.txt + +expandlines $SRC/distrib/msw/wx_htb.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-HTB.zip` < temp.txt + +expandlines $SRC/distrib/msw/wx_chm.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-HTMLHelp.zip` < temp.txt + +# PDF/HTML docs that should go into the Windows setup because +# there are no WinHelp equivalents +expandlines $SRC/distrib/msw/extradoc.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/extradoc.zip` < temp.txt + +# VC++ project files +expandlines $SRC/distrib/msw/vc.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-vc.zip` < temp.txt + +# BC++ project files +expandlines $SRC/distrib/msw/bc.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-bc.zip` < temp.txt + +# CodeWarrior project files +expandlines $SRC/distrib/msw/cw.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/wxWindows-$VERSION-cw.zip` < temp.txt + +# OGL 3 +expandlines $SRC/distrib/msw/ogl.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/ogl3.zip` < temp.txt + +# MMedia +expandlines $SRC/distrib/msw/mmedia.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/mmedia.zip` < temp.txt + +# STC (Scintilla widget) +expandlines $SRC/distrib/msw/stc.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/stc.zip` < temp.txt + +# Tex2RTF +expandlines $SRC/distrib/msw/tex2rtf.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/tex2rtf2.zip` < temp.txt + +# JPEG source +expandlines $SRC/distrib/msw/jpeg.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/jpeg.zip` < temp.txt + +# TIFF source +expandlines $SRC/distrib/msw/tiff.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/tiff.zip` < temp.txt + +# Dialog Editor source and binary +rm -f $DEST/dialoged_source.zip +expandlines $SRC/distrib/msw/dialoged.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/dialoged_source.zip` < temp.txt +zip -j `$CYGPATHPROG -w $DEST/dialoged.zip` $DEST/dialoged_source.zip $SRC/bin/dialoged.exe $SRC/docs/winhelp/dialoged.hlp $SRC/docs/winhelp/dialoged.cnt +rm -f $DEST/dialoged_source.zip + +# Misc. utils not in the main distribution +expandlines $SRC/distrib/msw/utils.rsp temp.txt +zip -@ `$CYGPATHPROG -w $DEST/utils.zip` < temp.txt +expandlines $SRC/distrib/msw/utilmake.rsp temp.txt +zip -@ -u `$CYGPATHPROG -w $DEST/utilmake.zip` < temp.txt + +rm -f temp.txt + +# Make dialoged-win32.zip and tex2rtf-win32.zip + +cd $SRC/bin + +zip `$CYGPATHPROG -w $DEST/dialoged-win32.zip` dialoged.* +zip `$CYGPATHPROG -w $DEST/tex2rtf-win32.zip` tex2rtf.* + +cp $SRC/docs/changes.txt $DEST +cp $SRC/docs/msw/install.txt $DEST/install_msw.txt +cp $SRC/docs/motif/install.txt $DEST/install_motif.txt +cp $SRC/docs/gtk/install.txt $DEST/install_gtk.txt +cp $SRC/docs/readme.txt $DEST +cp $SRC/docs/motif/readme.txt $DEST/readme_motif.txt +cp $SRC/docs/gtk/readme.txt $DEST/readme_gtk.txt +cp $SRC/docs/msw/readme.txt $DEST/readme_msw.txt +cp $SRC/docs/readme_vms.txt $DEST +cp $SRC/docs/motif/makewxmotif $DEST +cp $SRC/docs/gtk/makewxgtk $DEST + +# Skip WISE setup if WISE is 0. +if [ "$WISE" = "1" ]; then + dowise +fi + +echo wxWindows archived. + diff --git a/docs/latex/wx/cmdlpars.tex b/docs/latex/wx/cmdlpars.tex index c7164c0..a3b45cb 100644 --- a/docs/latex/wx/cmdlpars.tex +++ b/docs/latex/wx/cmdlpars.tex @@ -14,7 +14,8 @@ wxCmdLineParser is a class for parsing command line. It has the following features: -\begin{enumerate} + +\begin{enumerate}\itemsep=0pt \item distinguishes options, switches and parameters; allows option grouping \item allows both short and long options \item automatically generates the usage message from the command line description @@ -22,7 +23,8 @@ It has the following features: \end{enumerate} To use it you should follow these steps: -\begin{enumerate} + +\begin{enumerate}\itemsep=0pt \item \helpref{construct}{wxcmdlineparserconstruction} an object of this class giving it the command line to parse and optionally its description or use {\tt AddXXX()} functions later @@ -73,7 +75,9 @@ struct wxCmdLineEntryDesc The type of a command line entity is in the {\tt kind} field and may be one of the following constants: -{\small \begin{verbatim} + +{\small% +\begin{verbatim} enum wxCmdLineEntryType { wxCMD\_LINE\_SWITCH, @@ -93,7 +97,9 @@ to construct a help message explaining the syntax of the program. The possible values of {\tt type} which specifies the type of the value accepted by an option or parameter are: -{\small \begin{verbatim} + +{\small% +\begin{verbatim} enum wxCmdLineParamType { wxCMD\_LINE\_VAL\_STRING, // default @@ -104,7 +110,9 @@ enum wxCmdLineParamType \end{verbatim}} Finally, the {\tt flags} field is a combination of the following bit masks: -{\small \begin{verbatim} + +{\small% +\begin{verbatim} enum { wxCMD\_LINE\_OPTION\_MANDATORY = 0x01, // this option must be given diff --git a/docs/latex/wx/cmdproc.tex b/docs/latex/wx/cmdproc.tex index c4f7b4a..4354078 100644 --- a/docs/latex/wx/cmdproc.tex +++ b/docs/latex/wx/cmdproc.tex @@ -70,6 +70,18 @@ Returns the maximum number of commands that the command processor stores. Returns the edit menu associated with the command processor. +\membersection{wxCommandProcessor::GetRedoAccelerator}\label{wxcommandprocessorgetredoaccelerator} + +\constfunc{const wxString\&}{GetRedoAccelerator}{\void} + +Returns the string that will be appended to the Redo menu item. + +\membersection{wxCommandProcessor::GetUndoAccelerator}\label{wxcommandprocessorgetundoaccelerator} + +\constfunc{const wxString\&}{GetUndoAccelerator}{\void} + +Returns the string that will be appended to the Undo menu item. + \membersection{wxCommandProcessor::Initialize} \func{virtual void}{Initialize}{\void} @@ -87,6 +99,18 @@ menu as appropriate. Set this to NULL if the menu is about to be destroyed and command operations may still be performed, or the command processor may try to access an invalid pointer. +\membersection{wxCommandProcessor::SetRedoAccelerator}\label{wxcommandprocessorsetredoaccelerator} + +\func{void}{SetRedoAccelerator}{\param{const wxString\&}{accel}} + +Sets the string that will be appended to the Redo menu item. + +\membersection{wxCommandProcessor::SetUndoAccelerator}\label{wxcommandprocessorsetundoaccelerator} + +\func{void}{SetUndoAccelerator}{\param{const wxString\&}{accel}} + +Sets the string that will be appended to the Undo menu item. + \membersection{wxCommandProcessor::Submit} \func{virtual bool}{Submit}{\param{wxCommand *}{command}, \param{bool}{ storeIt = TRUE}} diff --git a/include/wx/docview.h b/include/wx/docview.h index 84bbc05..8eafacc 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -565,11 +565,20 @@ public: int GetMaxCommands() const { return m_maxNoCommands; } virtual void ClearCommands(); + // By default, the accelerators are "\tCtrl+Z" and "\tCtrl+Y" + const wxString& GetUndoAccelerator() const { return m_undoAccelerator; } + const wxString& GetRedoAccelerator() const { return m_redoAccelerator; } + + void SetUndoAccelerator(const wxString& accel) { m_undoAccelerator = accel; } + void SetRedoAccelerator(const wxString& accel) { m_redoAccelerator = accel; } + protected: int m_maxNoCommands; wxList m_commands; wxNode* m_currentCommand; wxMenu* m_commandEditMenu; + wxString m_undoAccelerator; + wxString m_redoAccelerator; }; // ---------------------------------------------------------------------------- diff --git a/include/wx/textfile.h b/include/wx/textfile.h index 0f9ec81..6cf2e68 100644 --- a/include/wx/textfile.h +++ b/include/wx/textfile.h @@ -98,7 +98,7 @@ public: // you're using "direct access" i.e. GetLine() size_t GetCurrentLine() const { return m_nCurLine; } void GoToLine(size_t n) { m_nCurLine = n; } - bool Eof() const { return m_nCurLine == m_aLines.Count() - 1; } + bool Eof() const { return (m_aLines.Count() == 0 || m_nCurLine == m_aLines.Count() - 1); } // these methods allow more "iterator-like" traversal of the list of // lines, i.e. you may write something like: diff --git a/include/wx/treebase.h b/include/wx/treebase.h index c7046b2..4bd4f4b 100644 --- a/include/wx/treebase.h +++ b/include/wx/treebase.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: treectrl.h +// Name: treebase.h // Purpose: wxTreeCtrl base classes and types // Author: Julian Smart et al // Modified by: diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 97ed29a..50bd316 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1819,6 +1819,8 @@ wxCommandProcessor::wxCommandProcessor(int maxCommands) m_maxNoCommands = maxCommands; m_currentCommand = (wxNode *) NULL; m_commandEditMenu = (wxMenu *) NULL; + m_undoAccelerator = wxT("\tCtrl+Z"); + m_redoAccelerator = wxT("\tCtrl+Y"); } wxCommandProcessor::~wxCommandProcessor() @@ -1954,9 +1956,9 @@ void wxCommandProcessor::SetMenuStrings() if (commandName == wxT("")) commandName = _("Unnamed command"); bool canUndo = command->CanUndo(); if (canUndo) - buf = wxString(_("&Undo ")) + commandName; + buf = wxString(_("&Undo ")) + commandName + m_undoAccelerator; else - buf = wxString(_("Can't &Undo ")) + commandName; + buf = wxString(_("Can't &Undo ")) + commandName + m_undoAccelerator; m_commandEditMenu->SetLabel(wxID_UNDO, buf); m_commandEditMenu->Enable(wxID_UNDO, canUndo); @@ -1967,24 +1969,24 @@ void wxCommandProcessor::SetMenuStrings() wxCommand *redoCommand = (wxCommand *)m_currentCommand->Next()->Data(); wxString redoCommandName(redoCommand->GetName()); if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command"); - buf = wxString(_("&Redo ")) + redoCommandName; + buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator; m_commandEditMenu->SetLabel(wxID_REDO, buf); m_commandEditMenu->Enable(wxID_REDO, TRUE); } else { - m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo")); + m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo") + m_redoAccelerator); m_commandEditMenu->Enable(wxID_REDO, FALSE); } } else { - m_commandEditMenu->SetLabel(wxID_UNDO, _("&Undo")); + m_commandEditMenu->SetLabel(wxID_UNDO, _("&Undo") + m_undoAccelerator); m_commandEditMenu->Enable(wxID_UNDO, FALSE); if (m_commands.Number() == 0) { - m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo")); + m_commandEditMenu->SetLabel(wxID_REDO, _("&Redo") + m_redoAccelerator); m_commandEditMenu->Enable(wxID_REDO, FALSE); } else @@ -1994,7 +1996,7 @@ void wxCommandProcessor::SetMenuStrings() wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data(); wxString redoCommandName(redoCommand->GetName()); if (redoCommandName == wxT("")) redoCommandName = _("Unnamed command"); - buf = wxString(_("&Redo ")) + redoCommandName; + buf = wxString(_("&Redo ")) + redoCommandName + m_redoAccelerator; m_commandEditMenu->SetLabel(wxID_REDO, buf); m_commandEditMenu->Enable(wxID_REDO, TRUE); } -- 2.7.4