]> gitweb.factorcode.org Git - factor.git/commitdiff
more minor UI cleanups
authorSlava Pestov <slava@factorcode.org>
Tue, 19 Jul 2005 21:51:59 +0000 (21:51 +0000)
committerSlava Pestov <slava@factorcode.org>
Tue, 19 Jul 2005 21:51:59 +0000 (21:51 +0000)
TODO.FACTOR.txt
library/ui/hierarchy.factor
library/ui/menus.factor
library/ui/panes.factor

index 3609d70aececb5588fe2d80095fb109158405345..1aca91c15a4676e692c59e742a908bd070ea6c91 100644 (file)
@@ -12,7 +12,7 @@
 - fix listener prompt display after presentation commands invoked\r
 - tutorial: clickable code snippets\r
 - theme abstraction in ui\r
-- stray gesture son stack\r
+- stray gestureon stack\r
 \r
 + misc\r
 \r
index 58d32f3871e2f9022887d0dd83ea3308fac955d5..d28e562d3ac1589d5287bcf4fc8b84b0a6b50a3d 100644 (file)
@@ -40,9 +40,6 @@ sequences vectors ;
     #! is the gadget itself.
     dup [ dup gadget-parent parents cons ] when ;
 
-: find-parent ( gadget quot -- ? )
-    >r parents r> find nip ;
-
 : each-parent ( gadget quot -- ? )
     #! Keep executing the quotation on higher and higher
     #! parents until it returns f.
index 21b500ccf6f20748cd3889f8d17180382425e366..6eeb2a5c5624cb9b7857cdcb2dfafdfe62c67b1f 100644 (file)
@@ -33,10 +33,3 @@ C: menu ( assoc -- gadget )
 ! While a menu is open, clicking anywhere sends the click to
 ! the menu.
 M: menu inside? ( point menu -- ? ) 2drop t ;
-
-: actionize ( obj assoc -- assoc )
-    #! Prepends an object to each cdr of the assoc list. Utility
-    #! word for constructing menu action association lists.
-    [
-        unswons >r >r unit [ car ] cons r> append r> swons
-    ] map-with ;
index c3f66dc05e03c6ec02f65a704489555d17f27a0e..1e5edbc35c75078a95b605cd7ab48c49ba7d11a6 100644 (file)
@@ -67,7 +67,11 @@ M: pane focusable-child* ( pane -- editor )
     dup pane-output clear-incremental pane-current clear-gadget ;
 
 : pane-write-1 ( style text pane -- )
-    >r <presentation> r> pane-current add-gadget ;
+    pick empty? pick empty? and [
+        3drop
+    ] [
+        >r <presentation> r> pane-current add-gadget
+    ] ifte ;
 
 : pane-terpri ( pane -- )
     dup pane-current over pane-output add-incremental