[Pkg] The Trunk: Morphic-cmm.1458.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Jul 2 00:08:59 UTC 2018
Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.1458.mcz
==================== Summary ====================
Name: Morphic-cmm.1458
Author: cmm
Time: 1 July 2018, 7:08:29.055704 pm
UUID: 4c35981c-7629-4346-973b-408ca3f2e045
Ancestors: Morphic-cmm.1457
Recover Levente's change to use #sort: instead of asSortedCollection:, which had been done prior to my change to #findWindow:. Sorry Levente!
=============== Diff against Morphic-cmm.1457 ===============
Item was changed:
----- Method: PasteUpMorph>>findWindow: (in category 'world menu') -----
findWindow: evt
"Present a menu names of windows and naked morphs, and activate the one that gets chosen. Collapsed windows appear below line, expand if chosen; naked morphs appear below second line; if any of them has been given an explicit name, that is what's shown, else the class-name of the morph shows; if a naked morph is chosen, bring it to front and have it don a halo."
| menu expanded collapsed nakedMorphs |
menu := MenuMorph new.
expanded := SystemWindow windowsIn: self satisfying: [:w | w isCollapsed not].
collapsed := SystemWindow windowsIn: self satisfying: [:w | w isCollapsed].
nakedMorphs := self submorphsSatisfying:
[:m | (m isSystemWindow not and: [(m isStickySketchMorph) not]) and:
[(m isFlapTab) not]].
(expanded isEmpty & (collapsed isEmpty & nakedMorphs isEmpty)) ifTrue: [^ Beeper beep].
+ (expanded sort: [:w1 :w2 | w1 label caseInsensitiveLessOrEqual: w2 label]) do:
- (expanded asSortedCollection: [:w1 :w2 | w1 label caseInsensitiveLessOrEqual: w2 label]) do:
[:w | menu add: (w label contractTo: 80) target: w action: #beKeyWindow.
w model canDiscardEdits ifFalse: [menu lastItem color: Color red]].
(expanded isEmpty | (collapsed isEmpty & nakedMorphs isEmpty)) ifFalse: [menu addLine].
+ (collapsed sort: [:w1 :w2 | w1 label caseInsensitiveLessOrEqual: w2 label]) do:
- (collapsed asSortedCollection: [:w1 :w2 | w1 label caseInsensitiveLessOrEqual: w2 label]) do:
[:w | menu add: (w label contractTo: 80) target: w action: #collapseOrExpand.
w model canDiscardEdits ifFalse: [menu lastItem color: Color red]].
nakedMorphs isEmpty ifFalse: [menu addLine].
+ (nakedMorphs sort: [:w1 :w2 | w1 nameForFindWindowFeature caseInsensitiveLessOrEqual: w2 nameForFindWindowFeature]) do:
- (nakedMorphs asSortedCollection: [:w1 :w2 | w1 nameForFindWindowFeature caseInsensitiveLessOrEqual: w2 nameForFindWindowFeature]) do:
[:w | menu add: (w nameForFindWindowFeature contractTo: 80) target: w action: #comeToFrontAndAddHalo].
menu addTitle: 'find window' translated.
menu popUpEvent: evt in: self.!
More information about the Packages
mailing list