*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 28 Aug 2003 13:18:00 +0200
changeset 5120 e4c15c9d82ba
parent 5119 3892eca67af7
child 5121 572990eefe2e
*** empty log message ***
AbstractFileApplicationNoteBookComponent.st
DirectoryContentsBrowser.st
FileApplicationNoteBook.st
FileBrowserV2.st
--- a/AbstractFileApplicationNoteBookComponent.st	Thu Aug 28 11:47:31 2003 +0200
+++ b/AbstractFileApplicationNoteBookComponent.st	Thu Aug 28 13:18:00 2003 +0200
@@ -78,6 +78,20 @@
     ^ true
 ! !
 
+!AbstractFileApplicationNoteBookComponent methodsFor:'aspects'!
+
+cursorColLabelHolder
+    ^ ''
+!
+
+cursorLineLabelHolder
+    ^ ''
+!
+
+modeLabelHolder
+    ^ ''
+! !
+
 !AbstractFileApplicationNoteBookComponent methodsFor:'queries'!
 
 fileName
@@ -193,5 +207,5 @@
 !AbstractFileApplicationNoteBookComponent class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileApplicationNoteBookComponent.st,v 1.7 2003-06-30 13:24:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileApplicationNoteBookComponent.st,v 1.8 2003-08-28 11:17:41 cg Exp $'
 ! !
--- a/DirectoryContentsBrowser.st	Thu Aug 28 11:47:31 2003 +0200
+++ b/DirectoryContentsBrowser.st	Thu Aug 28 13:18:00 2003 +0200
@@ -1077,11 +1077,16 @@
     |info filterBox clr|
 
     noOfAddedFiles = noOfFiles ifTrue:[
-        info := '%1 files'.
+        info := '%1 file%3'.
     ] ifFalse:[
-        info := '%1 files shown (out of %2)'.
+        info := '%1 file%3 shown (out of %2)'.
     ].
-    self shownFiles value:(resources string:info with:noOfAddedFiles with:noOfFiles).
+    self shownFiles 
+        value:(resources 
+                string:info 
+                with:noOfAddedFiles 
+                with:noOfFiles
+                with:(noOfAddedFiles == 1 ifTrue:[''] ifFalse:['s'])).
 
     filterBox := self filterValueBox value.
     filterBox isNil ifTrue:[^ self ].
@@ -3011,5 +3016,5 @@
 !DirectoryContentsBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.125 2003-08-22 11:51:28 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.126 2003-08-28 11:17:47 cg Exp $'
 ! !
--- a/FileApplicationNoteBook.st	Thu Aug 28 11:47:31 2003 +0200
+++ b/FileApplicationNoteBook.st	Thu Aug 28 13:18:00 2003 +0200
@@ -736,10 +736,35 @@
 
     canvasHolder isNil ifTrue:[
         canvasHolder := ValueHolder new.
+        canvasHolder addDependent:self.
     ].
     ^ canvasHolder.
 !
 
