FileBrowser.st
changeset 381 0b715d777c48
parent 380 ec0cfd2b3200
child 386 3fd24d9116b3
--- a/FileBrowser.st	Wed Feb 21 01:37:46 1996 +0100
+++ b/FileBrowser.st	Wed Feb 21 01:45:41 1996 +0100
@@ -519,16 +519,18 @@
     |sel queryBox|
 
     queryBox := FilenameEnterBox 
-		    title:(resources at:'create new file:') withCRs
-		    okText:(resources at:'create')
-		    action:[:newName | self doCreateFile:newName].
+                    title:(resources at:'create new file:') withCRs
+                    okText:(resources at:'create')
+                    action:[:newName | self doCreateFile:newName].
     sel := subView selection.
     sel notNil ifTrue:[
-	queryBox initialText:(sel asString)
-    ] ifFalse:[
+        queryBox initialText:(sel asString)
+"/    ] ifFalse:[
 "/        queryBox initialText:''
     ].
     queryBox showAtPointer
+
+    "Modified: 21.2.1996 / 01:43:14 / cg"
 !
 
 openChangesBrowser
@@ -830,77 +832,77 @@
 
 
     commandView := EditField origin:0.0@1.0 corner:1.0@1.0 in:frame.
+    commandView allInset:ViewSpacing.
     commandView topInset:(commandView preferredExtent y negated - ViewSpacing).
-    commandView bottomInset:ViewSpacing.
-    commandView horizontalInset:ViewSpacing.
 
 "/    commandView contents:'** no commands which require input here **'.
 
     commandView entryCompletionBlock:[:contents |
-	|newString|
+        |newString|
 
-	newString := Filename 
-			filenameCompletionFor:contents 
-			directory:currentDirectory pathName asFilename 
-			directoriesOnly:false 
-			filesOnly:false 
-			ifMultiple:[:dir | commandView flash.].
-	commandView contents:newString.
-	commandView cursorToEndOfLine.
+        newString := Filename 
+                        filenameCompletionFor:contents 
+                        directory:currentDirectory pathName asFilename 
+                        directoriesOnly:false 
+                        filesOnly:false 
+                        ifMultiple:[:dir | commandView flash.].
+        commandView contents:newString.
+        commandView cursorToEndOfLine.
     ].
     commandView leaveAction:[:key | 
-	|cmd nCmd empty|
+        |cmd nCmd empty|
 
-	(key == #CursorDown 
-	or:[key == #CursorUp]) ifTrue:[
-	    nCmd := CommandHistory size.
-	    nCmd == 0 ifTrue:[
-		empty := true
-	    ] ifFalse:[
-		key == #CursorUp ifTrue:[
-		    commandIndex == nCmd ifTrue:[
-			commandView flash.
-		    ].
-		    commandIndex := (commandIndex + 1) min:nCmd
-		] ifFalse:[
-		    commandIndex == 1 ifTrue:[
-			commandView flash.
-			empty := true.
-		    ].
-		    commandIndex := (commandIndex - 1) max:1.
-		].
-	    ].
-	    empty == true ifTrue:[
-		commandView contents:nil
-	    ] ifFalse:[
-		commandView contents:(CommandHistory at:commandIndex).
-	    ]        
-	].
-	key == #Return ifTrue:[
-	    cmd := commandView contents.
+        (key == #CursorDown 
+        or:[key == #CursorUp]) ifTrue:[
+            nCmd := CommandHistory size.
+            nCmd == 0 ifTrue:[
+                empty := true
+            ] ifFalse:[
+                key == #CursorUp ifTrue:[
+                    commandIndex == nCmd ifTrue:[
+                        commandView flash.
+                    ].
+                    commandIndex := (commandIndex + 1) min:nCmd
+                ] ifFalse:[
+                    commandIndex == 1 ifTrue:[
+                        commandView flash.
+                        empty := true.
+                    ].
+                    commandIndex := (commandIndex - 1) max:1.
+                ].
+            ].
+            empty == true ifTrue:[
+                commandView contents:nil
+            ] ifFalse:[
+                commandView contents:(CommandHistory at:commandIndex).
+            ]        
+        ].
+        key == #Return ifTrue:[
+            cmd := commandView contents.
 
-	    subView insertLine:(ColoredListEntry string:('>> ' , cmd) color:Color blue)
-		    before:(subView cursorLine).
-	    subView cursorDown.
+            subView insertLine:(ColoredListEntry string:('>> ' , cmd) color:Color blue)
+                    before:(subView cursorLine).
+            subView cursorDown.
 
 "/            subView insertStringAtCursor:cmd.
 "/            subView insertCharAtCursor:(Character cr).
 
-	    (cmd notNil and:[cmd notEmpty]) ifTrue:[
-		CommandHistory notNil ifTrue:[
-		    CommandHistory addFirst:cmd.
-		    CommandHistory size > CommandHistorySize ifTrue:[
-			CommandHistory removeLast
-		    ]
-		].
-		self doExecuteCommand:cmd replace:false.
-		commandView contents:nil.
-		commandIndex := 0
-	    ]
-	]
+            (cmd notNil and:[cmd notEmpty]) ifTrue:[
+                CommandHistory notNil ifTrue:[
+                    CommandHistory addFirst:cmd.
+                    CommandHistory size > CommandHistorySize ifTrue:[
+                        CommandHistory removeLast
+                    ]
+                ].
+                self doExecuteCommand:cmd replace:false.
+                commandView contents:nil.
+                commandIndex := 0
+            ]
+        ]
     ].
 
     "Modified: 7.9.1995 / 15:48:45 / claus"
+    "Modified: 21.2.1996 / 01:39:48 / cg"
 !
 
 initializeFilterPattern
@@ -2389,4 +2391,5 @@
 !FileBrowser class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.71 1996-02-21 00:37:46 cg Exp $'! !
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowser.st,v 1.72 1996-02-21 00:45:41 cg Exp $'
+! !