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

commits at source.squeak.org commits at source.squeak.org
Fri Jun 10 17:52:36 UTC 2022


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

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

Name: Morphic-ct.2009
Author: ct
Time: 10 June 2022, 7:52:30.248586 pm
UUID: 00155f55-d7b7-1d4c-9965-d1a8ff872513
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.

Revision: Improve user strings. Sorry for the noise.

=============== 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: 'Close only windows without changes' translated put: [^ self closeAllWindows];
+ 							at: 'Cancel' put: [^ self];
+ 							yourself)
+ 					title: 'There are 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