[Pkg] The Trunk: Morphic-mt.1822.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Dec 13 14:29:00 UTC 2021
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1822.mcz
==================== Summary ====================
Name: Morphic-mt.1822
Author: mt
Time: 13 December 2021, 3:28:54.579192 pm
UUID: 6aeb01b5-5df5-454a-bc71-da8f12a1d206
Ancestors: Morphic-mt.1821
Makes the Morphic-specific "Find workspace" feature in TheWorldMainDockingBar more robust against nested MVC projects.
Complements Morphic-eem.1786.
Thanks to Jakob (jr) for pointing this out!
=============== Diff against Morphic-mt.1821 ===============
Item was changed:
----- Method: TheWorldMainDockingBar>>allVisibleWindows (in category 'submenu - windows') -----
allVisibleWindows
+ ^ self allVisibleWindowsIn: Project current world!
- ^SystemWindow windowsIn: Project current world satisfying: [ :w | w visible ]!
Item was added:
+ ----- Method: TheWorldMainDockingBar>>allVisibleWindowsIn: (in category 'submenu - windows') -----
+ allVisibleWindowsIn: world
+ ^SystemWindow windowsIn: world satisfying: [ :w | w visible ]!
Item was changed:
----- Method: TheWorldMainDockingBar>>workspacesMenuFor: (in category 'submenu - windows') -----
workspacesMenuFor: anUpdatingMenuMorph
+
| allWorkspaces |
allWorkspaces := Set new.
+ Project allMorphicProjects do:
- Project current topMorphicProject withChildrenDo:
[:project|
+ (self allVisibleWindowsIn: project world) do:
+ [:window|
+ (window model isKindOf: Workspace) ifTrue:
- project world submorphs do:
- [:m|
- (m model isKindOf: Workspace) ifTrue:
[allWorkspaces add:
+ { window model.
+ window.
- { m model.
- m.
project.
+ window model contents ifEmpty:
+ [(window model dependents detect: [:d| d isTextView] ifNone: nil) textMorph contents] }]]].
- m model contents ifEmpty:
- [(m model dependents detect: [:d| d isTextView] ifNone: nil) textMorph contents] }]]].
allWorkspaces isEmpty ifTrue:
[^anUpdatingMenuMorph addItem:
[:item | item
contents: 'no workspaces found']].
"Sort workspaces with non-empty ones first..."
(allWorkspaces sorted:
[:t1 :t2|
t1 last isEmpty == t2 last isEmpty
ifTrue: [t1 second label <= t2 second label]
ifFalse: [t1 last notEmpty]]) do:
[:tuple|
anUpdatingMenuMorph addItem:
[:item | item
contents: tuple second label, ': ', ((tuple last asString contractTo: 128) ifEmpty: ['(empty)']);
target: self;
selector: #selectWorkspace:window:inProject:contents:;
arguments: tuple]]!
More information about the Packages
mailing list