--- a/SelectionInListModelView.st Thu Jun 05 18:37:59 2008 +0200
+++ b/SelectionInListModelView.st Fri Jun 06 10:41:00 2008 +0200
@@ -20,7 +20,7 @@
dropSource editorView openEditorAction closeEditorAction
highlightEnterItem enterItem cursorItem lineMask keyActionStyle
returnKeyActionStyle strikeOut modelChangedDuringButtonPress
- selectOnButtonPress'
+ selectOnButtonPress selectOnMenuButton'
classVariableNames:'DefaultHilightStyle DefaultHilightBackgroundColor
DefaultHilightForegroundColor DefaultHilightLevel
DefaultHilightFrameColor'
@@ -499,19 +499,23 @@
!
selectOnButtonMenu
+ <resource: #obsolete>
"define the button-menu-press behavior; if true the line under the mouse
will be selected before the menu is opened. Otherwise the menu is opened
on the current selection."
- ^ selectOnButtonMenu
+ self obsoleteMethodWarning:'use selectOnMenuButton'.
+ ^ self selectOnMenuButton
!
selectOnButtonMenu:aBoolean
+ <resource: #obsolete>
"define the button-menu-press behavior; if true the line under the mouse
will be selected before the menu is opened. Otherwise the menu is opened
on the current selection."
- selectOnButtonMenu := aBoolean.
+ self obsoleteMethodWarning:'use selectOnMenuButton:'.
+ self selectOnMenuButton:aBoolean.
!
selectOnButtonPress
@@ -531,6 +535,22 @@
selectOnButtonPress := aBoolean
!
+selectOnMenuButton
+ "define the button-menu-press behavior; if true the line under the mouse
+ will be selected before the menu is opened. Otherwise the menu is opened
+ on the current selection."
+
+ ^ selectOnMenuButton
+!
+
+selectOnMenuButton:aBoolean
+ "define the button-menu-press behavior; if true the line under the mouse
+ will be selected before the menu is opened. Otherwise the menu is opened
+ on the current selection."
+
+ selectOnMenuButton := aBoolean.
+!
+
toggleSelect
"get the toggleSelect flag - see method #toggleSelect: for more details
"
@@ -1251,7 +1271,7 @@
lineNr := self yVisibleToLineNr:y.
((button == 2) or:[button == #menu]) ifTrue:[
- (selectOnButtonMenu and:[self numberOfSelections <= 1]) ifTrue:[
+ (selectOnMenuButton and:[self numberOfSelections <= 1]) ifTrue:[
( lineNr notNil
and:[self canSelectIndex:lineNr forAdd:false ]
) ifTrue:[
@@ -1889,7 +1909,7 @@
initStyle
"setup viewStyle specifics
"
- <resource: #style (#'selection.selectOnButtonMenu'
+ <resource: #style (#'selection.selectOnMenuButton'
#'selection.font')>
super initStyle.
@@ -1901,7 +1921,7 @@
hilightStyle := DefaultHilightStyle.
highlightMode := #label.
textStartLeft := 4.
- selectOnButtonMenu := styleSheet at:#'selection.selectOnButtonMenu' default:false.
+ selectOnMenuButton := styleSheet at:#'selection.selectOnMenuButton' default:false.
super font:(styleSheet fontAt:#'selection.font').
@@ -2498,5 +2518,5 @@
!SelectionInListModelView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.132 2008-04-23 13:22:12 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.133 2008-06-06 08:41:00 cg Exp $'
! !