[squeak-dev] The Inbox: MonticelloConfigurations-dtl.167.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Apr 18 18:44:28 UTC 2020


A new version of MonticelloConfigurations was added to project The Inbox:
http://source.squeak.org/inbox/MonticelloConfigurations-dtl.167.mcz

==================== Summary ====================

Name: MonticelloConfigurations-dtl.167
Author: dtl
Time: 18 April 2020, 2:43:49.12216 pm
UUID: f314d749-9865-4d09-86e6-ac2727f7f0a6
Ancestors: MonticelloConfigurations-dtl.166

When saving an MCConlfiguration, let the comment editor check on accept to  ensure that editing is complete before proceeding to save. On cancel, undo changes to the name. Edit window stays open until user confirms, and is closed on save or cancel.

=============== Diff against MonticelloConfigurations-dtl.166 ===============

Item was added:
+ ----- Method: MCConfigurationBrowser>>activeEditWindow (in category 'morphic ui') -----
+ activeEditWindow
+ 	^activeEditWindow
+ !

Item was removed:
- ----- Method: MCConfigurationBrowser>>enterVersionCommentAndCompleteWith: (in category 'morphic ui') -----
- enterVersionCommentAndCompleteWith: aConfigBrowser
- 	| editWindow |
- 	editWindow := UIManager default
- 		edit: configuration comment
- 		label: 'Enter or edit a comment for this configuration update'
- 		accept: [:aText |
- 			configuration comment: aText asString.
- 			Project current
- 				addDeferredUIMessage: [aConfigBrowser completeStoreAction]].
- 	aConfigBrowser activeEditWindow: editWindow.
- !

Item was added:
+ ----- Method: MCConfigurationBrowser>>enterVersionCommentAndCompleteWith:nameForRestore: (in category 'morphic ui') -----
+ enterVersionCommentAndCompleteWith: aConfigBrowser nameForRestore: originalName
+ 	"Open an editor for comment entry. When text is accepted from the editor, ask
+ 	if editing is done. If complete, then proceed to save the MCConfiguration. If cancelled,
+ 	close the edit window and do nothing further. Otherwise leave the edit window open
+ 	to allow further edits before proceeding to save the configuration."
+ 	| editWindow |
+ 	editWindow := UIManager default
+ 		edit: configuration comment
+ 		label: 'Enter or edit a comment for ', configuration name
+ 		accept: [:aText | | editingComplete |
+ 			editingComplete := UIManager default
+ 				confirm: 'Comment accepted' translated
+ 				title: 'Comment for ' translated, configuration name
+ 				trueChoice: 'Proceed to save configuration' translated
+ 				falseChoice: 'Continue editing comment' translated.
+ 			editingComplete
+ 				ifNil: [ "cancel button pressed"
+ 					configuration name: originalName. "cancelling, undo the changed name"
+ 					Project current
+ 					addDeferredUIMessage: [aConfigBrowser activeEditWindow ifNotNil: [ :win | win delete ]]] 
+ 				ifNotNil: [ editingComplete
+ 					ifTrue: [configuration comment: aText asString.
+ 						Project current
+ 							addDeferredUIMessage: [aConfigBrowser completeStoreAction]]
+ 					ifFalse: [ "edit window remains open" ]]].
+ 	aConfigBrowser activeEditWindow: editWindow.
+ !

Item was changed:
  ----- Method: MCConfigurationBrowser>>store (in category 'actions') -----
  store
  	self activeEditWindow: nil. "Close previous if still open"
  	(self checkRepositories and: [self checkDependencies]) ifFalse: [^self].
+ 	self pickName ifNotNil: [:name | | originalName |
+ 		originalName := configuration name.
- 	self pickName ifNotNil: [:name |
  		configuration name: name.
+ 		self enterVersionCommentAndCompleteWith: self nameForRestore: originalName ].!
- 		self enterVersionCommentAndCompleteWith: self].!



More information about the Squeak-dev mailing list