diff -r 5a78ebab56ff -r 9e588f397bc9 UIPainter.st --- a/UIPainter.st Thu Oct 30 01:54:26 1997 +0100 +++ b/UIPainter.st Thu Oct 30 16:48:51 1997 +0100 @@ -10,6 +10,7 @@ hereby transferred. " + ApplicationModel subclass:#UIPainter instanceVariableNames:'treeView selectionPanel tabSelection specClass specSelector specSuperclass aspects layoutCanvas helpCanvas specCanvas @@ -218,7 +219,7 @@ !UIPainter class methodsFor:'helpers'! -convertString:aString maxLineSize:maxCharactersPerLine +convertString:aString maxLineSize:maxCharactersPerLine skipLineFeed:skipLineFeed "converts a string to a string collection with maximum characters per line " @@ -244,19 +245,32 @@ (start := aString indexOfNonSeparatorStartingAt:start) == 0 ifTrue:[ ^ stream contents ]. - (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ - stop := size + 1 - ]. - cpySz := stop - start. - - lnSz == 0 ifFalse:[ - (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz ] - ifFalse:[stream space. lnSz := lnSz + 1] - ] ifTrue:[ - lnSz := cpySz - ]. - stream nextPutAll:aString startingAt:start to:(stop - 1). - start := stop. + (aString at:start) == $\ ifTrue:[ + skipLineFeed ifFalse:[ + stream nextPut:$\ + ]. + start := start + 1. + stream cr. + start := start + 1. + lnSz := 0. + ] ifFalse:[ + (stop := aString indexOfSeparatorStartingAt:start) == 0 ifTrue:[ + stop := size + 1 + ]. + (aString at:(stop - 1)) == $\ ifTrue:[ + stop := stop - 1 + ]. + cpySz := stop - start. + + lnSz == 0 ifFalse:[ + (lnSz := lnSz + cpySz) >= max ifTrue:[stream cr. lnSz := cpySz ] + ifFalse:[stream space. lnSz := lnSz + 1] + ] ifTrue:[ + lnSz := cpySz + ]. + stream nextPutAll:aString startingAt:start to:(stop - 1). + start := stop. + ] ]. ^ stream contents ! ! @@ -1684,7 +1698,8 @@ ] ifFalse:[ txt := self class convertString:(aHelpText asString) - maxLineSize:(transcript width // transcript font width). + maxLineSize:(transcript width // transcript font width) + skipLineFeed:true ]. transcript hideCursor. transcript contents:txt. @@ -3349,6 +3364,8 @@ " super initialize. self multipleSelectOk:true. + cvsEventsDisabled := false. + ! ! !UIPainter::TreeView methodsFor:'private'!