From 257736bd6aa167fb94f32052574f8074e793328c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 13 Dec 2007 14:16:55 -0500 Subject: [PATCH 1/5] Update script again --- misc/macos-release.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/misc/macos-release.sh b/misc/macos-release.sh index 57ac2b2255..c265b8a80f 100644 --- a/misc/macos-release.sh +++ b/misc/macos-release.sh @@ -2,16 +2,18 @@ source misc/version.sh TARGET=$1 -if [ "$TARGET" = "x86" ]; then +if [ "$1" = "x86" ]; then CPU="x86.32" + TARGET=macosx-x86-32 else CPU="macosx-ppc" + TARGET=macosx-ppc fi BOOT_IMAGE=boot.$CPU.image wget http://factorcode.org/images/$VERSION/$BOOT_IMAGE -make macosx-$TARGET +make $TARGET Factor.app/Contents/MacOS/factor -i=$BOOT_IMAGE -no-user-init DISK_IMAGE_DIR=Factor-$VERSION From b2b1f2cfa8c2031441c8e6a7d5de2d535140e739 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 13 Dec 2007 14:21:04 -0500 Subject: [PATCH 2/5] Fix the script (again??) --- misc/macos-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/macos-release.sh b/misc/macos-release.sh index c265b8a80f..3a080e0ae6 100644 --- a/misc/macos-release.sh +++ b/misc/macos-release.sh @@ -31,5 +31,5 @@ find core extra fonts misc unmaintained -type f \ hdiutil create -srcfolder "$DISK_IMAGE_DIR" -fs HFS+ \ -volname "$DISK_IMAGE_DIR" "$DISK_IMAGE" -ssh mkdir -p linode:w/downloads/$VERSION/ +ssh linode mkdir -p w/downloads/$VERSION/ scp $DISK_IMAGE linode:w/downloads/$VERSION/ From 9766faca6d45dfe3079ea944531748b664c0f509 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 13 Dec 2007 14:22:02 -0500 Subject: [PATCH 3/5] More script fixes --- misc/source-release.sh | 6 +++--- misc/windows-release.sh | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/misc/source-release.sh b/misc/source-release.sh index 78a6fe2826..37aa98e1e3 100644 --- a/misc/source-release.sh +++ b/misc/source-release.sh @@ -1,7 +1,7 @@ source misc/version.sh rm -rf .git cd .. -tar cfz Factor-$VERSION.tgz factor/ +tar cfz Factor-$VERSION.tar.gz factor/ -ssh mkdir -p linode:w/downloads/$VERSION/ -scp Factor-$VERSION.tgz linode:w/downloads/$VERSION/ +ssh linode mkdir -p w/downloads/$VERSION/ +scp Factor-$VERSION.tar.gz linode:w/downloads/$VERSION/ diff --git a/misc/windows-release.sh b/misc/windows-release.sh index 1f947ff3f4..91c5935f81 100644 --- a/misc/windows-release.sh +++ b/misc/windows-release.sh @@ -22,5 +22,10 @@ rm -f Makefile rm -f cp_dir rm -f boot.*.image +FILE=Factor-$VERSION-win32-$CPU.zip + cd .. -zip -r Factor-$VERSION-win32-$CPU.zip Factor/ +zip -r $FILE Factor/ + +ssh linode mkdir -p w/downloads/$VERSION/ +scp $FILE linode:w/downloads/$VERSION/ From fda9958ab40de4e397d26f71c1e3e6e75e94cf5c Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 13 Dec 2007 15:15:54 -0500 Subject: [PATCH 4/5] Starting 0.92 --- core/kernel/kernel.factor | 2 +- misc/version.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/kernel/kernel.factor b/core/kernel/kernel.factor index 88ca0a64f7..6fe0a9588c 100644 --- a/core/kernel/kernel.factor +++ b/core/kernel/kernel.factor @@ -3,7 +3,7 @@ USING: kernel.private ; IN: kernel -: version ( -- str ) "0.91" ; foldable +: version ( -- str ) "0.92" ; foldable ! Stack stuff : roll ( x y z t -- y z t x ) >r rot r> swap ; inline diff --git a/misc/version.sh b/misc/version.sh index 0bc37f62df..9c5d02d463 100644 --- a/misc/version.sh +++ b/misc/version.sh @@ -1 +1 @@ -export VERSION=0.91 +export VERSION=0.92 From 114ee74041d20aa7b9ccdb57a4b8f8023119392d Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 13 Dec 2007 16:34:36 -0500 Subject: [PATCH 5/5] Fix one-word-elt --- extra/documents/documents.factor | 4 ++-- extra/springies/models/2x2snake/deploy.factor | 13 +++++++++++++ extra/ui/gadgets/editors/editors-tests.factor | 10 ++++++++++ extra/ui/gadgets/editors/editors.factor | 10 +++++----- 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 extra/springies/models/2x2snake/deploy.factor diff --git a/extra/documents/documents.factor b/extra/documents/documents.factor index 01034e0e3f..97433d247f 100755 --- a/extra/documents/documents.factor +++ b/extra/documents/documents.factor @@ -195,11 +195,11 @@ TUPLE: one-word-elt ; M: one-word-elt prev-elt drop - [ [ f -rot >r 1- r> (prev-word) ] (word-elt) ] (prev-char) ; + [ f -rot >r 1- r> (prev-word) ] (word-elt) ; M: one-word-elt next-elt drop - [ [ f -rot (next-word) ] (word-elt) ] (next-char) ; + [ f -rot (next-word) ] (word-elt) ; TUPLE: word-elt ; diff --git a/extra/springies/models/2x2snake/deploy.factor b/extra/springies/models/2x2snake/deploy.factor new file mode 100644 index 0000000000..1ad6cfe172 --- /dev/null +++ b/extra/springies/models/2x2snake/deploy.factor @@ -0,0 +1,13 @@ +USING: tools.deploy.config ; +H{ + { deploy-compiler? t } + { deploy-word-props? f } + { deploy-ui? t } + { deploy-reflection 1 } + { deploy-name "springies.models.2x2snake" } + { deploy-c-types? f } + { deploy-word-defs? f } + { "stop-after-last-window?" t } + { deploy-math? t } + { deploy-io 1 } +} diff --git a/extra/ui/gadgets/editors/editors-tests.factor b/extra/ui/gadgets/editors/editors-tests.factor index 6be0423e95..cbccb37111 100755 --- a/extra/ui/gadgets/editors/editors-tests.factor +++ b/extra/ui/gadgets/editors/editors-tests.factor @@ -30,6 +30,16 @@ tools.test.inference tools.test.ui models ; ] with-grafted-gadget ] unit-test +[ "bar" ] [ + "editor" set + "editor" get [ + "bar\nbaz quux" "editor" get set-editor-string + { 0 3 } "editor" get editor-caret set-model + "editor" get select-word + "editor" get gadget-selection + ] with-grafted-gadget +] unit-test + { 0 1 } [ ] unit-test-effect "hello" "field" set diff --git a/extra/ui/gadgets/editors/editors.factor b/extra/ui/gadgets/editors/editors.factor index 84cc01cdb6..eb1d5daf26 100755 --- a/extra/ui/gadgets/editors/editors.factor +++ b/extra/ui/gadgets/editors/editors.factor @@ -320,11 +320,6 @@ M: editor gadget-text* editor-string % ; : end-of-document ( editor -- ) T{ doc-elt } editor-next ; -: selected-word ( editor -- string ) - dup gadget-selection? [ - dup T{ one-word-elt } select-elt - ] unless gadget-selection ; - : position-caret ( editor -- ) mouse-elt dup T{ one-char-elt } = [ drop dup extend-selection dup editor-mark click-loc ] @@ -408,6 +403,11 @@ editor "caret-motion" f { : select-word T{ one-word-elt } select-elt ; +: selected-word ( editor -- string ) + dup gadget-selection? + [ dup select-word ] unless + gadget-selection ; + : select-previous-character T{ char-elt } editor-select-prev ; : select-next-character T{ char-elt } editor-select-next ;