[squeak-dev] The Inbox: Morphic-ct.2008.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 10 17:48:57 UTC 2022


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2008.mcz

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

Name: Morphic-ct.2008
Author: ct
Time: 10 June 2022, 7:48:51.419586 pm
UUID: 1f127f92-d0a1-cd48-bae1-1395a7d681a9
Ancestors: Morphic-ct.2006

Proposal: When closing all windows (unsafely), only ask the user about unsaved changes if there are actually any. Also provide an option from that dialog to only close windows without changes.

Improves multilingual support as well.

=============== Diff against Morphic-ct.2006 ===============

Item was changed:
  ----- Method: TheWorldMainDockingBar>>closeAllWindowsButWorkspaces (in category 'submenu - windows') -----
  closeAllWindowsButWorkspaces
  
  	(UserDialogBoxMorph
+ 		confirm: 'There might be unsaved changes.\Do you really want to close all windows\that are no workspaces?' withCRs translated
+ 		title: 'Only keep workspaces' translated) ifTrue: [
- 		confirm: 'There might be unsaved changes.\Do you really want to close all windows\that are no workspaces?' withCRs
- 		title: 'Only keep workspaces') ifTrue: [
  			self allVisibleWindows
  				reject: [:each | each model isKindOf: Workspace]
  				thenDo: [:each | [each delete] valueSupplyingAnswer: true]].!

Item was changed:
  ----- Method: TheWorldMainDockingBar>>closeAllWindowsUnsafe (in category 'submenu - windows') -----
  closeAllWindowsUnsafe
  
+ 	(self allVisibleWindows allSatisfy: [:each |
+ 		each model canDiscardEdits])
+ 			ifFalse:
+ 				[(Project uiManager
+ 					chooseOptionFromLabeledValues:
+ 						(OrderedDictionary new
+ 							at: 'Yes, close all windows' translated put: [#proceed];
+ 							at: 'Only windows without changes' translated put: [^ self closeAllWindows];
+ 							at: 'Cancel' put: [^ self];
+ 							yourself)
+ 					title: 'There might be unsaved changes.\Do you really want to close all windows?' withCRs translated)
+ 						value
+ 							ifNil: [^ self]].
+ 	
+ 	self allVisibleWindows do: [:each | [each delete] valueSupplyingAnswer: true].!
- 	(UserDialogBoxMorph
- 		confirm: 'There might be unsaved changes.\Do you really want to close all windows?' withCRs
- 		title: 'Close All Windows') ifTrue: [
- 			self allVisibleWindows do: [:each | [each delete] valueSupplyingAnswer: true]].!



More information about the Squeak-dev mailing list