+cursorColLabelHolder
+    ^ self 
+        aspectFor:#cursorColLabelHolder 
+        ifAbsent:[
+            IndirectValue for:(' ' asValue)
+        ]
+!
+
+cursorLineLabelHolder
+    ^ self 
+        aspectFor:#cursorLineLabelHolder 
+        ifAbsent:[
+            IndirectValue for:(' ' asValue)
+        ]
+!
+
+modeLabelHolder
+    ^ self 
+        aspectFor:#modeLabelHolder 
+        ifAbsent:[
+            IndirectValue for:(' ' asValue)
+        ]
+!
+
 privateTabList
 
     privateTabList isNil ifTrue:[
@@ -775,6 +800,18 @@
 
 !FileApplicationNoteBook methodsFor:'change & update'!
 
+canvasChanged
+    "invoked when the contentsView has been changed"
+
+    |app|
+
+    app := canvasHolder value application.
+
+    self cursorLineLabelHolder valueHolder: (app cursorLineLabelHolder).
+    self cursorColLabelHolder valueHolder: (app cursorColLabelHolder).
+    self modeLabelHolder valueHolder: (app modeLabelHolder).
+!
+
 update:something with:aParameter from:changedObject
     "Invoked when an object that I depend upon sends a change notification."
 
@@ -782,6 +819,10 @@
 
     | appl sel|
 
+    changedObject == canvasHolder ifTrue:[
+        self canvasChanged.
+        ^ self.
+    ].
     changedObject == self currentDirectories ifTrue:[
         self viewDirectoryDescription value ifTrue:[
             self changeDirectoryDescription.  
@@ -4058,6 +4099,18 @@
 
 !FileApplicationNoteBook::TextEditor methodsFor:'aspects'!
 
+cursorColLabelHolder
+    ^ BlockValue 
+        with:[:v | v printString]
+        argument:editView cursorColHolder.
+!
+
+cursorLineLabelHolder
+    ^ BlockValue 
+        with:[:v | v printString]
+        argument:editView cursorLineHolder.
+!
+
 enableHexToggle
 
     enableHexToggle isNil ifTrue:[
@@ -4117,6 +4170,10 @@
     ^ itemRemoved
 !
 
+modeLabelHolder
+    ^ editView modeLabelHolder.
+!
+
 modifiedChannel
 
     modifiedChannel isNil ifTrue:[
@@ -4335,9 +4392,9 @@
 
 postOpenWith:aBuilder
 
-    self item isNil ifTrue:[
-        self item:(DirectoryContentsBrowser itemClass fileName:(Filename homeDirectory construct:'.bashrc')).
-    ].
+"/    self item isNil ifTrue:[
+"/        self item:(DirectoryContentsBrowser itemClass fileName:(Filename homeDirectory construct:'.bashrc')).
+"/    ].
     self setUpTextView.
     self changeInformation.
     ^ super postOpenWith:aBuilder
@@ -4865,5 +4922,5 @@
 !FileApplicationNoteBook class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.102 2003-08-22 13:38:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileApplicationNoteBook.st,v 1.103 2003-08-28 11:17:54 cg Exp $'
 ! !
--- a/FileBrowserV2.st	Thu Aug 28 11:47:31 2003 +0200
+++ b/FileBrowserV2.st	Thu Aug 28 13:18:00 2003 +0200
@@ -427,35 +427,15 @@
 
     <resource: #canvas>
 
-    OperatingSystem isMSWINDOWSlike ifTrue:[
-        ^ self windowSpecWindows
-    ].
-    ^ self windowSpecNonWindows
-!
-
-windowSpecNonWindows
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:FileBrowserV2 andSelector:#windowSpecNonWindows
-     FileBrowserV2 new openInterface:#windowSpecNonWindows
-    "
-
-    <resource: #canvas>
-
     ^ 
      #(#FullSpec
-        #name: #windowSpecNonWindows
+        #name: #windowSpec
         #window: 
        #(#WindowSpec
           #label: #FileBrowser
           #name: #FileBrowser
           #min: #(#Point 10 10)
-          #bounds: #(#Rectangle 16 42 816 642)
+          #bounds: #(#Rectangle 16 52 816 652)
           #menu: #mainMenu
           #icon: #applicationIcon
         )
@@ -480,16 +460,27 @@
                     #model: #hideFilenameEntryField
                     #postBuildCallback: #hideFilenameEntryFieldButtonCreated:
                   )
-                 #(#ViewSpec
-                    #name: 'Box1'
+                 #(#HorizontalPanelViewSpec
+                    #name: 'HorizontalPanel1'
                     #layout: #(#LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0)
                     #level: 1
+                    #horizontalLayout: #left
+                    #verticalLayout: #fit
+                    #horizontalSpace: 3
+                    #verticalSpace: 3
                     #component: 
                    #(#SpecCollection
                       #collection: #(
+                       #(#ComboListSpec
+                          #name: 'ComboList1'
+                          #visibilityChannel: #driveSelectorVisible
+                          #model: #selectedDeviceDrive
+                          #comboList: #listOfDeviceDrives
+                          #useIndex: false
+                          #extent: #(#Point 100 23)
+                        )
                        #(#VariableHorizontalPanelSpec
                           #name: 'VariableHorizontalPanel1'
-                          #layout: #(#LayoutFrame 1 0.0 1 0.0 -1 1.0 -1 1.0)
                           #level: 0
                           #showHandle: true
                           #component: 
@@ -529,7 +520,8 @@
                              )
                            
                           )
-                          #handles: #(#Any 0.8 1.0)
+                          #extent: #(#Point 783 23)
+                          #handles: #(#Any 0.770115 1.0)
                           #postBuildCallback: #postBuildPathViewBox:
                         )
                        )
@@ -609,288 +601,59 @@
                  #(#LabelSpec
                     #label: 'NotifyLabel'
                     #name: 'NotifyLabel'
