]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.tools.listener: add 'Help' button, and print message when listener exits, to reduc...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 28 Sep 2009 07:38:06 +0000 (02:38 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 28 Sep 2009 07:38:06 +0000 (02:38 -0500)
basis/ui/tools/listener/listener.factor

index 4b9a4a1ef37644e511755bea9d4e4bdbf98755fd..2c2f01e83047c702234b75b735df25d61125d020 100644 (file)
@@ -386,6 +386,8 @@ interactor "completion" f {
         error-summary? off
         tip-of-the-day. nl
         listener
+        nl
+        "The listener has exited. To start it again, click “Restart Listener”." print
     ] with-streams* ;
 
 : start-listener-thread ( listener -- )
@@ -406,25 +408,22 @@ interactor "completion" f {
         [ wait-for-listener ]
     } cleave ;
 
-: listener-help ( -- ) "help.home" com-browse ;
+: com-help ( -- ) "help.home" com-browse ;
 
-\ listener-help H{ { +nullary+ t } } define-command
+\ com-help H{ { +nullary+ t } } define-command
 
 : com-auto-use ( -- )
     auto-use? [ not ] change ;
 
 \ com-auto-use H{ { +nullary+ t } { +listener+ t } } define-command
 
-listener-gadget "misc" "Miscellaneous commands" {
-    { T{ key-down f f "F1" } listener-help }
-} define-command-map
-
 listener-gadget "toolbar" f {
     { f restart-listener }
     { T{ key-down f { A+ } "u" } com-auto-use }
     { T{ key-down f { A+ } "k" } clear-output }
     { T{ key-down f { A+ } "K" } clear-stack }
     { T{ key-down f { C+ } "d" } com-end }
+    { T{ key-down f f "F1" } com-help }
 } define-command-map
 
 listener-gadget "scrolling"