--- a/FBrowser.st Tue Oct 08 16:47:44 1996 +0200
+++ b/FBrowser.st Tue Oct 08 17:00:44 1996 +0200
@@ -150,7 +150,10 @@
"toggle from long to short listing (and vice-versa)"
showLongList := showLongList not.
+ tabSpec := nil.
self updateCurrentDirectory
+
+ "Modified: 8.10.1996 / 15:58:47 / cg"
!
changeDotFileVisibility
@@ -1336,10 +1339,12 @@
tabSpec := TabulatorSpecification new.
tabSpec unit:#inch.
"/ tabSpec positions:#(0 2 2.3 4.3 5.3 6.0 6.5).
- tabSpec widths: #(2 0.3 1.7 1 0.5 0.5 1"any").
+ tabSpec widths: #(2 0.3 2.0 1 0.5 0.5 1"any").
" name type mode owner group size type"
tabSpec align: #(#left #left #left #right #right #decimal #left).
tabSpec addDependent:self
+
+ "Modified: 8.10.1996 / 15:59:28 / cg"
!
doChangeCurrentDirectoryTo:fileName updateHistory:updateHistory
@@ -2158,161 +2163,160 @@
"
self withReadCursorDo:[
- Processor removeTimedBlock:checkBlock.
-
- timeOfLastCheck := AbsoluteTime now.
-
- files := currentDirectory asOrderedCollection.
-
- matchPattern := filterField contents.
- (matchPattern notNil and:[
- matchPattern isEmpty not and:[
- matchPattern ~= '*']]) ifTrue:[
- files := files select:[:aName |
- ((currentDirectory typeOf:aName) == #directory)
- or:[matchPattern match:aName]
- ].
- ].
- files sort.
-
- files size == 0 ifTrue:[
- self information:('directory ', currentDirectory pathName, ' vanished').
- ^ self
- ].
- files := self withoutHiddenFiles:files.
- fileList := files copy.
-
- "
- this is a time consuming operation (especially, if reading an
- NFS-mounted directory); therefore lower my priority while getting
- the files info ...
- "
- Processor activeProcess withLowerPriorityDo:[
-
- "
- first show the names only - this is relatively fast
- "
- fileListView setList:files expandTabs:false.
-
- "
- then walk over the files, adding more info
- (since we have to stat each file, this may take a while longer
- "
- showLongList ifTrue:[
- tabSpec isNil ifTrue:[self defineTabulatorsForLongList].
-
- text := OrderedCollection new.
- files keysAndValuesDo:[:lineIndex :aFileName |
- |entry col typ f p typeString|
-
- entry := MultiColListEntry new.
- entry tabulatorSpecification:tabSpec.
-
- "
- if multiple FileBrowsers are reading, let others
- make some progress too
- "
- windowGroup notNil ifTrue:[windowGroup processExposeEvents].
- Processor yield.
- "
- could be destroyed in the meanwhile ...
- "
- realized ifFalse:[^ self].
-
- len := aFileName size.
- (len < 20) ifTrue:[
- line := aFileName , (String new:(22 - len))
- ] ifFalse:[
- "can happen on BSD only"
- line := (aFileName copyTo:20) , ' '
- ].
- entry colAt:1 put:line.
-
- info := currentDirectory infoOf:aFileName.
- info isNil ifTrue:[
- "not accessable - usually a symlink,
- to a nonexisting/nonreadable file
- "
- entry colAt:2 put:'?'.
- entry colAt:3 put:'(bad symbolic link ?)'.
- ] ifFalse:[
- typ := (info at:#type).
- (typ == #regular) ifFalse:[
- entry colAt:2 put:(typ at:1) asString.
- ] ifTrue:[
- entry colAt:2 put:' '.
- ].
-
- modeString := self getModeString:(info at:#mode)
- with:#( '' $r $w $x
- ' ' $r $w $x
- ' ' $r $w $x ).
- entry colAt:3 put:modeString.
-
- ((info at:#uid) ~~ prevUid) ifTrue:[
- prevUid := (info at:#uid).
- nameString := OperatingSystem getUserNameFromID:prevUid.
- nameString := nameString , (String new:(10 - nameString size))
- ].
- entry colAt:4 put:nameString withoutSpaces.
- ((info at:#gid) ~~ prevGid) ifTrue:[
- prevGid := (info at:#gid).
- groupString := OperatingSystem getGroupNameFromID:prevGid.
- groupString := groupString , (String new:(10 - groupString size))
- ].
- entry colAt:5 put:groupString withoutSpaces.
-
- (typ == #regular) ifTrue:[
- entry colAt:6 put:(self sizePrintString:(info at:#size)).
- ].
-
- f := currentDirectory asFilename:aFileName.
- f isSymbolicLink ifTrue:[
- p := f linkInfo at:#path.
- typeString := 'symbolic link to ' , p
- ] ifFalse:[
- (showVeryLongList not or:[typ == #directory]) ifTrue:[
- typeString := typ asString
- ] ifFalse:[
- typeString := f fileType.
- ].
- ].
- entry colAt:7 put:typeString.
- text add:entry
- ].
- fileListView at:lineIndex put:entry
- ].
- ] ifFalse:[
- files keysAndValuesDo:[:lineIndex :aName |
- |entry|
-
- "
- if multiple FileBrowsers are reading, let others
- make some progress too
- "
- windowGroup notNil ifTrue:[windowGroup processExposeEvents].
- Processor yield.
- realized ifFalse:[^ self].
-
- ((currentDirectory isDirectory:aName) and:[
- (aName ~= '..') and:[aName ~= '.']]) ifTrue:[
- entry := aName , ' ...'
- ] ifFalse:[
- entry := aName
- ].
- fileListView at:lineIndex put:entry
- ].
- ].
- ].
-
- "
- install a new check after some time
- "
- Processor addTimedBlock:checkBlock afterSeconds:checkDelta
+ Processor removeTimedBlock:checkBlock.
+
+ timeOfLastCheck := AbsoluteTime now.
+
+ files := currentDirectory asOrderedCollection.
+
+ matchPattern := filterField contents.
+ (matchPattern notNil and:[
+ matchPattern isEmpty not and:[
+ matchPattern ~= '*']]) ifTrue:[
+ files := files select:[:aName |
+ ((currentDirectory typeOf:aName) == #directory)
+ or:[matchPattern match:aName]
+ ].
+ ].
+ files sort.
+
+ files size == 0 ifTrue:[
+ self information:('directory ', currentDirectory pathName, ' vanished').
+ ^ self
+ ].
+ files := self withoutHiddenFiles:files.
+ fileList := files copy.
+
+ "
+ this is a time consuming operation (especially, if reading an
+ NFS-mounted directory); therefore lower my priority while getting
+ the files info ...
+ "
+ Processor activeProcess withLowerPriorityDo:[
+
+ "
+ first show the names only - this is relatively fast
+ "
+ fileListView setList:files expandTabs:false.
+
+ "
+ then walk over the files, adding more info
+ (since we have to stat each file, this may take a while longer
+ "
+ showLongList ifTrue:[
+ tabSpec isNil ifTrue:[self defineTabulatorsForLongList].
+
+ text := OrderedCollection new.
+ files keysAndValuesDo:[:lineIndex :aFileName |
+ |entry col typ f p typeString|
+
+ entry := MultiColListEntry new.
+ entry tabulatorSpecification:tabSpec.
+
+ "
+ if multiple FileBrowsers are reading, let others
+ make some progress too
+ "
+ windowGroup notNil ifTrue:[windowGroup processExposeEvents].
+ Processor yield.
+ "
+ could be destroyed in the meanwhile ...
+ "
+ realized ifFalse:[^ self].
+
+ len := aFileName size.
+ (len < 20) ifTrue:[
+ line := aFileName , (String new:(22 - len))
+ ] ifFalse:[
+ "can happen on BSD only"
+ line := (aFileName copyTo:20) , ' '
+ ].
+ entry colAt:1 put:line.
+
+ info := currentDirectory infoOf:aFileName.
+ info isNil ifTrue:[
+ "not accessable - usually a symlink,
+ to a nonexisting/nonreadable file
+ "
+ entry colAt:2 put:'?'.
+ entry colAt:3 put:'(bad symbolic link ?)'.
+ ] ifFalse:[
+ typ := (info at:#type).
+ (typ == #regular) ifFalse:[
+ entry colAt:2 put:(typ at:1) asString.
+ ] ifTrue:[
+ entry colAt:2 put:' '.
+ ].
+ modeString := self getModeString:(info at:#mode)
+ with:#( '' $r $w $x
+ ' ' $r $w $x
+ ' ' $r $w $x ).
+ entry colAt:3 put:modeString.
+
+ ((info at:#uid) ~~ prevUid) ifTrue:[
+ prevUid := (info at:#uid).
+ nameString := OperatingSystem getUserNameFromID:prevUid.
+ nameString := nameString , (String new:(10 - nameString size))
+ ].
+ entry colAt:4 put:nameString withoutSpaces.
+ ((info at:#gid) ~~ prevGid) ifTrue:[
+ prevGid := (info at:#gid).
+ groupString := OperatingSystem getGroupNameFromID:prevGid.
+ groupString := groupString , (String new:(10 - groupString size))
+ ].
+ entry colAt:5 put:groupString withoutSpaces.
+
+ (typ == #regular) ifTrue:[
+ entry colAt:6 put:(self sizePrintString:(info at:#size)).
+ ].
+
+ f := currentDirectory asFilename:aFileName.
+ f isSymbolicLink ifTrue:[
+ p := f linkInfo at:#path.
+ typeString := 'symbolic link to ' , p
+ ] ifFalse:[
+ (showVeryLongList not or:[typ == #directory]) ifTrue:[
+ typeString := typ asString
+ ] ifFalse:[
+ typeString := f fileType.
+ ].
+ ].
+ entry colAt:7 put:typeString.
+ text add:entry
+ ].
+ fileListView at:lineIndex put:entry
+ ].
+ ] ifFalse:[
+ files keysAndValuesDo:[:lineIndex :aName |
+ |entry|
+
+ "
+ if multiple FileBrowsers are reading, let others
+ make some progress too
+ "
+ windowGroup notNil ifTrue:[windowGroup processExposeEvents].
+ Processor yield.
+ realized ifFalse:[^ self].
+
+ ((currentDirectory isDirectory:aName) and:[
+ (aName ~= '..') and:[aName ~= '.']]) ifTrue:[
+ entry := aName , ' ...'
+ ] ifFalse:[
+ entry := aName
+ ].
+ fileListView at:lineIndex put:entry
+ ].
+ ].
+ ].
+
+ "
+ install a new check after some time
+ "
+ Processor addTimedBlock:checkBlock afterSeconds:checkDelta
]
"Modified: 21.9.1995 / 11:40:23 / claus"
- "Modified: 14.12.1995 / 20:59:09 / cg"
+ "Modified: 8.10.1996 / 15:57:55 / cg"
!
validateFontEncodingFor:newEncoding
@@ -2647,5 +2651,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.95 1996-09-13 07:04:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Attic/FBrowser.st,v 1.96 1996-10-08 15:00:44 cg Exp $'
! !
--- a/FileBrowser.st Tue Oct 08 16:47:44 1996 +0200
+++ b/FileBrowser.st Tue Oct 08 17:00:44 1996 +0200
@@ -150,7 +150,10 @@
"toggle from long to short listing (and vice-versa)"
showLongList := showLongList not.
+ tabSpec := nil.
self updateCurrentDirectory
+
+ "Modified: 8.10.1996 / 15:58:47 / cg"
!
changeDotFileVisibility
@@ -1336,10 +1339,12 @@
tabSpec := TabulatorSpecification new.
tabSpec unit:#inch.
"/ tabSpec positions:#(0 2 2.3 4.3 5.3 6.0 6.5).
- tabSpec widths: #(2 0.3 1.7 1 0.5 0.5 1"any").
+ tabSpec widths: #(2 0.3 2.0 1 0.5 0.5 1"any").
" name type mode owner group size type"
tabSpec align: #(#left #left #left #right #right #decimal #left).
tabSpec addDependent:self
+
+ "Modified: 8.10.1996 / 15:59:28 / cg"
!
doChangeCurrentDirectoryTo:fileName updateHistory:updateHistory
@@ -2158,161 +2163,160 @@
"
self withReadCursorDo:[
- Processor removeTimedBlock:checkBlock.
-
- timeOfLastCheck := AbsoluteTime now.
-
- files := currentDirectory asOrderedCollection.
-
- matchPattern := filterField contents.
- (matchPattern notNil and:[
- matchPattern isEmpty not and:[
- matchPattern ~= '*']]) ifTrue:[
- files := files select:[:aName |
- ((currentDirectory typeOf:aName) == #directory)
- or:[matchPattern match:aName]
- ].
- ].
- files sort.
-
- files size == 0 ifTrue:[
- self information:('directory ', currentDirectory pathName, ' vanished').
- ^ self
- ].
- files := self withoutHiddenFiles:files.
- fileList := files copy.
-
- "
- this is a time consuming operation (especially, if reading an
- NFS-mounted directory); therefore lower my priority while getting
- the files info ...
- "
- Processor activeProcess withLowerPriorityDo:[
-
- "
- first show the names only - this is relatively fast
- "
- fileListView setList:files expandTabs:false.
-
- "
- then walk over the files, adding more info
- (since we have to stat each file, this may take a while longer
- "
- showLongList ifTrue:[
- tabSpec isNil ifTrue:[self defineTabulatorsForLongList].
-
- text := OrderedCollection new.
- files keysAndValuesDo:[:lineIndex :aFileName |
- |entry col typ f p typeString|
-
- entry := MultiColListEntry new.
- entry tabulatorSpecification:tabSpec.
-
- "
- if multiple FileBrowsers are reading, let others
- make some progress too
- "
- windowGroup notNil ifTrue:[windowGroup processExposeEvents].
- Processor yield.
- "
- could be destroyed in the meanwhile ...
- "
- realized ifFalse:[^ self].
-
- len := aFileName size.
- (len < 20) ifTrue:[
- line := aFileName , (String new:(22 - len))
- ] ifFalse:[
- "can happen on BSD only"
- line := (aFileName copyTo:20) , ' '
- ].
- entry colAt:1 put:line.
-
- info := currentDirectory infoOf:aFileName.
- info isNil ifTrue:[
- "not accessable - usually a symlink,
- to a nonexisting/nonreadable file
- "
- entry colAt:2 put:'?'.
- entry colAt:3 put:'(bad symbolic link ?)'.
- ] ifFalse:[
- typ := (info at:#type).
- (typ == #regular) ifFalse:[
- entry colAt:2 put:(typ at:1) asString.
- ] ifTrue:[
- entry colAt:2 put:' '.
- ].
-
- modeString := self getModeString:(info at:#mode)
- with:#( '' $r $w $x
- ' ' $r $w $x
- ' ' $r $w $x ).
- entry colAt:3 put:modeString.
-
- ((info at:#uid) ~~ prevUid) ifTrue:[
- prevUid := (info at:#uid).
- nameString := OperatingSystem getUserNameFromID:prevUid.
- nameString := nameString , (String new:(10 - nameString size))
- ].
- entry colAt:4 put:nameString withoutSpaces.
- ((info at:#gid) ~~ prevGid) ifTrue:[
- prevGid := (info at:#gid).
- groupString := OperatingSystem getGroupNameFromID:prevGid.
- groupString := groupString , (String new:(10 - groupString size))
- ].
- entry colAt:5 put:groupString withoutSpaces.
-
- (typ == #regular) ifTrue:[
- entry colAt:6 put:(self sizePrintString:(info at:#size)).
- ].
-
- f := currentDirectory asFilename:aFileName.
- f isSymbolicLink ifTrue:[
- p := f linkInfo at:#path.
- typeString := 'symbolic link to ' , p
- ] ifFalse:[
- (showVeryLongList not or:[typ == #directory]) ifTrue:[
- typeString := typ asString
- ] ifFalse:[
- typeString := f fileType.
- ].
- ].
- entry colAt:7 put:typeString.
- text add:entry
- ].
- fileListView at:lineIndex put:entry
- ].
- ] ifFalse:[
- files keysAndValuesDo:[:lineIndex :aName |
- |entry|
-
- "
- if multiple FileBrowsers are reading, let others
- make some progress too
- "
- windowGroup notNil ifTrue:[windowGroup processExposeEvents].
- Processor yield.
- realized ifFalse:[^ self].
-
- ((currentDirectory isDirectory:aName) and:[
- (aName ~= '..') and:[aName ~= '.']]) ifTrue:[
- entry := aName , ' ...'
- ] ifFalse:[
- entry := aName
- ].
- fileListView at:lineIndex put:entry
- ].
- ].
- ].
-
- "
- install a new check after some time
- "
- Processor addTimedBlock:checkBlock afterSeconds:checkDelta
+ Processor removeTimedBlock:checkBlock.
+
+ timeOfLastCheck := AbsoluteTime now.
+
+ files := currentDirectory asOrderedCollection.
+
+ matchPattern := filterField contents.
+ (matchPattern notNil and:[
+ matchPattern isEmpty not and:[
+ matchPattern ~= '*']]) ifTrue:[
+ files := files select:[:aName |
+ ((currentDirectory typeOf:aName) == #directory)
+ or:[matchPattern match:aName]
+ ].
+ ].
+ files sort.
+
+ files size == 0 ifTrue:[
+ self information:('directory ', currentDirectory pathName, ' vanished').
+ ^ self
+ ].
+ files := self withoutHiddenFiles:files.
+ fileList := files copy.
+
+ "
+ this is a time consuming operation (especially, if reading an
+ NFS-mounted directory); therefore lower my priority while getting
+ the files info ...
+ "
+ Processor activeProcess withLowerPriorityDo:[
+
+ "
+ first show the names only - this is relatively fast
+ "
+ fileListView setList:files expandTabs:false.
+
+ "
+ then walk over the files, adding more info
+ (since we have to stat each file, this may take a while longer
+ "
+ showLongList ifTrue:[
+ tabSpec isNil ifTrue:[self defineTabulatorsForLongList].
+
+ text := OrderedCollection new.
+ files keysAndValuesDo:[:lineIndex :aFileName |
+ |entry col typ f p typeString|
+
+ entry := MultiColListEntry new.
+ entry tabulatorSpecification:tabSpec.
+
+ "
+ if multiple FileBrowsers are reading, let others
+ make some progress too
+ "
+ windowGroup notNil ifTrue:[windowGroup processExposeEvents].
+ Processor yield.
+ "
+ could be destroyed in the meanwhile ...
+ "
+ realized ifFalse:[^ self].
+
+ len := aFileName size.
+ (len < 20) ifTrue:[
+ line := aFileName , (String new:(22 - len))
+ ] ifFalse:[
+ "can happen on BSD only"
+ line := (aFileName copyTo:20) , ' '
+ ].
+ entry colAt:1 put:line.
+
+ info := currentDirectory infoOf:aFileName.
+ info isNil ifTrue:[
+ "not accessable - usually a symlink,
+ to a nonexisting/nonreadable file
+ "
+ entry colAt:2 put:'?'.
+ entry colAt:3 put:'(bad symbolic link ?)'.
+ ] ifFalse:[
+ typ := (info at:#type).
+ (typ == #regular) ifFalse:[
+ entry colAt:2 put:(typ at:1) asString.
+ ] ifTrue:[
+ entry colAt:2 put:' '.
+ ].
+ modeString := self getModeString:(info at:#mode)
+ with:#( '' $r $w $x
+ ' ' $r $w $x
+ ' ' $r $w $x ).
+ entry colAt:3 put:modeString.
+
+ ((info at:#uid) ~~ prevUid) ifTrue:[
+ prevUid := (info at:#uid).
+ nameString := OperatingSystem getUserNameFromID:prevUid.
+ nameString := nameString , (String new:(10 - nameString size))
+ ].
+ entry colAt:4 put:nameString withoutSpaces.
+ ((info at:#gid) ~~ prevGid) ifTrue:[
+ prevGid := (info at:#gid).
+ groupString := OperatingSystem getGroupNameFromID:prevGid.
+ groupString := groupString , (String new:(10 - groupString size))
+ ].
+ entry colAt:5 put:groupString withoutSpaces.
+
+ (typ == #regular) ifTrue:[
+ entry colAt:6 put:(self sizePrintString:(info at:#size)).
+ ].
+
+ f := currentDirectory asFilename:aFileName.
+ f isSymbolicLink ifTrue:[
+ p := f linkInfo at:#path.
+ typeString := 'symbolic link to ' , p
+ ] ifFalse:[
+ (showVeryLongList not or:[typ == #directory]) ifTrue:[
+ typeString := typ asString
+ ] ifFalse:[
+ typeString := f fileType.
+ ].
+ ].
+ entry colAt:7 put:typeString.
+ text add:entry
+ ].
+ fileListView at:lineIndex put:entry
+ ].
+ ] ifFalse:[
+ files keysAndValuesDo:[:lineIndex :aName |
+ |entry|
+
+ "
+ if multiple FileBrowsers are reading, let others
+ make some progress too
+ "
+ windowGroup notNil ifTrue:[windowGroup processExposeEvents].
+ Processor yield.
+ realized ifFalse:[^ self].
+
+ ((currentDirectory isDirectory:aName) and:[
+ (aName ~= '..') and:[aName ~= '.']]) ifTrue:[
+ entry := aName , ' ...'
+ ] ifFalse:[
+ entry := aName
+ ].
+ fileListView at:lineIndex put:entry
+ ].
+ ].
+ ].
+
+ "
+ install a new check after some time
+ "
+ Processor addTimedBlock:checkBlock afterSeconds:checkDelta
]
"Modified: 21.9.1995 / 11:40:23 / claus"
- "Modified: 14.12.1995 / 20:59:09 / cg"
+ "Modified: 8.10.1996 / 15:57:55 / cg"
!
validateFontEncodingFor:newEncoding
@@ -2647,5 +2651,5 @@
!FileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.95 1996-09-13 07:04:01 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.96 1996-10-08 15:00:44 cg Exp $'
! !