-                    #layout: #(#LayoutFrame 0 0 1 0.0 -188 1 1 1.0)
+                    #layout: #(#LayoutFrame 0 0 1 0.0 -220 1 1 1.0)
                     #level: -1
                     #translateLabel: true
                     #labelChannel: #notifyChannel
                     #adjust: #left
-                  )
-                 #(#LabelSpec
-                    #label: 'Shown Files'
-                    #name: 'Label1'
-                    #layout: #(#LayoutFrame -188 1 1 0.0 1 1 1 1.0)
-                    #level: -1
-                    #translateLabel: true
-                    #labelChannel: #shownFiles
-                    #adjust: #right
-                    #postBuildCallback: #postBuildFilterBox:
+                    #style: #(#FontDescription #helvetica #medium #roman 10)
                   )
                  #(#ProgressIndicatorSpec
                     #name: 'ProgressIndicator1'
-                    #layout: #(#LayoutFrame -250 1 4 0 -188 1 -4 1)
+                    #layout: #(#LayoutFrame -260 1 4 0 -220 1 -4 1)
                     #visibilityChannel: #activityVisibilityChannel
                     #backgroundColor: #(#Color 0.0 66.6667 66.6667)
                     #isActivityIndicator: true
                   )
-                 )
-               
-              )
-            )
-           #(#LabelSpec
-              #label: 'Preview'
-              #name: 'PreviewLabel'
-              #layout: #(#LayoutFrame 0 0.5 39 0 100 0.5 61 0)
-              #level: 0
-              #borderWidth: 1
-              #visibilityChannel: #previewVisibleHolder
-              #backgroundColor: #(#Color 86.9993 86.9993 86.9993)
-              #translateLabel: true
-            )
-           #(#ArbitraryComponentSpec
-              #name: 'Preview'
-              #layout: #(#LayoutFrame 0 0.5 63 0 -147 1 -319 1)
-              #level: 1
-              #visibilityChannel: #previewVisibleHolder
-              #hasBorder: false
-              #component: #ImageView
-            )
-           #(#ViewSpec
-              #name: 'ToolbarBox'
-              #layout: #(#LayoutFrame 0 0 0 0 0 1 30 0)
-              #level: 0
-              #visibilityChannel: #toolBarVisibleHolder
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#ActionButtonSpec
-                    #label: 'hideToolBarIcon'
-                    #name: 'HideToolBarButton'
-                    #layout: #(#LayoutFrame 0 0 0 0 13 0 30 0)
-                    #activeHelpKey: #hideToolBar
-                    #hasCharacterOrientedLabel: false
-                    #translateLabel: true
-                    #model: #hideToolbar
-                    #postBuildCallback: #hideToolBarButtonCreated:
-                  )
-                 #(#MenuPanelSpec
-                    #name: 'ToolBar'
-                    #layout: #(#LayoutFrame 13 0 0 0 0 1 30 0)
-                    #menu: #toolBarMainMenu
-                    #textDefault: true
-                  )
-                 )
-               
-              )
-            )
-           )
-         
-        )
-      )
-!
-
-windowSpecWindows
-    "This resource specification was automatically generated
-     by the UIPainter of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIPainter may not be able to read the specification."
-
-    "
-     UIPainter new openOnClass:FileBrowserV2 andSelector:#windowSpecWindows
-     FileBrowserV2 new openInterface:#windowSpecWindows
-    "
-
-    <resource: #canvas>
-
-    ^ 
-     #(#FullSpec
-        #name: #windowSpecWindows
-        #window: 
-       #(#WindowSpec
-          #label: #FileBrowser
-          #name: #FileBrowser
-          #min: #(#Point 10 10)
-          #bounds: #(#Rectangle 16 42 816 642)
-          #menu: #mainMenu
-          #icon: #applicationIcon
-        )
-        #component: 
-       #(#SpecCollection
-          #collection: #(
-           #(#ViewSpec
-              #name: 'FilenameEntryFieldBox'
-              #layout: #(#LayoutFrame 0 0 30 0 0 1 55 0)
-              #level: 0
-              #visibilityChannel: #filenameEntryFieldVisibleHolder
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#ActionButtonSpec
-                    #label: 'hideFilenameEntryFieldIcon'
-                    #name: 'HideFilenameEntryFieldButton'
-                    #layout: #(#LayoutFrame 0 0 0 0 13 0 0 1)
-                    #activeHelpKey: #hideFilenameEntryField
-                    #hasCharacterOrientedLabel: false
-                    #translateLabel: true
-                    #model: #hideFilenameEntryField
-                    #postBuildCallback: #hideFilenameEntryFieldButtonCreated:
-                  )
-                 #(#ViewSpec
-                    #name: 'Box1'
-                    #layout: #(#LayoutFrame 13 0.0 0 0.0 0 1.0 0 1.0)
-                    #level: 1
-                    #component: 
-                   #(#SpecCollection
-                      #collection: #(
-                       #(#VariableHorizontalPanelSpec
-                          #name: 'VariableHorizontalPanel1'
-                          #layout: #(#LayoutFrame 1 0.0 1 0.0 -1 1.0 -1 1.0)
-                          #level: 0
-                          #showHandle: true
-                          #component: 
-                         #(#SpecCollection
-                            #collection: #(
-                             #(#ComboListSpec
-                                #name: 'ComboList1'
-                                #model: #selectedDeviceDrive
-                                #comboList: #listOfDeviceDrives
-                                #useIndex: false
-                              )
-                             #(#NonScrollableArbitraryComponentSpec
-                                #name: 'NonScrollableArbitraryComponent1'
-                                #component: #FilenameEditFieldV2
-                                #postBuildCallback: #postBuildEditField:
-                              )
-                             #(#ViewSpec
-                                #name: 'FilterBox'
-                                #component: 
-                               #(#SpecCollection
-                                  #collection: #(
-                                   #(#LabelSpec
-                                      #label: 'Filter:'
-                                      #name: 'Filter'
-                                      #layout: #(#LayoutFrame 0 0 0 0 40 0 0 1)
-                                      #translateLabel: true
-                                      #adjust: #left
-                                      #postBuildCallback: #postBuildPathViewBox:
-                                    )
-                                   #(#ComboBoxSpec
-                                      #name: 'FilterSelectionBox'
-                                      #layout: #(#LayoutFrame 40 0 0 0 0 1 0 1)
-                                      #model: #filterModel
-                                      #immediateAccept: true
-                                      #acceptOnPointerLeave: false
-                                      #comboList: #filterListModel
-                                    )
-                                   )
-                                 
-                                )
-                                #postBuildCallback: #postBuildPathViewBox:
-                              )
-                             )
-                           
-                          )
-                          #handles: #(#Any 0.083014 0.814815 1.0)
-                          #postBuildCallback: #postBuildPathViewBox:
-                        )
-                       )
-                     
-                    )
-                    #postBuildCallback: #postBuildPathViewBox:
-                  )
-                 )
-               
-              )
-            )
-           #(#'FileBrowserV2UISpecifications::PanelSpec'
-              #name: 'BrowserBox'
-              #layout: #(#LayoutFrame 0 0.0 55 0.0 0 1.0 -20 1.0)
-              #level: 0
-              #showHandle: true
-              #snapMode: #both
-              #whichView: #last
-              #orientation: #vertical
-              #visibility: #viewNoteBookApplicationHolder
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#'FileBrowserV2UISpecifications::PanelSpec'
-                    #name: 'HorizontalPanel'
-                    #level: 0
-                    #snapMode: #both
-                    #whichView: #first
-                    #orientation: #horizontal
-                    #visibility: #showDirectoryTree
-                    #component: 
-                   #(#SpecCollection
-                      #collection: #(
-                       #(#SubCanvasSpec
-                          #name: 'DirectoryTreeBrowser'
-                          #hasHorizontalScrollBar: false
-                          #hasVerticalScrollBar: false
-                          #majorKey: #DirectoryTreeBrowser
-                          #createNewApplication: true
-                          #createNewBuilder: true
-                        )
-                       #(#SubCanvasSpec
-                          #name: 'DirectoryContentsBrowser'
-                          #hasHorizontalScrollBar: false
-                          #hasVerticalScrollBar: false
-                          #majorKey: #DirectoryContentsBrowser
-                          #createNewApplication: true
-                          #createNewBuilder: true
-                        )
-                       )
-                     
-                    )
-                    #handles: #(#Any 0.225 1.0)
-                  )
-                 #(#SubCanvasSpec
-                    #name: 'FileApplicationNoteBook'
-                    #tabable: false
-                    #hasHorizontalScrollBar: false
-                    #hasVerticalScrollBar: false
-                    #majorKey: #FileApplicationNoteBook
-                    #createNewApplication: true
-                    #createNewBuilder: true
-                  )
-                 )
-               
-              )
-              #handles: #(#Any 0.5 1.0)
-            )
-           #(#ViewSpec
-              #name: 'Box2'
-              #layout: #(#LayoutFrame 0 0 -20 1 0 1 0 1)
-              #level: 0
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#LabelSpec
-                    #label: 'NotifyLabel'
-                    #name: 'NotifyLabel'
-                    #layout: #(#LayoutFrame 0 0 1 0.0 -188 1 1 1.0)
-                    #level: -1
-                    #translateLabel: true
-                    #labelChannel: #notifyChannel
-                    #adjust: #left
-                  )
                  #(#LabelSpec
                     #label: 'Shown Files'
