Chris Muller uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-cmm.915.mcz ==================== Summary ==================== Name: Morphic-cmm.915 Author: cmm Time: 21 April 2015, 9:28:06.618 pm UUID: 4c6df452-dfa8-4352-bb7f-4141b5c43fe8 Ancestors: Morphic-mt.914 - Let forward delete be useful for joining lines. - Reasonable minimumWidth for PluggableTextMorphs. - Don't let horizontal splitters be dragged into or above the window title bar. - Fixed the new concurrent siblings enhancement for horizontal smart splitters. - Removed an unnecessary contraction from a menu. =============== Diff against Morphic-mt.914 =============== Item was added: + ----- Method: Editor>>firstWordBoundaryAfter: (in category 'private') ----- + firstWordBoundaryAfter: position + "If the character at position is whitespace, answer the position of the first character after position which is not whitespace. + If the character at position is not whitespace, answer the position of the first character after position which is whitespace." + | string index atWhitespace | + string := self string. + index := position. + (atWhitespace := (string at: index) isSeparator) + ifTrue: + [ "find next non-separator" + [ (index + between: 1 + and: string size) and: [ (string at: index) isSeparator ] ] whileTrue: [ index := index + 1 ] ] + ifFalse: + [ "find next separator" + [ (index + between: 1 + and: string size) and: [ (string at: index) isSeparator ] ] whileFalse: [ index := index + 1 ] ]. + ^ index! Item was added: + ----- Method: PluggableTextMorph>>minWidth (in category 'geometry') ----- + minWidth + ^ 38! Item was changed: ----- Method: ProportionalSplitterMorph>>reduceTopBottomImbalance (in category 'layout') ----- reduceTopBottomImbalance | correction | + (correction := self topBottomCorrection) isZero - (correction := self topBottomImbalance) isZero ifTrue: [ self class smartHorizontalSplitters ifFalse: [ self stopStepping ] ] ifFalse: [ (self proposedCorrectionWouldCauseFocusChange: correction) ifFalse: [ self repositionBy: 0 @ correction ] ]. ^ correction! Item was changed: ----- Method: ProportionalSplitterMorph>>step (in category 'events') ----- step splitsTopAndBottom + ifTrue: [ self reduceTopBottomImbalance ] - ifTrue: - [ self reduceTopBottomImbalance isZero ifFalse: - [ self splittersAboveDo: - [ : splitter | splitter reduceTopBottomImbalance ]. - self splittersBelowDo: - [ : splitter | splitter reduceTopBottomImbalance ] ] ] ifFalse: [ self reduceLeftRightImbalance abs > 1 ifTrue: [ self splittersLeftDo: [ : splitter | splitter reduceLeftRightImbalance ]. self splittersRightDo: [ : splitter | splitter reduceLeftRightImbalance ] ] ]! Item was changed: ----- Method: ProportionalSplitterMorph>>stepTime (in category 'events') ----- stepTime "When a splitter finds itself in the right place, let it rest for about 3 seconds to avoid performance impacts of constant, rapid stepping." | pause | pause := 3000. "Frozen image when atRandom failed due to lock on its Mutex." ^ ({#(1 -1 1 ). #(-1 1 -1 )} includes: self movements asArray) ifTrue: [ pause "don't twitch" ] ifFalse: [ splitsTopAndBottom ifTrue: + [ self topBottomCorrection isZero - [ self topBottomImbalance isZero ifTrue: [ pause ] ifFalse: [ 0 ] ] ifFalse: [ self leftRightImbalance abs > 1 ifTrue: [ ">1 rather than 0 to discourage one-off twitching" 0 ] ifFalse: [ pause ] ] ]! Item was added: + ----- Method: ProportionalSplitterMorph>>topBottomCorrection (in category 'layout') ----- + topBottomCorrection + ^ self top < self topBoundary + ifTrue: [ self topBoundary - self top ] + ifFalse: + [ self bottom > (self bottomBoundary) + ifTrue: [ self bottomBoundary - self bottom ] + ifFalse: + [ | wsAbove wsBelow | + wsAbove := self canEncroachWhiteSpaceOf: leftOrTop. + wsBelow := self canEncroachWhiteSpaceOf: rightOrBottom. + wsAbove + ifTrue: + [ wsBelow + ifTrue: + [ self splitterBelow + ifNil: [ 0 ] + ifNotNil: [ : below | below topBottomCorrection min: 0 ] ] + ifFalse: [ (self top > self topBoundary) ifTrue: [-2] ifFalse: [0] ] ] + ifFalse: + [ wsBelow + ifTrue: [ (self bottom < self bottomBoundary) ifTrue: [2] ifFalse: [0] ] + ifFalse: + [ self splitterBelow + ifNil: [ 0 ] + ifNotNil: [ : below | below topBottomCorrection max: 0 ] ] ] ] ]! Item was removed: - ----- Method: ProportionalSplitterMorph>>topBottomImbalance (in category 'layout') ----- - topBottomImbalance - "First check if I find myself out of range due to user having reduced size of parent." - ^ self bottom < self topBoundary "too high" - ifTrue: [ 2 ] - ifFalse: - [ self top > self bottomBoundary "too low" - ifTrue: [ -2 ] - ifFalse: - [ | wsAbove wsBelow | - wsAbove := self canEncroachWhiteSpaceOf: leftOrTop. - wsBelow := self canEncroachWhiteSpaceOf: rightOrBottom. - wsAbove - ifTrue: - [ (wsBelow not and: [ self top > (self topBoundary + 25) ]) - ifTrue: [ -2 ] - ifFalse: [ 0 ] ] - ifFalse: - [ wsBelow - ifTrue: - [ self bottom < (self bottomBoundary - 25) - ifTrue: [ 2 ] - ifFalse: [ 0 ] ] - ifFalse: [ 0 ] ] ] ]! Item was changed: ----- Method: ProportionalSplitterMorph>>topBoundary (in category 'boundaries') ----- topBoundary "Answer the topmost x position the receiver could be moved to." | splitter morphs | splitter := self splitterAbove. morphs := self commonNeighbours: leftOrTop with: splitter. ^ (splitter + ifNil: [owner isSystemWindow ifTrue: [owner panelRect top + owner labelArea height + 3 ] - ifNil: [owner isSystemWindow ifTrue: [owner panelRect top] ifFalse: [owner innerBounds top]] ifNotNil: [splitter bottom]) + (self minimumHeightOf: morphs)! Item was added: + ----- Method: SystemWindow>>labelArea (in category 'label') ----- + labelArea + ^ labelArea! Item was changed: ----- Method: TextEditor>>forwardDelete: (in category 'typing/selecting keys') ----- forwardDelete: aKeyboardEvent "Delete forward over the next character. Make Undo work on the whole type-in, not just the one char. wod 11/3/1998: If there was a selection use #zapSelectionWith: rather than #backspace: which was 'one off' in deleting the selection. Handling of things like undo or typeIn area were not fully considered." | startIndex usel upara uinterval ind stopIndex | startIndex := self markIndex. startIndex > self text size ifTrue: [ ^ false]. self hasSelection ifTrue: [ "there was a selection" self zapSelectionWith: self nullText. ^ false]. "Null selection - do the delete forward" beginTypeInIndex ifNil: [ "no previous typing. openTypeIn" self openTypeIn. UndoSelection := self nullText]. uinterval := UndoInterval copy. upara := UndoParagraph copy. stopIndex := startIndex. (aKeyboardEvent keyValue = 127 and: [ aKeyboardEvent shiftPressed ]) + ifTrue: [stopIndex := (self firstWordBoundaryAfter: stopIndex) - 1]. - ifTrue: [stopIndex := (self nextWord: stopIndex) - 1]. self selectFrom: startIndex to: stopIndex. self replaceSelectionWith: self nullText. self selectFrom: startIndex to: startIndex-1. UndoParagraph := upara. UndoInterval := uinterval. UndoMessage selector == #noUndoer ifTrue: [ (UndoSelection isText) ifTrue: [ usel := UndoSelection. ind := startIndex. "UndoInterval startIndex" usel replaceFrom: usel size + 1 to: usel size with: (UndoParagraph text copyFrom: ind to: ind). UndoParagraph text replaceFrom: ind to: ind with: self nullText]]. ^false! Item was changed: ----- Method: TheWorldMainDockingBar>>listWindowsOn: (in category 'submenu - windows') ----- listWindowsOn: menu | windows | windows := SortedCollection sortBlock: [:winA :winB | winA model name = winB model name ifTrue: [winA label < winB label] ifFalse: [winA model name < winB model name]]. windows addAll: self allVisibleWindows. windows ifEmpty: [ menu addItem: [ :item | item contents: 'No Windows' translated; isEnabled: false ] ]. windows do: [ :each | menu addItem: [ :item | item contents: (self windowMenuItemLabelFor: each); icon: (self colorIcon: each model defaultBackgroundColor); target: each; selector: #comeToFront; subMenuUpdater: self selector: #windowMenuFor:on: arguments: { each }; action: [ each activateAndForceLabelToShow; expand ] ] ]. menu addLine; add: 'Close all windows' target: self selector: #closeAllWindowsUnsafe; + add: 'Close all windows without changes' target: self selector: #closeAllWindows; - add: 'Close all windows w/o changes' target: self selector: #closeAllWindows; add: 'Close all windows but workspaces' target: self selector: #closeAllWindowsButWorkspaces.! |
In the future, please split up your commits with the "ignore" feature in the save dialog. Its either in the context menu or CMD+SHIFT+I.
One commit should only contain related stuff. Best, Marcel |
On Wed, Apr 22, 2015 at 4:23 PM, Marcel Taeumel <[hidden email]> wrote: In the future, please split up your commits with the "ignore" feature in the Ah, what a nice feature :-) I have not seen it before. That will come in handy. KarlĀ
|
In reply to this post by marcel.taeumel (old)
On Wed, Apr 22, 2015 at 9:23 AM, Marcel Taeumel
<[hidden email]> wrote: > In the future, please split up your commits with the "ignore" feature in the > save dialog. Its either in the context menu or CMD+SHIFT+I. I know about that, I used it for some other changes which I purposely left out. > One commit should only contain related stuff. I'm sorry I guess we disagree on this point. I don't like when a whole new 2MB Morphic mcz is made to, i.e., change a method comment. When we have a mix of 80% "non-changes" in the history with 20% "changes", it really dilutes the usefulness of the history (not to mention, slowness and bloat). If I have a big change, then yes, I'll usually group the methods into their own commit(s), but when I have several small fixes, I see benefit, not harm, in batching them up. |
Well.... a 2 megs mcz file should be no excuse to "mess up" the commit history on purpose.
Topmost priority should be to make understandable commits. Actually, no programmer should have to care about what is going on "behind the curtains" while committing. His task is to make a *coherent and complete commit* with a *descriptive commit message* --- to not make it unnecessarily hard for other programmers to understand that commit later. Seriously... :-/ Best, Marcel |
Free forum by Nabble | Edit this page |