-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backend-independant interactions. Remove widgets as they are already present in Spec.
- Loading branch information
Showing
18 changed files
with
170 additions
and
1,150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
181 changes: 0 additions & 181 deletions
181
src/Interactions-Widgets/ITItemsChooserPresenter.class.st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Extension { #name : 'SpConfirmDialog' } | ||
|
||
{ #category : '*Interactions-Widgets' } | ||
SpConfirmDialog class >> for: aConfirmation [ | ||
|
||
^ self new | ||
title: aConfirmation title; | ||
label: aConfirmation message; | ||
acceptLabel: aConfirmation yesLabel; | ||
cancelLabel: aConfirmation noLabel; | ||
yourself | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Extension { #name : 'SpDialogPresenter' } | ||
|
||
{ #category : '*Interactions-Widgets' } | ||
SpDialogPresenter >> doInteraction [ | ||
^ self openDialog | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Extension { #name : 'SpInformDialog' } | ||
|
||
{ #category : '*Interactions-Widgets' } | ||
SpInformDialog class >> for: anITInformation [ | ||
|
||
^ self new | ||
title: anITInformation title; | ||
label: anITInformation message; | ||
yourself | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
" | ||
I am the entity in charge of receiving User interactions and convert them to Spec widgets. | ||
I use double dispatch on User interactions entity. | ||
" | ||
Class { | ||
#name : 'SpecInteraction', | ||
#superclass : 'Object', | ||
#classInstVars : [ | ||
'default' | ||
], | ||
#category : 'Interactions-Widgets', | ||
#package : 'Interactions-Widgets' | ||
} | ||
|
||
{ #category : 'accessing' } | ||
SpecInteraction class >> default [ | ||
|
||
^ default ifNil:[ default := self new ] | ||
] | ||
|
||
{ #category : 'querying' } | ||
SpecInteraction >> for: aUserInteraction [ | ||
|
||
^ aUserInteraction widgetFor: self | ||
] | ||
|
||
{ #category : 'accessing' } | ||
SpecInteraction >> widgetForConfirmation: aConfirmation [ | ||
|
||
^ SpConfirmDialog for: aConfirmation | ||
] | ||
|
||
{ #category : 'accessing' } | ||
SpecInteraction >> widgetForFileRequest: aFileRequest [ | ||
|
||
| widget widgetClass | | ||
widgetClass := aFileRequest isForFileOpening | ||
ifTrue: [ StOpenFilePresenter ] | ||
ifFalse: [ StOpenDirectoryPresenter ]. | ||
widget := widgetClass for: aFileRequest. | ||
|
||
aFileRequest currentFolder ifNotNil: [ :folder | widget openFolder: folder ]. | ||
aFileRequest filter ifNotNil: [ :filter | | ||
widget fileNavigationSystem filter: | ||
(StCustomExtensionsFilter extensions: { filter }) ]. | ||
|
||
^ widget | ||
] | ||
|
||
{ #category : 'accessing' } | ||
SpecInteraction >> widgetForInformation: anITInformation [ | ||
|
||
^ SpInformDialog for: anITInformation | ||
] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Extension { #name : 'StFileSystemPresenter' } | ||
|
||
{ #category : '*Interactions-Widgets' } | ||
StFileSystemPresenter >> doInteraction [ | ||
|
||
^ self open | ||
] |
Oops, something went wrong.