DirectoryView.st
changeset 1346 0793db434b21
parent 999 3dc1bc073981
child 1385 cbe7e7763105
--- a/DirectoryView.st	Fri Feb 11 14:09:42 2000 +0100
+++ b/DirectoryView.st	Fri Feb 11 14:14:24 2000 +0100
@@ -85,54 +85,57 @@
 
     <resource: #canvas>
 
-    ^
-     
-       #(#FullSpec
-          #window: 
-           #(#WindowSpec
-              #name: 'Directory View'
-              #layout: #(#LayoutFrame 412 0 367 0 811 0 666 0)
-              #label: 'Directory View'
-              #min: #(#Point 10 10)
-              #max: #(#Point 1152 900)
-              #bounds: #(#Rectangle 412 367 812 667)
-              #usePreferredExtent: false
-          )
-          #component: 
-           #(#SpecCollection
-              #collection: 
-               #(
-                 #(#DataSetSpec
-                    #name: 'filesDataSetView'
-                    #layout: #(#LayoutFrame 0 0.0 24 0.0 -2 1.0 0 1.0)
-                    #model: #selectionOfFile
-                    #hasHorizontalScrollBar: true
-                    #hasVerticalScrollBar: true
-                    #miniScrollerHorizontal: true
-                    #dataList: #listOfFiles
-                    #useIndex: false
-                    #doubleClickSelector: #fileDoubleClicked
-                    #columnHolder: #fileAttributeColumns
-                    #valueChangeSelector: #fileSelected
-                    #verticalSpacing: 1
-                )
-                 #(#ComboBoxSpec
-                    #name: 'formatComboBox'
-                    #layout: #(#LayoutFrame 63 0.0 0 0 0 1.0 22 0)
-                    #model: #selectionOfFileFilter
-                    #immediateAccept: false
-                    #acceptOnTab: false
-                    #comboList: #listOfFileFilters
-                )
-                 #(#LabelSpec
-                    #name: 'filterLabel'
-                    #layout: #(#LayoutFrame 0 0 0 0 62 0 22 0)
-                    #label: 'Filter: '
-                    #adjust: #right
-                )
-              )
-          )
+    ^ 
+     #(#FullSpec
+        #name: #windowSpec
+        #window: 
+       #(#WindowSpec
+          #label: 'Directory View'
+          #name: 'Directory View'
+          #min: #(#Point 10 10)
+          #max: #(#Point 1152 900)
+          #bounds: #(#Rectangle 13 23 413 323)
+        )
+        #component: 
+       #(#SpecCollection
+          #collection: #(
+           #(#DataSetSpec
+              #name: 'filesDataSetView'
+              #layout: #(#LayoutFrame 0 0.0 24 0.0 -2 1.0 0 1.0)
+              #model: #selectionOfFile
+              #menu: #fileListMenu
+              #hasHorizontalScrollBar: true
+              #hasVerticalScrollBar: true
+              #miniScrollerHorizontal: true
+              #dataList: #listOfFiles
+              #useIndex: false
+              #has3Dsepartors: false
+              #doubleClickSelector: #fileDoubleClicked
+              #columnHolder: #fileAttributeColumns
+              #valueChangeSelector: #fileSelected
+              #verticalSpacing: 1
+            )
+           #(#ComboBoxSpec
+              #name: 'formatComboBox'
+              #layout: #(#LayoutFrame 63 0.0 0 0 0 1.0 22 0)
+              #model: #selectionOfFileFilter
+              #immediateAccept: false
+              #acceptOnTab: false
+              #acceptOnPointerLeave: false
+              #comboList: #listOfFileFilters
+            )
+           #(#LabelSpec
+              #label: 'Filter: '
+              #name: 'filterLabel'
+              #layout: #(#LayoutFrame 0 0 0 0 62 0 22 0)
+              #adjust: #right
+            )
+           )
+         
+        )
       )
+
+    "Modified: / 11.2.2000 / 00:11:43 / cg"
 ! !
 
 !DirectoryView class methodsFor:'list specs'!
@@ -203,6 +206,38 @@
      )
 ! !
 
+!DirectoryView class methodsFor:'menu specs'!
+
+fileListMenu
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
+
+    "
+     MenuEditor new openOnClass:DirectoryView andSelector:#fileListMenu
+     (Menu new fromLiteralArrayEncoding:(DirectoryView fileListMenu)) startUp
+    "
+
+    <resource: #menu>
+
+    ^ 
+     #(#Menu
+        #(
+         #(#MenuItem
+            #label: 'Update'
+            #translateLabel: true
+            #value: #updateFileList
+          )
+         )
+        nil
+        nil
+      )
+
+    "Created: / 11.2.2000 / 00:11:39 / cg"
+! !
+
 !DirectoryView methodsFor:'accessing'!
 
 directory: aDirectory
@@ -368,6 +403,16 @@
     "Modified: / 20.6.1998 / 14:46:10 / cg"
 ! !
 
+!DirectoryView methodsFor:'menu actions'!
+
+updateFileList
+    DirectoryContents flushCache.
+    self readDirectory
+
+    "Created: / 11.2.2000 / 00:12:46 / cg"
+    "Modified: / 11.2.2000 / 00:14:32 / cg"
+! !
+
 !DirectoryView methodsFor:'private'!
 
 readDirectory