From f94596af576070c03acc34d0fbc95ef64c8da59a Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sat, 5 Apr 2008 07:57:51 -0500 Subject: [PATCH] ui no longer depends on *.lib --- extra/ui/gestures/gestures.factor | 16 ++++++++-------- extra/ui/tools/interactor/interactor.factor | 5 +++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/extra/ui/gestures/gestures.factor b/extra/ui/gestures/gestures.factor index 412a61bcb5..e52eff453a 100755 --- a/extra/ui/gestures/gestures.factor +++ b/extra/ui/gestures/gestures.factor @@ -2,9 +2,8 @@ ! See http://factorcode.org/license.txt for BSD license. USING: arrays assocs kernel math models namespaces sequences words strings system hashtables math.parser -math.vectors classes.tuple classes ui.gadgets combinators.lib -boxes -calendar alarms symbols ; +math.vectors classes.tuple classes ui.gadgets boxes +calendar alarms symbols combinators ; IN: ui.gestures : set-gestures ( class hash -- ) "gestures" set-word-prop ; @@ -188,11 +187,12 @@ SYMBOL: drag-timer : multi-click? ( button -- ? ) { - [ multi-click-timeout? ] - [ multi-click-button? ] - [ multi-click-position? ] - [ multi-click-position? ] - } && nip ; + { [ multi-click-timeout? not ] [ f ] } + { [ multi-click-button? not ] [ f ] } + { [ multi-click-position? not ] [ f ] } + { [ multi-click-position? not ] [ f ] } + { [ t ] [ t ] } + } cond nip ; : update-click# ( button -- ) global [ diff --git a/extra/ui/tools/interactor/interactor.factor b/extra/ui/tools/interactor/interactor.factor index c760867d71..8232094e76 100755 --- a/extra/ui/tools/interactor/interactor.factor +++ b/extra/ui/tools/interactor/interactor.factor @@ -3,7 +3,7 @@ USING: arrays assocs combinators continuations documents hashtables io io.styles kernel math math.vectors models namespaces parser prettyprint quotations -sequences sequences.lib strings threads listener +sequences strings threads listener classes.tuple ui.commands ui.gadgets ui.gadgets.editors ui.gadgets.presentations ui.gadgets.worlds ui.gestures definitions boxes calendar concurrency.flags ui.tools.workspace @@ -105,7 +105,8 @@ M: interactor model-changed ] curry "input" suspend ; M: interactor stream-readln - [ interactor-yield ] keep interactor-finish ?first ; + [ interactor-yield ] keep interactor-finish + dup [ first ] when ; : interactor-call ( quot interactor -- ) dup interactor-busy? [