Tools__ChangeList.st
changeset 11245 bd76570b2cc4
parent 11194 b7882ec27c05
child 11657 20ecaec63deb
--- a/Tools__ChangeList.st	Tue Feb 07 17:43:02 2012 +0100
+++ b/Tools__ChangeList.st	Wed Feb 08 14:55:55 2012 +0100
@@ -329,6 +329,12 @@
 
 !ChangeList methodsFor:'accessing'!
 
+acceptEnabled
+    ^ self allowAccept
+
+    "Created: / 08-02-2012 / 14:45:12 / cg"
+!
+
 allowAccept
     ^ self allowAcceptHolder value
 
@@ -563,6 +569,22 @@
     ^listView scrolledView == aView
 
     "Created: / 08-12-2009 / 14:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+handlesKeyPress:key inView:aView
+    ^(key == #Accept or:[ key == #Ctrls]) 
+        and:[ listView scrolledView == aView ]
+
+    "Created: / 08-02-2012 / 14:43:11 / cg"
+!
+
+keyPress:key x:x y:y view:aView
+    (key == #Accept or:[ key == #Ctrls]) ifTrue:[
+        self listMenuApply.
+        ^ self
+    ].
+
+    "Created: / 08-02-2012 / 14:42:18 / cg"
 ! !
 
 !ChangeList methodsFor:'generators'!
@@ -605,12 +627,23 @@
 !ChangeList methodsFor:'menu actions'!
 
 listMenuApply
+    |sel list idx|
 
     self acceptEnabled ifFalse:[^self].
 
-    self selectionHolder value do:[:e|e change apply].
+    (sel := self selectionHolder value) do:[:e|e change apply].
+    sel size == 1 ifTrue:[
+        list := self listHolder value. 
+        idx := list indexOf:(sel first). 
+        idx < list size ifTrue:[
+            self selectionHolder value:(Array with:(list at:idx+1))
+        ] ifFalse:[
+            self selectionHolder value:#()
+        ].
+    ].
 
     "Modified: / 24-10-2009 / 22:02:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 08-02-2012 / 14:53:25 / cg"
 !
 
 listMenuApplyAll
@@ -1060,11 +1093,11 @@
 !ChangeList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.13 2012-01-24 22:18:39 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.14 2012-02-08 13:55:55 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.13 2012-01-24 22:18:39 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__ChangeList.st,v 1.14 2012-02-08 13:55:55 cg Exp $'
 !
 
 version_SVN