The Trunk: MorphicExtras-ul.61.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: MorphicExtras-ul.61.mcz

commits-2
Levente Uzonyi uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ul.61.mcz

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

Name: MorphicExtras-ul.61
Author: ul
Time: 12 December 2009, 2:45:15 am
UUID: a20ba135-56e1-8f4a-8e1c-dca1119bd410
Ancestors: MorphicExtras-ul.60

- replace sends of #ifNotNilDo: to #ifNotNil:, #ifNil:ifNotNilDo: to #ifNil:ifNotNil:, #ifNotNilDo:ifNil: to #ifNotNil:ifNil:

=============== Diff against MorphicExtras-ul.60 ===============

Item was changed:
  ----- Method: URLMorph>>enclosingPage (in category 'private') -----
  enclosingPage
  "Answer the inner-most SqueakPage contents that contains this morph, or nil if there isn't one."
 
  self allOwnersDo:
  [:m | (m isKindOf: PasteUpMorph)
+ ifTrue: [(SqueakPageCache pageForMorph: m) ifNotNil: [:pg | ^ pg]]].
- ifTrue: [(SqueakPageCache pageForMorph: m) ifNotNilDo: [:pg | ^ pg]]].
  ^ nil
  !

Item was changed:
  ----- Method: Flaps class>>twiddleSuppliesButtonsIn: (in category 'predefined flaps') -----
  twiddleSuppliesButtonsIn: aStrip
  "Munge item(s) in the strip whose names as seen in the parts bin should be different from the names to be given to resulting torn-off instances"
 
  (aStrip submorphs detect: [:m | m target == StickyPadMorph] ifNone: [nil])
+ ifNotNil:
- ifNotNilDo:
  [:aButton | aButton arguments: {#newStandAlone.  'tear off'}]!

Item was changed:
  ----- Method: Flaps class>>sharedFlapsAlongBottom (in category 'shared flaps') -----
  sharedFlapsAlongBottom
  "Put all shared flaps (except Painting which can't be moved) along the bottom"
  "Flaps sharedFlapsAlongBottom"
 
  | leftX unordered ordered |
  unordered _ self globalFlapTabsIfAny asIdentitySet.
  ordered _ Array streamContents:
  [:s | {
  'Squeak' translated.
  'Navigator' translated.
  'Supplies' translated.
  'Widgets' translated.
  'Stack Tools' translated.
  'Tools' translated.
  'Painting' translated.
  } do:
+ [:id | (self globalFlapTabWithID: id) ifNotNil:
- [:id | (self globalFlapTabWithID: id) ifNotNilDo:
  [:ft | unordered remove: ft.
  id = 'Painting' translated ifFalse: [s nextPut: ft]]]].
 
  "Pace off in order from right to left, setting positions"
  leftX _ Display width-15.
  ordered , unordered asArray reverseDo:
  [:ft | ft setEdge: #bottom.
  ft right: leftX - 3.  leftX _ ft left].
 
  "Put Nav Bar centered under tab if possible"
+ (self globalFlapTabWithID: 'Navigator' translated) ifNotNil:
- (self globalFlapTabWithID: 'Navigator' translated) ifNotNilDo:
  [:ft | ft referent left: (ft center x - (ft referent width//2) max: 0)].
  self positionNavigatorAndOtherFlapsAccordingToPreference.
  !

Item was changed:
  ----- Method: BookMorph>>adjustCurrentPageForFullScreen (in category 'other') -----
  adjustCurrentPageForFullScreen
  "Adjust current page to conform to whether or not I am in full-screen mode.  Also, enforce uniform page size constraint if appropriate"
 
  self isInFullScreenMode
  ifTrue:
  [(currentPage hasProperty: #sizeWhenNotFullScreen) ifFalse:
  [currentPage setProperty: #sizeWhenNotFullScreen toValue: currentPage extent].
  currentPage extent: Display extent]
  ifFalse:
  [(currentPage hasProperty: #sizeWhenNotFullScreen) ifTrue:
  [currentPage extent: (currentPage valueOfProperty: #sizeWhenNotFullScreen).
  currentPage removeProperty: #sizeWhenNotFullScreen].
+ self uniformPageSize ifNotNil:
- self uniformPageSize ifNotNilDo:
  [:anExtent | currentPage extent: anExtent]].
+ (self valueOfProperty: #floatingPageControls) ifNotNil:
- (self valueOfProperty: #floatingPageControls) ifNotNilDo:
  [:pc | pc isInWorld ifFalse: [pc openInWorld]]!

Item was changed:
  ----- Method: PostscriptCanvas>>textStyled:at:font:color:justified:parwidth: (in category 'private') -----
  textStyled: s at: ignored0 font: ignored1 color: c justified: justify parwidth: parwidth
  | fillC oldC |
  fillC := c.
  self shadowColor
+ ifNotNil: [:sc |
- ifNotNilDo: [:sc |
  self comment: ' shadow color: ' , sc printString.
  fillC := sc].
  self comment: ' text color: ' , c printString.
  oldC := currentColor.
  self setColor: fillC.
  self comment: '  origin ' , origin printString.
  "self moveto: point."
  "now done by sender"
  target print: ' (';
  print: s asPostscript;
  print: ') '.
  justify
  ifTrue: [target write: parwidth;
  print: ' jshow';
  cr]
  ifFalse: [target print: 'show'].
  target cr.
  self setColor: oldC.!