Seeing a tuple now shows the constructor, browser tile toolbar fix
parent
80a5ee7322
commit
ce8ed04543
|
@ -12,7 +12,6 @@
|
|||
- minibuffer should show a title
|
||||
- clean up listener's minibuffer-related code
|
||||
- help search looks funny
|
||||
- parse errors: clickable pathnames
|
||||
|
||||
+ ui:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
IN: generic
|
||||
USING: arrays definitions errors hashtables help kernel
|
||||
sequences words ;
|
||||
sequences words namespaces ;
|
||||
|
||||
PREDICATE: array method-spec
|
||||
dup length 2 = [
|
||||
|
@ -56,7 +56,10 @@ M: generic subdefs
|
|||
[ swap 2array ] map-with ;
|
||||
|
||||
M: class subdefs
|
||||
dup implementors natural-sort [ 2array ] map-with ;
|
||||
[
|
||||
dup "constructor" word-prop [ , ] when*
|
||||
dup implementors natural-sort [ 2array , ] each-with
|
||||
] { } make ;
|
||||
|
||||
M: method-spec forget
|
||||
first2 [ remove-hash ] with-methods ;
|
||||
|
|
|
@ -45,14 +45,10 @@ TUPLE: tile definition gadget ;
|
|||
<default-border> dup faint-boundary ;
|
||||
|
||||
C: tile ( definition -- gadget )
|
||||
2dup { tile } "Word commands" <toolbar>
|
||||
2dup { tile } <toolbar>
|
||||
<tile-content> over set-gadget-delegate
|
||||
[ set-tile-definition ] keep ;
|
||||
|
||||
tile "Tile commands" {
|
||||
{ "Close" f [ close-tile ] }
|
||||
} define-commands
|
||||
|
||||
: show-definition ( definition definitions -- )
|
||||
2dup definition-index dup 0 >= [
|
||||
over nth-gadget swap scroll>rect drop
|
||||
|
|
|
@ -207,9 +207,10 @@ M: operation invoke-command ( target operation -- )
|
|||
! Define commands in terms of operations
|
||||
|
||||
! Tile commands
|
||||
tile "Word commands"
|
||||
tile "Toolbar"
|
||||
\ word class-operations [ tile-definition ] modify-operations
|
||||
[ command-name "Browse" = not ] subset
|
||||
{ "Close" f [ close-tile ] } add*
|
||||
define-commands
|
||||
|
||||
! Interactor commands
|
||||
|
|
|
@ -12,7 +12,7 @@ gadgets-scrolling gadgets-panes gadgets-messages ;
|
|||
C: tool ( gadget -- tool )
|
||||
{
|
||||
{
|
||||
[ dup dup class tool 2array "Toolbar" <toolbar> ]
|
||||
[ dup dup class tool 2array <toolbar> ]
|
||||
f
|
||||
f
|
||||
@top
|
||||
|
|
|
@ -119,9 +119,8 @@ C: titled-gadget ( gadget title -- )
|
|||
: restore-windows? ( -- ? )
|
||||
windows get [ empty? not ] [ f ] if* ;
|
||||
|
||||
: <toolbar> ( target classes group -- toolbar )
|
||||
swap
|
||||
[ commands hash ] map-with concat
|
||||
: <toolbar> ( target classes -- toolbar )
|
||||
[ commands "Toolbar" swap hash ] map concat
|
||||
[ <command-presentation> ] map-with
|
||||
make-shelf ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue