]> gitweb.factorcode.org Git - factor.git/commitdiff
Don't show operations menu on command presentations
authorslava <slava@factorcode.org>
Sat, 7 Oct 2006 20:33:36 +0000 (20:33 +0000)
committerslava <slava@factorcode.org>
Sat, 7 Oct 2006 20:33:36 +0000 (20:33 +0000)
library/ui/gadgets/presentations.factor

index 1a2a7d82f5b54ebc5325ee01ec74047d5b317805..071866af7a8925b1742dd7c294733332f35eabfa 100644 (file)
@@ -30,9 +30,13 @@ C: presentation ( button object command -- button )
     make-pile 1 over set-pack-fill ;
 
 : operations-menu ( presentation -- gadget )
-    dup presentation-object
-    dup object-operations <commands-menu>
-    swap show-menu ;
+    dup presentation-command [
+        drop
+    ] [
+        dup presentation-object
+        dup object-operations <commands-menu>
+        swap show-menu
+    ] if ;
 
 : invoke-presentation ( presentation -- )
     dup presentation-object swap presentation-command