[squeak-dev] The Trunk: Morphic-mt.770.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Mar 6 07:44:44 UTC 2015
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.770.mcz
==================== Summary ====================
Name: Morphic-mt.770
Author: mt
Time: 6 March 2015, 8:44:10.825 am
UUID: c8483e78-e2d0-9747-9517-7b4b51ae1b6d
Ancestors: Morphic-mt.769
Convenience items added to "Windows" menu in world main docking bar to close multiple or all windows at once.
Idea: Clean up the whole world and start a new task with few clicks.
=============== Diff against Morphic-mt.769 ===============
Item was added:
+ ----- Method: TheWorldMainDockingBar>>closeAllWindows (in category 'submenu - windows') -----
+ closeAllWindows
+ self allVisibleWindows do: [:each |
+ each model canDiscardEdits ifTrue: [each delete]]!
Item was added:
+ ----- 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
+ title: 'Only keep workspaces') ifTrue: [
+ self allVisibleWindows
+ reject: [:each | each model isKindOf: Workspace]
+ thenDo: [:each | [each delete] valueSupplyingAnswer: true]].!
Item was added:
+ ----- Method: TheWorldMainDockingBar>>closeAllWindowsUnsafe (in category 'submenu - windows') -----
+ closeAllWindowsUnsafe
+
+ (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]].!
Item was changed:
----- Method: TheWorldMainDockingBar>>listWindowsOn: (in category 'submenu - windows') -----
listWindowsOn: menu
| windows |
windows := SortedCollection sortBlock: [:winA :winB |
winA model name = winB model name
ifTrue: [winA label < winB label]
ifFalse: [winA model name < winB model name]].
windows addAll: self allVisibleWindows.
windows ifEmpty: [
menu addItem: [ :item |
item
contents: 'No Windows' translated;
isEnabled: false ] ].
windows do: [ :each |
menu addItem: [ :item |
item
contents: (self windowMenuItemLabelFor: each);
icon: (self colorIcon: each model defaultBackgroundColor);
target: each;
selector: #comeToFront;
subMenuUpdater: self
selector: #windowMenuFor:on:
arguments: { each };
+ action: [ each activateAndForceLabelToShow; expand ] ] ].
+ menu
+ addLine;
+ add: 'Close all windows' target: self selector: #closeAllWindowsUnsafe;
+ add: 'Close all windows w/o changes' target: self selector: #closeAllWindows;
+ add: 'Close all windows but workspaces' target: self selector: #closeAllWindowsButWorkspaces.!
- action: [ each activateAndForceLabelToShow; expand ] ] ].!
More information about the Squeak-dev
mailing list
|