DirectoryView.st
changeset 607 8b6cd53f93b8
parent 593 17f3d679fa72
child 614 41cd940faa45
--- a/DirectoryView.st	Fri Feb 06 00:38:12 1998 +0100
+++ b/DirectoryView.st	Fri Feb 06 03:43:42 1998 +0100
@@ -89,11 +89,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Directory View'
-              #'layout:' #(#LayoutFrame 194 0 152 0 593 0 451 0)
+              #'layout:' #(#LayoutFrame 64 0 703 0 463 0 1002 0)
               #'label:' 'Directory View'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1152 900)
-              #'bounds:' #(#Rectangle 194 152 594 452)
+              #'bounds:' #(#Rectangle 64 703 464 1003)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -102,7 +102,7 @@
                #(
                  #(#DataSetSpec
                     #'name:' 'filesDataSetView'
-                    #'layout:' #(#LayoutFrame 0 0.0 22 0.0 0 1.0 0 1.0)
+                    #'layout:' #(#LayoutFrame 0 0.0 24 0.0 -2 1.0 0 1.0)
                     #'model:' #selectionOfFile
                     #'hasHorizontalScrollBar:' true
                     #'hasVerticalScrollBar:' true
@@ -125,6 +125,8 @@
               )
           )
       )
+
+    "Modified: / 6.2.1998 / 03:42:15 / cg"
 !
 
 windowSpecOfFileAttributeColumns
@@ -141,14 +143,14 @@
        #(#DataSetColumnSpec
           #'label:' 'File name'
           #'labelAlignment:' #left
-          #'minWidth:' 100
+          #'minWidth:' 150
           #'model:' #baseName
           #'canSelect:' false
       )
        #(#DataSetColumnSpec
           #'label:' 'Size'
           #'labelAlignment:' #left
-          #'width:' 50
+          #'width:' 70
           #'model:' #size
           #'canSelect:' false
       )
@@ -181,6 +183,7 @@
       )
     )
 
+    "Modified: / 6.2.1998 / 03:40:16 / cg"
 ! !
 
 !DirectoryView methodsFor:'accessing'!
@@ -714,14 +717,13 @@
 !
 
 size
+    size isNumber ifFalse:[^ size].
+    size < 1000        ifTrue: [^ size printString].
+    size < (100*1024)  ifTrue: [^(((size/1024) * 10) asInteger/10) asFloat printString, ' Kb'].
+    size < (1000*1024) ifTrue: [^(((size/1024)) asInteger) printString, ' Kb'].
+    ^(((size/1048576) * 10) asInteger/10) asFloat printString, ' Mb'
 
-    size < 1024    ifTrue: [^size printString, ' B'].
-    size < 1048576 ifTrue: [^(((size/1024) * 10) asInteger/10) asFloat printString, ' KB'].
-    ^(((size/1048576) * 10) asInteger/10) asFloat printString, ' MB'
-
-
-
-
+    "Modified: / 6.2.1998 / 03:38:45 / cg"
 ! !
 
 !DirectoryView::FileRow methodsFor:'private'!