[squeak-dev] The Trunk: Morphic-laza.356.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 26 16:27:09 UTC 2010


Alexander Lazarević uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-laza.356.mcz

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

Name: Morphic-laza.356
Author: laza
Time: 26 February 2010, 5:25:53.469 pm
UUID: 65ce931d-e5b6-4ad7-abb4-045f0a57170b
Ancestors: Morphic-ar.355

The window menu and the expand button are locked in passive SystemWindows. Now they are also hidden to visually reflect the fact, that they only can be used in an active window.
Should also work with the NoviceMode Preference Setting.

=============== Diff against Morphic-ar.355 ===============

Item was changed:
  ----- Method: SystemWindow>>passivate (in category 'top window') -----
  passivate
  	"Make me unable to respond to mouse and keyboard"
  
  	label ifNotNil: [label color: Color darkGray].
  	self setStripeColorsFrom: self paneColorToUse.
  	model modelSleep.
  
  	"Control boxes remain active, except in novice mode"
  	self submorphsDo: [:m |
  		m == labelArea ifFalse:
  			[m lock]].
  	labelArea ifNotNil:
  		[labelArea submorphsDo: [:m |
+ 			m == label
+ 				ifTrue: [m lock]
+ 				ifFalse: [
+ 					Preferences noviceMode
+ 						ifTrue: [m lock; hide]
+ 						ifFalse: [
+ 							({closeBox. collapseBox. label} includes: m)
+ 								ifFalse: [m lock; hide]]]]]
- 			(m == closeBox or: [m == collapseBox])
- 				ifTrue:
- 					[Preferences noviceMode ifTrue: [m lock]]
- 				ifFalse:
- 					[m lock]]]
  		ifNil: "i.e. label area is nil, so we're titleless"
  			[self adjustBorderUponDeactivationWhenLabeless].
  !

Item was changed:
  ----- Method: SystemWindow>>activateWindow (in category 'top window') -----
  activateWindow
  	"Bring me to the front and make me able to respond to mouse and keyboard.
  	Was #activate (sw 5/18/2001 23:20)"
  
  	| oldTop outerMorph sketchEditor pal |
  	outerMorph := self topRendererOrSelf.
  	outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"].
  	oldTop := TopWindow.
  	oldTop = self ifTrue: [^self].
  	TopWindow := self.
  	oldTop ifNotNil: [oldTop passivate].
  	outerMorph owner firstSubmorph == outerMorph
  		ifFalse: ["Bring me (with any flex) to the top if not already"
  				outerMorph owner addMorphFront: outerMorph].
  	self submorphsDo: [:m | m unlock].
  
  	label ifNotNil: [label color: Color black].
  
  	labelArea ifNotNil:
+ 		[labelArea submorphsDo: [:m | m unlock; show].
- 		[labelArea submorphsDo: [:m | m unlock].
  		self setStripeColorsFrom: self paneColorToUse].
  	self isCollapsed ifFalse:
  		[model modelWakeUpIn: self.
  		self positionSubmorphs.
  		labelArea ifNil: [self adjustBorderUponActivationWhenLabeless]].
  
  	(sketchEditor := self extantSketchEditor) ifNotNil:
  		[sketchEditor comeToFront.
  		(pal := self world findA: PaintBoxMorph) ifNotNil:
  			[pal comeToFront]].
  !




More information about the Squeak-dev mailing list