[Pkg] The Trunk: Morphic-ar.280.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 2 22:23:18 UTC 2010

Andreas Raab uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-ar.280
Author: ar
Time: 2 January 2010, 2:55:39 am
UUID: 7a46adae-0f5d-0b40-9ff4-c0e33a410cb8
Ancestors: Morphic-dtl.279

Time to take the plunge: The Cuis editors have been working great for a long time now, so switch to using them exclusively and remove the preference allowing to switch back (one can still switch back by changing the defaultEditorClass manually). Also, fixes one annoying incompatibility with Cuis editors namely that the default was not to allow selection shrinking.

=============== Diff against Morphic-dtl.279 ===============

Item was added:
+ ----- Method: Editor class>>selectionsMayShrink (in category 'preferences') -----
+ selectionsMayShrink
+ 	<preference: 'Selections may shrink'
+ 		category: 'Morphic'
+ 		description: 'When true, allows selection to shrink when using shift+cursor keys'
+ 		type: #Boolean>
+ 	^SelectionsMayShrink ifNil:[true]!

Item was changed:
  Object subclass: #Editor
  	instanceVariableNames: 'sensor morph selectionShowing'
+ 	classVariableNames: 'SelectionsMayShrink'
- 	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Morphic-Text Support'!
  !Editor commentStamp: '<historical>' prior: 0!
  New text editors.
  TextEditor provides most of the functionality that used to be in TextMorphEditor. This class is no longer a Controller!!
  SmalltalkEditor is has Smalltalk code specific features.
  SimpleEditor provides basic functionality for single line text editing. It does not handle fonts and styles, aligning and Smalltalk utilities. It handles one single line.
  CellStyleEditor allows entering alphabetic characters using only number keys, like most cell phones do.!

Item was changed:
  ----- Method: Editor>>setIndices:forward: (in category 'private') -----
  setIndices: shiftPressed forward: forward
  	"Little helper method that sets the moving and fixed indices according to some flags."
  	| indices |
  	indices _ Dictionary new.
+ 	(shiftPressed and:[self class selectionsMayShrink])
- 	(shiftPressed and:[Preferences selectionsMayShrink])
  		ifTrue: [
  			indices at: #moving put: self pointIndex.
  			indices at: #fixed put: self markIndex
  		] ifFalse: [
  					indices at: #moving put: self stopIndex.
  					indices at: #fixed put: self startIndex.
  				] ifFalse: [
  					indices at: #moving put: self startIndex.
  					indices at: #fixed put: self stopIndex.

Item was added:
+ ----- Method: Editor class>>selectionsMayShrink: (in category 'preferences') -----
+ selectionsMayShrink: aBool
+ 	SelectionsMayShrink := aBool.!

Item was changed:
  ----- Method: TextMorph class>>initialize (in category 'class initialization') -----
  initialize	"TextMorph initialize"
  	"Initialize the default text editor class to use"
+ 	DefaultEditorClass := SmalltalkEditor.
- 	DefaultEditorClass := TextMorphEditor.
  	"Initialize constants shared by classes associated with text display."
  	CaretForm := (ColorForm extent: 16 at 5
  					fromArray: #(2r001100e26 2r001100e26 2r011110e26 2r111111e26 2r110011e26)
  					offset: -2 at 0)
  					colors: (Array with: Color transparent with: Preferences textHighlightColor).
  	self registerInFlapsRegistry.

Item was removed:
- ----- Method: TextMorph class>>useNewEditors: (in category 'preferences') -----
- useNewEditors: aBool
- 	"Enable/disable the new text editors"
- 	self defaultEditorClass: (aBool ifTrue:[SmalltalkEditor] ifFalse:[TextMorphEditor])!

Item was removed:
- ----- Method: TextMorph class>>useNewEditors (in category 'preferences') -----
- useNewEditors
- 	"Enable/disable the new text editors"
- 	<preference: 'Use New Editors'
- 		category: 'Morphic'
- 		description: 'When true, use the new (Cuis-based) editors'
- 		type: #Boolean>
- 	^DefaultEditorClass == SmalltalkEditor!

More information about the Packages mailing list