@@ -18,7 +18,6 @@ Class {
1818 ' suggestionList' ,
1919 ' protocolNameField' ,
2020 ' concernedClass' ,
21- ' newProtocolButton' ,
2221 ' selectedProtocolName'
2322 ],
2423 #category : ' NewTools-Core-Calypso' ,
@@ -76,9 +75,7 @@ StProtocolNameChooserPresenter >> connectPresenters [
7675 protocolNameField whenTextChangedDo: [ self updatePresenter ].
7776 protocolNameField whenSubmitDo: [ :aString | self doAcceptFromTextInput ].
7877
79- suggestionList whenActivatedDo: [ self doAcceptFromList ].
80-
81- newProtocolButton action: [ self doAcceptFromTextInput ]
78+ suggestionList whenActivatedDo: [ self doAcceptFromList ]
8279]
8380
8481{ #category : ' layout' }
@@ -90,7 +87,6 @@ StProtocolNameChooserPresenter >> defaultLayout [
9087 add: (SpBoxLayout newLeftToRight
9188 spacing: 3 ;
9289 add: protocolNameField expand: true ;
93- add: newProtocolButton expand: false ;
9490 yourself )
9591 expand: false ;
9692 yourself
@@ -106,8 +102,7 @@ StProtocolNameChooserPresenter >> doAcceptFromList [
106102{ #category : ' private - actions' }
107103StProtocolNameChooserPresenter >> doAcceptFromTextInput [
108104
109- selectedProtocolName := suggestionList selectedItem
110- ifNil: [ protocolNameField text. ].
105+ selectedProtocolName := protocolNameField text.
111106 self withWindowDo: [ :w | w beOk; close ]
112107]
113108
@@ -128,12 +123,6 @@ StProtocolNameChooserPresenter >> initializePresenters [
128123 protocolNameField := self newTextInput.
129124 protocolNameField placeholder: ' Protocol name (e.g. accessing)' .
130125
131- newProtocolButton := self newButton.
132- newProtocolButton
133- addStyle: ' small' ;
134- icon: (self iconNamed: #add );
135- help: ' Create a new protocol with the content of the input field if this protocol is not in the list' .
136-
137126 self initializeProtocolNameField
138127]
139128
@@ -166,12 +155,6 @@ StProtocolNameChooserPresenter >> initializeWindow: aWindowPresenter [
166155 aWindowPresenter whenOpenedDo: [ protocolNameField takeKeyboardFocus ]
167156]
168157
169- { #category : ' private - accessing' }
170- StProtocolNameChooserPresenter >> newProtocolButton [
171-
172- ^ newProtocolButton
173- ]
174-
175158{ #category : ' private - accessing' }
176159StProtocolNameChooserPresenter >> protocolName [
177160 ^ protocolNameField text asSymbol
@@ -249,9 +232,6 @@ StProtocolNameChooserPresenter >> selectedProtocolName [
249232{ #category : ' initialization' }
250233StProtocolNameChooserPresenter >> updatePresenter [
251234
252- newProtocolButton enabled: self protocolName isNotEmpty.
253-
254235 suggestionList
255- items: self protocolsToSuggest;
256- selectFirst
236+ items: self protocolsToSuggest
257237]
0 commit comments