The Trunk: ST80-nice.121.mcz

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

The Trunk: ST80-nice.121.mcz

commits-2
Nicolas Cellier uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-nice.121.mcz

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

Name: ST80-nice.121
Author: nice
Time: 29 December 2010, 4:21:35.51 pm
UUID: a6adba3b-7694-4b0b-b933-027440aaf8f9
Ancestors: ST80-ul.120

Add a few spaces in order to avoid Transcript warnings about @- ambiguity when recompiling.

Test Integer equality with = rather than == .

=============== Diff against ST80-ul.120 ===============

Item was changed:
  ----- Method: ParagraphEditor>>sameColumn:newLine:forward: (in category 'private') -----
  sameColumn: start newLine: lineBlock forward: isForward
  "Private - Compute the index in my text
  with the line number derived from lineBlock,"
  " a one argument block accepting the old line number.
  The position inside the line will be preserved as good as possible"
  "The boolean isForward is used in the border case to determine if
  we should move to the beginning or the end of the line."
  | wordStyle column currentLine offsetAtTargetLine targetEOL lines numberOfLines currentLineNumber targetLineNumber |
  wordStyle := Preferences wordStyleCursorMovement.
  wordStyle
  ifTrue: [
  lines := paragraph lines.
  numberOfLines := paragraph numberOfLines.
  currentLineNumber  := paragraph lineIndexOfCharacterIndex: start.
  currentLine := lines at: currentLineNumber]
  ifFalse: [
  lines := self lines.
  numberOfLines := lines size.
  currentLine := lines
  detect:[:lineInterval | lineInterval last >= start]
  ifNone:[lines last].
  currentLineNumber := currentLine second].
  column := start - currentLine first.
  targetLineNumber := ((lineBlock value: currentLineNumber) max: 1) min: numberOfLines.
  offsetAtTargetLine := (lines at: targetLineNumber) first.
+ targetEOL := (lines at: targetLineNumber) last + (targetLineNumber = numberOfLines ifTrue:[1]ifFalse:[0]).
+ targetLineNumber = currentLineNumber
- targetEOL := (lines at: targetLineNumber) last + (targetLineNumber == numberOfLines ifTrue:[1]ifFalse:[0]).
- targetLineNumber == currentLineNumber
  "No movement or movement failed. Move to beginning or end of line."
  ifTrue:[^isForward
  ifTrue:[targetEOL]
  ifFalse:[offsetAtTargetLine]].
  ^offsetAtTargetLine + column min: targetEOL.!

Item was changed:
  ----- Method: StandardSystemController>>cursorOnBorder (in category 'borders') -----
  cursorOnBorder
  | cp i box |
  view isCollapsed ifTrue: [^ false].
  cp := sensor cursorPoint.
+ ((view labelDisplayBox insetBy: (0 @ 2 corner: 0 @ -2)) containsPoint: cp)
- ((view labelDisplayBox insetBy: (0@2 corner: 0@-2)) containsPoint: cp)
  ifTrue: [^ false].
  (i := view subViews findFirst: [:v | v displayBox containsPoint: cp]) = 0
  ifTrue: [box := view windowBox]
  ifFalse: [box := (view subViews at: i) insetDisplayBox].
  ^ ((box insetBy: 3) containsPoint: cp) not
  and: [(box expandBy: 4) containsPoint: cp]!

Item was changed:
  ----- Method: StandardSystemView>>closeBoxFrame (in category 'label access') -----
  closeBoxFrame
+ ^ Rectangle origin: (self labelDisplayBox leftCenter + (10 @ -5)) extent: (11 @ 11)!
- ^ Rectangle origin: (self labelDisplayBox leftCenter + (10@-5)) extent: (11@11)!

Item was changed:
  ----- Method: StandardSystemView>>growBoxFrame (in category 'label access') -----
  growBoxFrame
+ ^ Rectangle origin: (self labelDisplayBox rightCenter + (-22 @ -5)) extent: (11 @ 11)!
- ^ Rectangle origin: (self labelDisplayBox rightCenter + (-22@-5)) extent: (11@11)!