--- a/DirectoryContentsBrowser.st Mon Dec 04 13:17:50 2006 +0100
+++ b/DirectoryContentsBrowser.st Mon Dec 04 13:18:10 2006 +0100
@@ -1382,7 +1382,7 @@
"
|newDir currentDir aColOfFiles|
- aColOfFiles := self currentFileNameHolder value.
+ aColOfFiles := self currentSelectedObjects.
aColOfFiles isEmpty ifTrue:[
"/ selection is gone keep the current directory list
^ self
@@ -1406,6 +1406,8 @@
].
"/ change of the directory filename
self directory:newDir.
+
+ "Modified: / 04-12-2006 / 13:15:32 / cg"
!
filterBlockHolderChanged
@@ -1426,9 +1428,11 @@
] ifFalse:[
newCurrentFilename := selection.
].
- self currentFileNameHolder value ~= newCurrentFilename ifTrue:[
+ self currentSelectedObjects ~= newCurrentFilename ifTrue:[
self currentFileNameHolder value:newCurrentFilename withoutNotifying:self
].
+
+ "Modified: / 04-12-2006 / 13:15:37 / cg"
!
update:something with:aParameter from:changedObject
@@ -1484,15 +1488,30 @@
super update:something with:aParameter from:changedObject
!
-updateListAfterDelete:colOfFiles
- colOfFiles size > 100 ifTrue:[^ self].
-
- (colOfFiles collect:[:eachFile | browserItemList findFirst:[:item | item fileName = eachFile]])
- asSortedCollection reverseDo:[:eachIndexToRemove |
- eachIndexToRemove ~~ 0 ifTrue:[
- browserItemList removeIndex:eachIndexToRemove
- ]
- ].
+updateListAfterDelete:collectionOfFiles
+ |indices lastIndex nextItem|
+
+ collectionOfFiles size > 100 ifTrue:[
+ super updateListAfterDelete:collectionOfFiles.
+ ^ self
+ ].
+
+ indices := collectionOfFiles collect:[:eachFile | browserItemList findFirst:[:item | item fileName = eachFile]].
+ lastIndex := indices max.
+
+ indices asSortedCollection
+ reverseDo:[:eachIndexToRemove |
+ eachIndexToRemove ~~ 0 ifTrue:[
+ browserItemList removeIndex:eachIndexToRemove
+ ]
+ ].
+
+ nextItem := filteredItems at:lastIndex ifAbsent:nil.
+ nextItem notNil ifTrue:[
+ self selectItems:(Array with:nextItem).
+ ].
+
+ "Modified: / 04-12-2006 / 13:13:16 / cg"
!
viewPreviewChanged
@@ -1843,9 +1862,11 @@
|currentSelection|
- ((currentSelection := self currentFileNameHolder value select:[:file| file isDirectory not]) notEmpty) ifTrue:[
+ ((currentSelection := self currentSelectedObjects select:[:file| file isDirectory not]) notEmpty) ifTrue:[
self selectFiles:currentSelection.
].
+
+ "Modified: / 04-12-2006 / 13:15:34 / cg"
!
selectFiles:aColOfFilenames
@@ -2654,7 +2675,7 @@
startDiskUsageInfoProcess
|aColOfFiles selectedFile info|
- aColOfFiles := self currentFileNameHolder value.
+ aColOfFiles := self currentSelectedObjects.
(aColOfFiles isEmpty or:[self currentFilesAreInSameDirectory not]) ifTrue:[
^ self
].
@@ -2667,6 +2688,8 @@
self startDiskUsageInfoProcessFor:selectedFile.
].
].
+
+ "Modified: / 04-12-2006 / 13:15:40 / cg"
!
startDiskUsageInfoProcessFor:selectedFile
@@ -3222,5 +3245,5 @@
!DirectoryContentsBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.197 2006-11-29 12:35:26 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.198 2006-12-04 12:18:10 cg Exp $'
! !