diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 6bdb559827..1b2ad4102a 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -4,7 +4,6 @@ - empty search list, handle - change file, reload it manually, then reload modules; shouldn't this work? -- overhaul models, set-model* is crap - variable width word wrap - graphical crossref tool - http://paste.lisp.org/display/30426 @@ -20,6 +19,7 @@ + 0.88: +- models: don't do redundant work - menu Command: quots look dumb - top level window positioning on ms windows - crashes: diff --git a/library/ui/gadgets/presentations.factor b/library/ui/gadgets/presentations.factor index 1643b075ac..f4b87793bf 100644 --- a/library/ui/gadgets/presentations.factor +++ b/library/ui/gadgets/presentations.factor @@ -26,10 +26,10 @@ TUPLE: presentation object hook ; invoke-presentation ; : show-mouse-help ( presentation -- ) - dup find-world [ world-status set-model* ] [ drop ] if* ; + dup find-world [ world-status set-model ] [ drop ] if* ; : hide-mouse-help ( presentation -- ) - find-world [ world-status f swap set-model* ] when* ; + find-world [ world-status f swap set-model ] when* ; M: presentation ungraft* ( presentation -- ) dup hide-mouse-help delegate ungraft* ; diff --git a/library/ui/models.factor b/library/ui/models.factor index 737bda3a4f..0d0fc7c787 100644 --- a/library/ui/models.factor +++ b/library/ui/models.factor @@ -65,9 +65,6 @@ M: model set-model [ set-model-value ] keep model-connections [ model-changed ] each ; -: set-model* ( value model -- ) - 2dup model-value = [ 2drop ] [ set-model ] if ; - : ((change-model)) ( model quot -- newvalue model ) over >r >r model-value r> call r> ; inline diff --git a/library/ui/text/commands.factor b/library/ui/text/commands.factor index 1d68b0157b..a0cf1db1de 100644 --- a/library/ui/text/commands.factor +++ b/library/ui/text/commands.factor @@ -47,7 +47,7 @@ USING: gadgets kernel models namespaces sequences arrays ; dupd editor-select-next mark>caret ; : editor-select ( from to editor -- ) - tuck editor-caret set-model* editor-mark set-model* ; + tuck editor-caret set-model editor-mark set-model ; : select-elt ( editor elt -- ) over >r diff --git a/library/ui/text/document.factor b/library/ui/text/document.factor index 34c7e1446e..c0214e3486 100644 --- a/library/ui/text/document.factor +++ b/library/ui/text/document.factor @@ -25,7 +25,7 @@ C: document ( -- document ) : remove-loc document-locs delete ; : update-locs ( loc document -- ) - document-locs [ set-model* ] each-with ; + document-locs [ set-model ] each-with ; : doc-line ( line# document -- str ) model-value nth ; diff --git a/library/ui/text/editor.factor b/library/ui/text/editor.factor index ae50c9575f..b1c375579c 100644 --- a/library/ui/text/editor.factor +++ b/library/ui/text/editor.factor @@ -53,10 +53,10 @@ M: editor model-changed : change-caret ( editor quot -- ) over >r >r dup editor-caret* swap control-model r> call r> [ control-model validate-loc ] keep - editor-caret set-model* ; inline + editor-caret set-model ; inline : mark>caret ( editor -- ) - dup editor-caret* swap editor-mark set-model* ; + dup editor-caret* swap editor-mark set-model ; : change-caret&mark ( editor quot -- ) over >r change-caret r> mark>caret ; inline @@ -87,7 +87,7 @@ M: editor model-changed ] keep swap 2array ; : click-loc ( editor model -- ) - >r [ hand-rel ] keep point>loc r> set-model* ; + >r [ hand-rel ] keep point>loc r> set-model ; : focus-editor ( editor -- ) t over set-editor-focused? relayout-1 ; diff --git a/library/ui/tools/tools.factor b/library/ui/tools/tools.factor index 88c0b44f96..b93b551d08 100644 --- a/library/ui/tools/tools.factor +++ b/library/ui/tools/tools.factor @@ -32,7 +32,7 @@ TUPLE: tool gadget ; : show-tool ( class workspace -- tool ) [ find-tool swap ] keep workspace-book control-model - set-model* ; + set-model ; : select-tool ( workspace class -- ) swap show-tool drop ;