-                    #name: 'Label1'
-                    #layout: #(#LayoutFrame -188 1 1 0.0 1 1 1 1.0)
+                    #name: 'ShownFilesLabel'
+                    #layout: #(#LayoutFrame -220 1 1 0.0 -60 1 1 1.0)
                     #level: -1
                     #translateLabel: true
                     #labelChannel: #shownFiles
+                    #style: #(#FontDescription #helvetica #medium #roman 10)
                     #adjust: #right
-                    #postBuildCallback: #postBuildFilterBox:
+                  )
+                 #(#LabelSpec
+                    #label: 'M'
+                    #name: 'ModeLabel'
+                    #layout: #(#LayoutFrame -60 1 1 0.0 -50 1 1 1.0)
+                    #level: -1
+                    #translateLabel: true
+                    #labelChannel: #modeLabelHolder
+                    #style: #(#FontDescription #helvetica #medium #roman 10)
+                    #adjust: #right
                   )
-                 #(#ProgressIndicatorSpec
-                    #name: 'ProgressIndicator1'
-                    #layout: #(#LayoutFrame -250 1 4 0 -188 1 -4 1)
-                    #visibilityChannel: #activityVisibilityChannel
-                    #backgroundColor: #(#Color 0.0 66.6667 66.6667)
-                    #isActivityIndicator: true
+                 #(#LabelSpec
+                    #label: 'L'
+                    #name: 'LineLabel'
+                    #layout: #(#LayoutFrame -50 1 1 0.0 -20 1 1 1.0)
+                    #level: -1
+                    #translateLabel: true
+                    #labelChannel: #cursorLineLabelHolder
+                    #style: #(#FontDescription #helvetica #medium #roman 10)
+                    #adjust: #right
+                  )
+                 #(#LabelSpec
+                    #label: 'C'
+                    #name: 'ColLabel'
+                    #layout: #(#LayoutFrame -20 1 1 0.0 0 1 1 1.0)
+                    #level: -1
+                    #translateLabel: true
+                    #labelChannel: #cursorColLabelHolder
+                    #style: #(#FontDescription #helvetica #medium #roman 10)
+                    #adjust: #right
                   )
                  )
                
@@ -1349,6 +1112,26 @@
 
 !FileBrowserV2 methodsFor:'aspects'!
 
+cursorColLabelHolder
+    ^ self 
+        aspectFor:#cursorColLabelHolder 
+        ifAbsent:[
+            self 
+                applicationNamed:#FileApplicationNoteBook
+                ifPresentDo:[:appl | appl cursorColLabelHolder].
+        ]
+!
+
+cursorLineLabelHolder
+    ^ self 
+        aspectFor:#cursorLineLabelHolder
+        ifAbsent:[
+            self 
+                applicationNamed:#FileApplicationNoteBook
+                ifPresentDo:[:appl | appl cursorLineLabelHolder].
+        ]
+!
+
 fileEntryFieldHolder
 
     fileEntryFieldHolder isNil ifTrue:[
@@ -1366,6 +1149,16 @@
     ^ listOfDeviceDrives
 !
 
+modeLabelHolder
+    ^ self 
+        aspectFor:#modeLabelHolder 
+        ifAbsent:[
+            self 
+                applicationNamed:#FileApplicationNoteBook
+                ifPresentDo:[:appl | appl modeLabelHolder].
+        ]
+!
+
 selectedDeviceDrive
 
     selectedDeviceDrive isNil ifTrue:[
@@ -1377,6 +1170,10 @@
 
 !FileBrowserV2 methodsFor:'aspects-visibility'!
 
+driveSelectorVisible
+    ^ self systemIsDOS
+!
+
 filenameEntryFieldVisibleHolder
     " aspect for show FileEntryField "
 
@@ -1758,7 +1555,7 @@
 !FileBrowserV2 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.86 2003-06-30 13:24:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.87 2003-08-28 11:18:00 cg Exp $'
 ! !
 
 FileBrowserV2 initialize!