Skip to content

Commit

Permalink
Fixed context menu icons, version info improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Nov 13, 2024
1 parent e6e7f1e commit bdbf5e7
Show file tree
Hide file tree
Showing 23 changed files with 220 additions and 215 deletions.
56 changes: 34 additions & 22 deletions repository/OpenPonk-Core/OPVersion.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -328,31 +328,43 @@ OPVersion >> releaseName: aString [
releaseName := aString
]

{ #category : 'accessing' }
OPVersion >> repositoryLink [

^ self isRepositoryNameKnown
ifTrue: [ 'https://github.com/OpenPonk/' , self repositoryName ]
ifFalse: [ 'https://openponk.org' ]
]

{ #category : 'accessing' }
OPVersion >> repositoryName [

^ repositoryName ifNil: [
| activePlugins |
activePlugins := {
((Smalltalk globals includesKey:
#BaselineOfOpenPonkClassEditor) ifTrue: [
#'class-editor' ]).
((Smalltalk globals includesKey:
#BaselineOfOpenPonkBormEditor) ifTrue: [
#'borm-editor' ]).
((Smalltalk globals includesKey:
#BaselineOfOpenPonkFsmEditor) ifTrue: [
#'fsm-editor' ]).
((Smalltalk globals includesKey:
#BaselineOfOpenPonkPetriNets) ifTrue: [ #petrinets ]).
((Smalltalk globals includesKey: #BaselineOfOpenPonkBPMN)
ifTrue: [ #'BPMN' ]) } reject: #isNil.
repositoryName := activePlugins size >= 4
ifTrue: [ #plugins ]
ifFalse: [
activePlugins size = 1
ifTrue: [ activePlugins first ]
ifFalse: [ self class unknownRepositoryName ] ] ]
| activePlugins repositoriesOfBaselines |
repositoryName ifNotNil: [ ^ repositoryName ].
repositoriesOfBaselines := {
(#BaselineOfOpenPonkClassEditor
-> #'class-editor').
(#BaselineOfOpenPonkBormEditor
-> #'borm-editor').
(#BaselineOfOpenPonkFsmEditor
-> #'fsm-editor').
(#BaselineOfOpenPonkPetriNets
-> #petrinets).
(#BaselineOfOpenPonkBPMN -> #BPMN).
(#BaselineOfOpenPonkMarkovChains
-> #'markov-chains') }.

activePlugins := repositoriesOfBaselines
select: [ :each |
Smalltalk hasClassNamed: each key ]
thenCollect: [ :each | each value ].
^ repositoryName := activePlugins size
>= repositoriesOfBaselines size
ifTrue: [ #plugins ]
ifFalse: [
activePlugins size = 1
ifTrue: [ activePlugins anyOne ]
ifFalse: [ self class unknownRepositoryName ] ]
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ OPDiagramInspectControllerFigureCommand class >> canvasShortcutActivation [
]

{ #category : 'accessing' }
OPDiagramInspectControllerFigureCommand >> defaultMenuIcon [
OPDiagramInspectControllerFigureCommand >> defaultMenuIconName [

^ self iconNamed: #glamorousInspect
^ #glamorousInspect
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Class {
}

{ #category : 'accessing' }
OPDiagramInspectDiagramElementCommand >> defaultMenuIcon [
OPDiagramInspectDiagramElementCommand >> defaultMenuIconName [

^ self iconNamed: #glamorousInspect
^ #glamorousInspect
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Class {
}

{ #category : 'accessing' }
OPDiagramInspectFigureCommand >> defaultMenuIcon [
OPDiagramInspectFigureCommand >> defaultMenuIconName [

^ self iconNamed: #glamorousInspect
^ #glamorousInspect
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ OPDiagramInspectModelFigureCommand class >> canvasShortcutActivation [
]

{ #category : 'accessing' }
OPDiagramInspectModelFigureCommand >> defaultMenuIcon [
OPDiagramInspectModelFigureCommand >> defaultMenuIconName [

^ self iconNamed: #glamorousInspect
^ #glamorousInspect
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ OPDiagramRemoveFigureCommand class >> skipConfirmationModifier [
]

{ #category : 'accessing' }
OPDiagramRemoveFigureCommand >> defaultMenuIcon [
^ self iconNamed: #glamorousTrash
OPDiagramRemoveFigureCommand >> defaultMenuIconName [

^ #glamorousTrash
]

{ #category : 'accessing' }
Expand Down
9 changes: 5 additions & 4 deletions repository/OpenPonk-Spec/OPFitContentDiagramCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ OPFitContentDiagramCommand class >> toolbarMenuActivation [
for: OPCanvasPresenter
]

{ #category : 'execution' }
OPFitContentDiagramCommand >> defaultMenuIcon [
^ OPIdeaGraphIcons fitContentIcon
{ #category : 'accessing' }
OPFitContentDiagramCommand >> defaultMenuIconFormSet [

^ FormSet form: OPIdeaGraphIcons fitContentIcon
]

{ #category : 'execution' }
{ #category : 'accessing' }
OPFitContentDiagramCommand >> defaultMenuItemName [
^ 'Fit All'
]
Expand Down
5 changes: 3 additions & 2 deletions repository/OpenPonk-Spec/OPProjectExitCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ OPProjectExitCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectExitCommand >> defaultMenuIcon [
^ self iconNamed: #smallQuit
OPProjectExitCommand >> defaultMenuIconName [

^ #smallQuit
]

{ #category : 'accessing' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-Spec/OPProjectMergeCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ OPProjectMergeCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectMergeCommand >> defaultMenuIcon [
OPProjectMergeCommand >> defaultMenuIconName [

^ self iconNamed: #merge
^ #merge
]

{ #category : 'accessing' }
Expand Down
4 changes: 2 additions & 2 deletions repository/OpenPonk-Spec/OPProjectMergeModelsCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ OPProjectMergeModelsCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectMergeModelsCommand >> defaultMenuIcon [
OPProjectMergeModelsCommand >> defaultMenuIconName [

^ self iconNamed: #hierarchy
^ #hierarchy
]

{ #category : 'accessing' }
Expand Down
5 changes: 3 additions & 2 deletions repository/OpenPonk-Spec/OPProjectNewModelCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ OPProjectNewModelCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectNewModelCommand >> defaultMenuIcon [
^ self iconNamed: #glamorousAdd
OPProjectNewModelCommand >> defaultMenuIconName [

^ #glamorousAdd
]

{ #category : 'accessing' }
Expand Down
5 changes: 3 additions & 2 deletions repository/OpenPonk-Spec/OPProjectOpenCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ OPProjectOpenCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectOpenCommand >> defaultMenuIcon [
^ self iconNamed: #smallOpen
OPProjectOpenCommand >> defaultMenuIconName [

^ #smallOpen
]

{ #category : 'accessing' }
Expand Down
5 changes: 3 additions & 2 deletions repository/OpenPonk-Spec/OPProjectSaveAsCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ OPProjectSaveAsCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectSaveAsCommand >> defaultMenuIcon [
^ self iconNamed: #smallSaveAs
OPProjectSaveAsCommand >> defaultMenuIconName [

^ #smallSaveAs
]

{ #category : 'accessing' }
Expand Down
5 changes: 3 additions & 2 deletions repository/OpenPonk-Spec/OPProjectSaveCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ OPProjectSaveCommand class >> toolbarMenuActivation [
]

{ #category : 'accessing' }
OPProjectSaveCommand >> defaultMenuIcon [
^ self iconNamed: #smallSave
OPProjectSaveCommand >> defaultMenuIconName [

^ #smallSave
]

{ #category : 'accessing' }
Expand Down
6 changes: 3 additions & 3 deletions repository/OpenPonk-Spec/OPRedoDiagramCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ OPRedoDiagramCommand class >> toolbarMenuActivation [
^ OPDiagramToolbarActivation byRootGroupItemOrder: 11 for: OPCanvasModel"
]

{ #category : 'execution' }
OPRedoDiagramCommand >> defaultMenuIcon [
{ #category : 'accessing' }
OPRedoDiagramCommand >> defaultMenuIconName [

^ self iconNamed: #smallRedo
^ #smallRedo
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ OPShowHideElementsInDiagramCommand class >> canBeExecutedInContext: aToolContext
^ aToolContext editor plugin supportsHidingElements
]

{ #category : 'execution' }
OPShowHideElementsInDiagramCommand >> defaultMenuIcon [
^ OPIdeaActionsIcons propertiesIcon
{ #category : 'accessing' }
OPShowHideElementsInDiagramCommand >> defaultMenuIconFormSet [

^ FormSet form: OPIdeaActionsIcons propertiesIcon
]

{ #category : 'execution' }
{ #category : 'accessing' }
OPShowHideElementsInDiagramCommand >> defaultMenuItemName [
^ 'Show/Hide Elements'
]
Expand Down
6 changes: 3 additions & 3 deletions repository/OpenPonk-Spec/OPUndoDiagramCommand.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ OPUndoDiagramCommand class >> toolbarMenuActivation [

]

{ #category : 'execution' }
OPUndoDiagramCommand >> defaultMenuIcon [
{ #category : 'accessing' }
OPUndoDiagramCommand >> defaultMenuIconName [

^ self iconNamed: #smallUndo
^ #smallUndo
]

{ #category : 'accessing' }
Expand Down
Loading

0 comments on commit bdbf5e7

Please sign in to comment.