Skip to content

Commit

Permalink
Merge branch 'Pharo12' of github.com:pharo-spec/Spec into Pharo12
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Nov 24, 2023
2 parents 8be506a + 42f0c0a commit 5992dc8
Show file tree
Hide file tree
Showing 30 changed files with 365 additions and 225 deletions.
3 changes: 2 additions & 1 deletion src/BaselineOfSpecCore/BaselineOfSpecCore.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ BaselineOfSpecCore >> baseline: spec [
package: 'Spec2-Layout';
package: 'Spec2-Core' with: [ spec requires: #('Spec2-Layout') ];
package: 'Spec2-Dialogs' with: [ spec requires: #('Spec2-Core') ];
package: 'Spec2-Dialogs-Tests' with: [ spec requires: #('Spec2-Dialogs') ];
package: 'Spec2-CommandLine' with: [ spec requires: #('Spec2-Core') ];
package: 'Spec2-Commands';
package: 'Spec2-Transmission' with: [ spec requires: #('Spec2-Core') ];
Expand All @@ -32,7 +33,7 @@ BaselineOfSpecCore >> baseline: spec [
"Tests"
package: 'Spec2-Adapters-Stub' with: [ spec requires: #('Spec2-Core') ];
package: 'Spec2-Commander2-Tests' with: [ spec requires: #('Spec2-Commander2') ];
package: 'Spec2-Tests' with: [ spec requires: #('Spec2-Core' 'Spec2-Examples') ];
package: 'Spec2-Tests' with: [ spec requires: #('Spec2-Core' 'Spec2-Examples' 'Spec2-Dialogs-Tests') ];
package: 'Spec2-Code-Tests' with: [ spec requires: #('Spec2-Tests' 'Spec2-Code') ];
package: 'Spec2-Code-Diff-Tests' with: [ spec requires: #('Spec2-Tests' 'Spec2-Code-Diff') ];
"Examples"
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpContainerStyle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Class {
{ #category : 'ston-core' }
SpContainerStyle class >> stonName [

^ 'Container'
^ #Container
]

{ #category : 'operations' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpDrawStyle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Class {
{ #category : 'ston-core' }
SpDrawStyle class >> stonName [

^ 'Draw'
^ #Draw
]

{ #category : 'operations' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpFontStyle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ SpFontStyle class >> fontCache [
{ #category : 'ston-core' }
SpFontStyle class >> stonName [

^ 'Font'
^ #Font
]

{ #category : 'private' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpGeometryStyle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Class {
{ #category : 'ston-core' }
SpGeometryStyle class >> stonName [

^ 'Geometry'
^ #Geometry
]

{ #category : 'operations' }
Expand Down
18 changes: 6 additions & 12 deletions src/Spec2-Adapters-Morphic/SpMorphicBoxAdapter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ SpMorphicBoxAdapter >> add: aPresenter [
self add: aPresenter constraints: SpBoxConstraints new
]

{ #category : 'adding' }
SpMorphicBoxAdapter >> add: aPresenter constraints: constraints [

super add: aPresenter constraints: constraints
]

{ #category : 'private' }
SpMorphicBoxAdapter >> addConstraints: constraints toChild: childMorph [
"Adds constraits by child"
Expand Down Expand Up @@ -254,12 +248,12 @@ SpMorphicBoxAdapter >> newWrapMorph [
{ #category : 'accessing' }
SpMorphicBoxAdapter >> remove: aPresenter [

| morph |
morph := aPresenter adapter widget.
startPanel removeMorph: morph.
endPanel removeMorph: morph.
self verifyBoxExtent

aPresenter adapter ifNotNil: [ :adapter |
| morph |
morph := adapter widget.
startPanel removeMorph: morph.
endPanel removeMorph: morph.
self verifyBoxExtent ]
]

{ #category : 'accessing' }
Expand Down
14 changes: 3 additions & 11 deletions src/Spec2-Adapters-Morphic/SpMorphicFrameLayoutAdapter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ SpMorphicFrameLayoutAdapter >> add: aPresenter [
self add: aPresenter constraints: SpBoxConstraints new
]

{ #category : 'adding' }
SpMorphicFrameLayoutAdapter >> add: aPresenter constraints: constraints [

super add: aPresenter constraints: constraints
]

{ #category : 'factory' }
SpMorphicFrameLayoutAdapter >> addConstraints: constraints toChild: childMorph [

Expand Down Expand Up @@ -161,11 +155,9 @@ SpMorphicFrameLayoutAdapter >> newPanelWith: aLayout label: aLabel [
{ #category : 'accessing' }
SpMorphicFrameLayoutAdapter >> remove: aPresenter [

| morph |
morph := aPresenter adapter widget.
framePanel removeMorph: morph.
self verifyBoxExtent

aPresenter adapter ifNotNil: [ :adapter |
framePanel removeMorph: adapter widget.
self verifyBoxExtent ]
]

{ #category : 'accessing' }
Expand Down
4 changes: 1 addition & 3 deletions src/Spec2-Adapters-Morphic/SpMorphicGridAdapter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,5 @@ SpMorphicGridAdapter >> newPanel [
{ #category : 'removing' }
SpMorphicGridAdapter >> remove: aPresenter [

| morph |
morph := aPresenter adapter widget.
widget removeMorph: morph
aPresenter adapter ifNotNil: [ :adapter | widget removeMorph: adapter widget ]
]
7 changes: 3 additions & 4 deletions src/Spec2-Adapters-Morphic/SpMorphicMillerAdapter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,9 @@ SpMorphicMillerAdapter >> recalculatePages [
{ #category : 'accessing' }
SpMorphicMillerAdapter >> remove: aPresenter [

| morph |
needRecalculatePages := true.
morph := aPresenter adapter widget.
innerWidget removeMorph: morph
aPresenter adapter ifNotNil: [ :adapter |
needRecalculatePages := true.
innerWidget removeMorph: adapter widget ]
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ SpMorphicNumberInputFieldAdapter >> buildWidget [
color: Color transparent;
changeTableLayout;
listDirection: #topToBottom;
addMorph: (self newIconButtonAction: #decreaseValueOf: with: textMorph iconSelector: #arrowDoubleDownIcon);
addMorph: (self newIconButtonAction: #increaseValueOf: with: textMorph iconSelector: #arrowDoubleUpIcon);
addMorph: (self newIconButtonAction: #decreaseValueOf: with: textMorph iconSelector: #arrowDoubleDown);
addMorph: (self newIconButtonAction: #increaseValueOf: with: textMorph iconSelector: #arrowDoubleUp);
yourself.

"With the layout frame I set next to it, the arrows will be at the top right of the text morph. We should be able to make it vertically centered but I don't know how to do that with morphs. If someone knows, please do :)"
Expand Down
6 changes: 4 additions & 2 deletions src/Spec2-Adapters-Morphic/SpMorphicTabAdapter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ SpMorphicTabAdapter >> layout: aLayout [
{ #category : 'removing' }
SpMorphicTabAdapter >> remove: aPresenter [

widget removePage: (widget pages
detect: [ :each | each actualPageMorph = aPresenter adapter widget ])
aPresenter adapter ifNotNil: [ :adapter |
| morph |
morph := adapter widget.
widget removePage: (widget pages detect: [ :each | each actualPageMorph = morph ]) ]
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ SpStyleEnvironmentColorVariable class >> documentValidValues [
{ #category : 'ston-core' }
SpStyleEnvironmentColorVariable class >> stonName [

^ 'EnvironmentColor'
^ #EnvironmentColor
]

{ #category : 'evaluating' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SpStyleEnvironmentFontVariable class >> documentValidValues [
{ #category : 'ston-core' }
SpStyleEnvironmentFontVariable class >> stonName [

^ 'EnvironmentFont'
^ #EnvironmentFont
]

{ #category : 'accessing' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ SpStyleEnvironmentVariable class >> documentValidValues [
{ #category : 'ston-core' }
SpStyleEnvironmentVariable class >> stonName [

^ 'Environment'
^ #Environment
]

{ #category : 'instance creation' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpStyleResetVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Class {
{ #category : 'ston-core' }
SpStyleResetVariable class >> stonName [

^ 'Reset'
^ #Reset
]

{ #category : 'instance creation' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpStyleVariable.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SpStyleVariable class >> newValue: anObject [
{ #category : 'ston-core' }
SpStyleVariable class >> stonName [

^ 'Variable'
^ #Variable
]

{ #category : 'evaluating' }
Expand Down
2 changes: 1 addition & 1 deletion src/Spec2-Adapters-Morphic/SpTextStyle.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Class {
{ #category : 'ston-core' }
SpTextStyle class >> stonName [

^ 'Text'
^ #Text
]

{ #category : 'operations' }
Expand Down
54 changes: 0 additions & 54 deletions src/Spec2-Core/SpApplication.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ SpApplication >> adapterBindings [
^ self backend adapterBindings
]

{ #category : 'ui - dialogs' }
SpApplication >> alert: aString [
"Displays an inform dialog, for more configurable version please use `self application newInform title: ....`."

^ self newAlert
title: 'Alert';
label: aString;
openModal
]

{ #category : 'accessing - backend' }
SpApplication >> backend [

Expand Down Expand Up @@ -150,16 +140,6 @@ SpApplication >> configuration [
configuration ]
]

{ #category : 'ui - dialogs' }
SpApplication >> confirm: aString [
"Displays a confirm dialog, for more configurable version please use `self application newConfirm title: ....`."

^ self newConfirm
title: 'Please confirm';
label: aString;
openModal
]

{ #category : 'showing' }
SpApplication >> defaultBlockedDialogWindowPresenterClass [

Expand Down Expand Up @@ -251,16 +231,6 @@ SpApplication >> iconProvider: anIconProvider [
iconProvider := anIconProvider
]

{ #category : 'ui - dialogs' }
SpApplication >> inform: aString [
"Displays an inform dialog, for more configurable version please use `self application newInform title: ....`."

^ self newInform
title: 'Alert';
label: aString;
openModal
]

{ #category : 'accessing' }
SpApplication >> locale [

Expand Down Expand Up @@ -292,18 +262,6 @@ SpApplication >> notificationCenter [
^ notificationCenter ifNil: [ notificationCenter := SpNotificationCenter new forApplication: self; yourself ]
]

{ #category : 'ui - dialogs' }
SpApplication >> notificationClass [

^ SpNotificationItem
]

{ #category : 'ui - dialogs' }
SpApplication >> notify: aString [

self notificationCenter add: (self notificationClass with: aString)
]

{ #category : 'accessing - properties' }
SpApplication >> properties [

Expand Down Expand Up @@ -386,18 +344,6 @@ SpApplication >> run [
self start
]

{ #category : 'ui - dialogs' }
SpApplication >> selectDirectoryTitle: aString [

^ self backend selectDirectoryTitle: aString
]

{ #category : 'ui - dialogs' }
SpApplication >> selectFileTitle: aString [

^ self backend selectFileTitle: aString
]

{ #category : 'ui' }
SpApplication >> showWaitCursorWhile: aBlock [

Expand Down
12 changes: 6 additions & 6 deletions src/Spec2-Core/SpEditableListPresenter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -159,27 +159,27 @@ SpEditableListPresenter >> initializePresenters [
bottomButton := self newButton.
addButton
addStyle: 'small';
icon: (self iconNamed: #addIcon);
icon: (self iconNamed: #add);
help: 'Add a new item to the list'.
removeButton
addStyle: 'small';
icon: (self iconNamed: #removeIcon);
icon: (self iconNamed: #remove);
help: 'Remove a item from the list'.
upButton
addStyle: 'small';
icon: (self iconNamed: #upIcon);
icon: (self iconNamed: #up);
help: 'Move this item up from one element'.
downButton
addStyle: 'small';
icon: (self iconNamed: #downIcon);
icon: (self iconNamed: #down);
help: 'Move this item down from one element'.
topButton
addStyle: 'small';
icon: (self iconNamed: #topIcon);
icon: (self iconNamed: #top);
help: 'Move this item on the first position of the list'.
bottomButton
addStyle: 'small';
icon: (self iconNamed: #bottomIcon);
icon: (self iconNamed: #bottom);
help: 'Move this item on the last position of the list'
]

Expand Down
Loading

0 comments on commit 5992dc8

Please sign in to comment.