Skip to content

Commit

Permalink
Merge pull request #5 from wolfenmark/main
Browse files Browse the repository at this point in the history
Port to Pharo 11 maintaining Pharo 8 compatibility
  • Loading branch information
wolfenmark authored Feb 26, 2024
2 parents 163e00c + 32dcf9c commit 2d2936d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ With Vizor you can:
- leverage predefined view specifications or create custom ones to visualize a subset of the nodes and edges
- ...

Vizor is developed in [Pharo](https://pharo.org), tested with Pharo 8, and released under MIT License.
Vizor is developed in [Pharo](https://pharo.org), tested and usable with Pharo 8 and 11, and released under MIT License.

## Installation and Usage

Expand Down
7 changes: 5 additions & 2 deletions src/BaselineOfVizor/BaselineOfVizor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ Class {
BaselineOfVizor >> baseline: spec [
<baseline>
spec for: #common do: [
"Dependencies"
self roassal3: spec.
spec for: #'pharo8.x' do: [
"Pharo 8 Dependencies (Roassal)"
self roassal3: spec.
].

self roassal3Exporters: spec.

"Packages"
Expand Down
8 changes: 8 additions & 0 deletions src/Vizor-GUI/VZComponent.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ VZComponent >> monitor [
^ self mainWindow monitor.
]

{ #category : #showing }
VZComponent >> openWithSpec [
"For compatibility with older version of Roassal"
((((Smalltalk version splitOn: $.) at: 1) withoutPrefix: 'Pharo') asInteger >= 11)
ifTrue: [ self open. ]
ifFalse: [ super openWithSpec. ].
]

{ #category : #dependencies }
VZComponent >> release [
self class instVarNames do: [ :name | self instVarNamed: name put: nil ].
Expand Down
4 changes: 3 additions & 1 deletion src/Vizor-GUI/VZGlyph.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ VZGlyph >> mapMetricsToProperties [

{ #category : #interacting }
VZGlyph >> openContextMenu [
self contextMenu openWithSpecAt: ActiveHand position
((((Smalltalk version splitOn: $.) at: 1) withoutPrefix: 'Pharo') asInteger >= 11)
ifTrue: [ self contextMenu openWithSpecAtPointer ]
ifFalse: [ self contextMenu openWithSpecAt: ActiveHand position ].
]

{ #category : #'private - utility' }
Expand Down
2 changes: 1 addition & 1 deletion src/Vizor-GUI/VZRoassalCanvasRenderer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ VZRoassalCanvasRenderer class >> defaultLayout [
{ #category : #interacting }
VZRoassalCanvasRenderer >> addCanvasInteractions [
highlighter := RSHighlightable red.
elasticBox := RSElasticBox new.
elasticBox := ((((Smalltalk version splitOn: $.) at: 1) withoutPrefix: 'Pharo') asInteger >= 11) ifTrue: [ RSElasticBoxInteraction new ] ifFalse: [ RSElasticBox new ].
elasticBox
when: RSSelectionStartEvent do: [ :evt |
highlighter unhighlightRecordedShapes: evt canvas ];
Expand Down
10 changes: 5 additions & 5 deletions src/Vizor-GUI/VZWorldMenu.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ VZWorldMenu class >> menu01ExamplesOn: aBuilder [
]

{ #category : #menu }
VZWorldMenu class >> menu03GitlabOn: aBuilder [
VZWorldMenu class >> menu03GithubOn: aBuilder [
<worldMenu>
(aBuilder item: #VizorGit)
parent: #VZMonitor;
order: 3;
label: 'GitLab';
help: 'Open Vizor GitLab page';
icon: (self iconNamed: 'gitlab');
action: [ WebBrowser openOn: 'https://gitlab.reveal.si.usi.ch/research/vizor/' ].
label: 'GitHub';
help: 'Open Vizor GitHub page';
icon: (self iconNamed: 'github');
action: [ WebBrowser openOn: 'https://github.com/USIREVEAL/Vizor' ].
]

0 comments on commit 2d2936d

Please sign in to comment.