# HG changeset patch # User Claus Gittinger # Date 1253038869 -7200 # Node ID af2b69a16e0470761314b6347e1092631551391a # Parent 67a77c2fcb03f81a7577c373939a8315b4eb69bf preps for right-menu on buttonRelease button naming - no symbols any longer. diff -r 67a77c2fcb03 -r af2b69a16e04 HierarchicalListView.st --- a/HierarchicalListView.st Tue Sep 15 20:21:07 2009 +0200 +++ b/HierarchicalListView.st Tue Sep 15 20:21:09 2009 +0200 @@ -1189,43 +1189,43 @@ line := self yVisibleToLineNr:y. line notNil ifTrue:[ - item := self at:line ifAbsent:nil. - item notNil ifTrue:[ - "/ translate the coordinate relative to the items origin - xIcon := self xVisibleOfIconAtLevel:(item level). - x >= xIcon ifTrue:[ - xLabel := self xVisibleOfTextAtLevel:(item level). - yItem := self yVisibleOfLine:line. + item := self at:line ifAbsent:nil. + item notNil ifTrue:[ + "/ translate the coordinate relative to the items origin + xIcon := self xVisibleOfIconAtLevel:(item level). + x >= xIcon ifTrue:[ + xLabel := self xVisibleOfTextAtLevel:(item level). + yItem := self yVisibleOfLine:line. - x >= xLabel ifTrue:[ - (item processButtonPress:button x:(x - xLabel) y:(y - yItem) on:self) == true ifTrue:[ - ^ self - ] - ]. - (item processButtonPressOnIcon:button on:self) == true ifTrue:[ - ^ self - ] - ]. - ] + x >= xLabel ifTrue:[ + (item processButtonPress:button x:(x - xLabel) y:(y - yItem) on:self) == true ifTrue:[ + ^ self + ] + ]. + (item processButtonPressOnIcon:button on:self) == true ifTrue:[ + ^ self + ] + ]. + ] ] ifFalse:[ - item := nil + item := nil ]. showIndicators ifTrue:[ - (button == 1 or:[button == #select]) ifTrue:[ - (item notNil and:[item hasIndicator]) ifTrue:[ - x0 := self xVisibleOfIndicatorAtLevel:(item level). + (button == 1) ifTrue:[ + (item notNil and:[item hasIndicator]) ifTrue:[ + x0 := self xVisibleOfIndicatorAtLevel:(item level). - (x between:x0 and:(x0 + indicatorWidth)) ifTrue:[ - (item isExpanded and:[item canCollapse not]) ifTrue:[ - "/ a special one (like a non-collapsable root) - ] ifFalse:[ - self indicatorPressedAt:line. - ^ self - ]. - ]. - ]. - ]. + (x between:x0 and:(x0 + indicatorWidth)) ifTrue:[ + (item isExpanded and:[item canCollapse not]) ifTrue:[ + "/ a special one (like a non-collapsable root) + ] ifFalse:[ + self indicatorPressedAt:line. + ^ self + ]. + ]. + ]. + ]. ]. super buttonPress:button x:x y:y. @@ -1733,5 +1733,5 @@ !HierarchicalListView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.114 2009-08-07 10:50:41 sr Exp $' + ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.115 2009-09-15 18:21:09 cg Exp $' ! !