]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflict
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 17 Feb 2009 03:47:35 +0000 (21:47 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 17 Feb 2009 03:47:35 +0000 (21:47 -0600)
1  2 
basis/ui/operations/operations.factor
basis/ui/tools/operations/operations.factor

index b938c2dc95050055dae1e0748909e06c122231ff,8ba0e5dac7d532e57d3ebe63c139609aade285ea..aa81899462bbb79e620491d0a84906a5ace57789
@@@ -1,8 -1,8 +1,8 @@@
  ! Copyright (C) 2006, 2009 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
  USING: accessors arrays definitions kernel ui.commands
 -ui.gestures sequences strings math words generic namespaces make
 -hashtables help.markup quotations assocs fry linked-assocs ;
 +ui.gestures sequences strings math words generic namespaces
- hashtables help.markup quotations assocs fry call ;
++hashtables help.markup quotations assocs fry call linked-assocs ;
  IN: ui.operations
  
  SYMBOL: +keyboard+
@@@ -33,11 -34,11 +33,14 @@@ M: operation command-word command>> com
  
  SYMBOL: operations
  
+ operations [ <linked-hash> ] initialize
  : object-operations ( obj -- operations )
-     operations get [ predicate>> call( obj -- ? ) ] with filter ;
+     operations get values
 -    [ predicate>> call ] with filter ;
++    [ predicate>> call( obj -- ? ) ] with filter ;
 +
 +: gesture>operation ( gesture object -- operation/f )
 +    object-operations [ operation-gesture = ] with find nip ;
  
  : find-operation ( obj quot -- command )
      [ object-operations ] dip find-last nip ; inline
  : define-operation ( pred command flags -- )
      default-flags swap assoc-union
      dupd define-command <operation>
-     operations get push ;
+     (define-operation) ;
  
 -: modify-operation ( hook translator operation -- operation )
 +: modify-operation ( translator operation -- operation )
      clone
          swap >>translator
 -        swap >>hook
          t >>listener? ;
  
 -: modify-operations ( operations hook translator -- operations )
 -    '[ [ _ ] dip modify-operation ] map ;
 +: modify-operations ( operations translator -- operations )
 +    '[ [ _ ] dip modify-operation ] map ;
  
 -: operations>commands ( object hook translator -- pairs )
 -    [ object-operations ] 2dip modify-operations
 +: operations>commands ( object translator -- pairs )
 +    [ object-operations ] dip modify-operations
      [ [ operation-gesture ] keep ] { } map>assoc ;
  
 -: define-operation-map ( class group blurb object hook translator -- )
 +: define-operation-map ( class group blurb object translator -- )
      operations>commands define-command-map ;
  
  : operation-quot ( target command -- quot )
index 5000364dad8954f73d013a9ace695da80dead7ad,d8802d66c934ee2fb6f35afff69fd723225a70ba..ac95ebfef7a59105c39d1d99bfec6dbd0175d8c1
@@@ -1,22 -1,21 +1,20 @@@
 -! Copyright (C) 2006, 2007 Slava Pestov.
 +! Copyright (C) 2006, 2009 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
 -USING: continuations definitions ui.tools.browser
 -ui.tools.interactor ui.tools.listener ui.tools.profiler
 -ui.tools.search ui.tools.traceback ui.tools.workspace generic
 -help.topics stack-checker summary inspector io.pathnames
 -io.styles kernel namespaces parser prettyprint quotations
 -tools.annotations editors tools.profiler tools.test tools.time
 -tools.walker ui.commands ui.gadgets.editors ui.gestures
 -ui.operations ui.tools.deploy vocabs vocabs.loader words
 -sequences tools.vocabs classes compiler.units accessors
 -vocabs.parser ;
 +USING: continuations definitions generic help.topics threads
 +stack-checker summary io.pathnames io.styles kernel namespaces
 +parser prettyprint quotations tools.crossref tools.annotations
 +editors tools.profiler tools.test tools.time tools.walker vocabs
 +vocabs.loader words sequences tools.vocabs classes
 +compiler.units accessors vocabs.parser macros.expander ui
 +ui.tools.browser ui.tools.listener ui.tools.listener.completion
 +ui.tools.profiler ui.tools.inspector ui.tools.traceback
 +ui.commands ui.gadgets.editors ui.gestures ui.operations
 +ui.tools.deploy models ;
  IN: ui.tools.operations
  
- V{ } clone operations set-global
  ! Objects
 -[ drop t ] \ inspect H{
 +[ drop t ] \ inspector H{
      { +primary+ t }
 -    { +listener+ t }
  } define-operation
  
  : com-prettyprint ( obj -- ) . ;