[Pkg] The Trunk: Morphic-eem.1788.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Nov 11 16:30:57 UTC 2021
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1788.mcz
==================== Summary ====================
Name: Morphic-eem.1788
Author: eem
Time: 11 November 2021, 8:30:51.470436 am
UUID: e753f115-212a-4e40-92e4-311bc7d73095
Ancestors: Morphic-pre.1787
Fix the Find Workspace... facility when there are no workspaces to be found. Show empty workspaces more gracefully.
=============== Diff against Morphic-pre.1787 ===============
Item was changed:
----- Method: TheWorldMainDockingBar>>workspacesMenuFor: (in category 'submenu - windows') -----
workspacesMenuFor: anUpdatingMenuMorph
| allWorkspaces |
allWorkspaces := Set new.
Project current topMorphicProject withChildrenDo:
[:project|
project world submorphs do:
[:m|
(m model isKindOf: Workspace) ifTrue:
[allWorkspaces add:
{ m model.
m.
project.
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)']);
- contents: tuple second label, ': ', (tuple last asString contractTo: 128);
target: self;
selector: #selectWorkspace:window:inProject:contents:;
arguments: tuple]]!
More information about the Packages
mailing list