Skip to content
Permalink
Browse files

Merge pull request #718 from juliendelplanque/717-Fix-calls-to-canBeR…

…un-and-replace-them-with-canBeExecuted

717-Fix-calls-to-canBeRun-and-replace-them-with-canBeExecuted
  • Loading branch information...
jecisc committed Aug 12, 2019
2 parents d80a965 + 7e20bb7 commit 822db0c09225eeed57d4b620e89460de6a03e2e6
@@ -12,6 +12,6 @@ SpDisableWhenCantBeRun >> display: aCmSpecCommand in: aMenuOrGroupPresenter do:
aMenuOrGroupPresenter
addItem: [ :item |
aBlock value: item.
item enabled: aCmSpecCommand canBeRun.
item enabled: aCmSpecCommand canBeExecuted.
item ]
]
@@ -9,7 +9,7 @@ Class {

{ #category : #displaying }
SpHideWhenCantBeRun >> display: aCmSpecCommand in: aMenuOrGroupPresenter do: aBlock [
aCmSpecCommand canBeRun "If can not be run, stop because we want to hide the command."
aCmSpecCommand canBeExecuted "If can not be run, stop because we want to hide the command."
ifFalse: [ ^ self ].
aMenuOrGroupPresenter
addItem: [ :item |
@@ -26,6 +26,6 @@ SpShortcutInstaller >> visitCommand: aCmCommand [
ifFalse: [ ^ self ].
self presenter
bindKeyCombination: aCmCommand shortcutKey
toAction: [ aCmCommand canBeRun
toAction: [ aCmCommand canBeExecuted
ifTrue: [ aCmCommand execute ] ]
]

0 comments on commit 822db0c

Please sign in to comment.
You can’t perform that action at this time.