--- a/AbstractFileBrowser.st Fri Oct 11 17:44:36 2002 +0200
+++ b/AbstractFileBrowser.st Sat Oct 12 02:48:29 2002 +0200
@@ -2696,6 +2696,11 @@
!AbstractFileBrowser methodsFor:'menu access'!
+viewDetailsMenuSpec
+
+ ^ self application:#DirectoryContentsBrowser do:#viewDetailsMenuSpec
+!
+
viewInContentsBrowserMenu
^ self application:#DirectoryContentsBrowser do:#viewBrowserMenu
@@ -4660,5 +4665,5 @@
!AbstractFileBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.16 2002-10-10 07:35:51 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.17 2002-10-12 00:48:29 cg Exp $'
! !
--- a/DirectoryContentsBrowser.st Fri Oct 11 17:44:36 2002 +0200
+++ b/DirectoryContentsBrowser.st Sat Oct 12 02:48:29 2002 +0200
@@ -81,8 +81,70 @@
^ 8
! !
+!DirectoryContentsBrowser class methodsFor:'image specs'!
+
+detailsMenuIcon2
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self detailsMenuIcon2 inspect
+ ImageEditor openOnClass:self andSelector:#detailsMenuIcon2
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'DirectoryContentsBrowser class detailsMenuIcon2'
+ ifAbsentPut:[(Depth1Image new) width: 11; height: 5; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 11; height: 5; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'* AT@B @D@@@@@@a') ; yourself); yourself]
+!
+
+detailsMenuIconR
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self detailsMenuIconR inspect
+ ImageEditor openOnClass:self andSelector:#detailsMenuIconR
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'DirectoryContentsBrowser class detailsMenuIconR'
+ ifAbsentPut:[(Depth1Image new) width: 5; height: 7; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 5; height: 7; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:' DB TJA@ @@a') ; yourself); yourself]
+! !
+
!DirectoryContentsBrowser class methodsFor:'interface specs'!
+detailsMenuIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self detailsMenuIcon inspect
+ ImageEditor openOnClass:self andSelector:#detailsMenuIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'DirectoryContentsBrowser class detailsMenuIcon'
+ ifAbsentPut:[(Depth1Image new) width: 7; height: 5; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 7; height: 5; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@W49DPDb') ; yourself); yourself]
+!
+
tableColumns
"This resource specification was automatically generated
by the DataSetBuilder of ST/X."
@@ -98,7 +160,10 @@
^#(
#(#DataSetColumnSpec
+ #label: #detailsMenuIconR
+ #labelIsImage: true
#labelButtonType: #Group
+ #labelActionSelector: #showDetailMenu
#width: 22
#minWidth: 22
#height: 16
@@ -418,18 +483,13 @@
#submenuChannel: #newMenu
)
#(#MenuItem
- #label: 'Update'
- #translateLabel: true
- #value: #doUpdate
- )
- #(#MenuItem
#label: 'Properties...'
#translateLabel: true
#value: #doShowProperties
#enabled: #hasSelection
)
#(#MenuItem
- #label: 'Others'
+ #label: 'More'
#submenu:
#(#Menu
#(
@@ -447,11 +507,7 @@
#enabled: #hasSelection
)
#(#MenuItem
- #label: 'Directory Up'
- #translateLabel: true
- #value: #doGoDirectoryUp
- #enabled: #enableDirectoryUp
- #shortcutKeyCharacter: #CursorLeft
+ #label: '-'
)
#(#MenuItem
#label: 'Open in TextEditor'
@@ -460,6 +516,9 @@
#enabled: #hasSelection
)
#(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
#label: 'Select All'
#translateLabel: true
#value: #doSelectAll
@@ -475,6 +534,14 @@
nil
)
)
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Update'
+ #translateLabel: true
+ #value: #doUpdate
+ )
)
nil
nil
@@ -579,11 +646,106 @@
)
#(#MenuItem
#label: '-'
+ #isVisible: false
)
#(#MenuItem
#label: 'Show Hidden Files'
#translateLabel: true
#indication: #showHiddenFiles
+ #isVisible: false
+ )
+ #(#MenuItem
+ #label: 'Update'
+ #translateLabel: true
+ #value: #doUpdate
+ #isVisible: false
+ )
+ )
+ nil
+ nil
+ )
+!
+
+viewDetailsMenuSpec
+ "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:DirectoryContentsBrowser andSelector:#viewBrowserMenu
+ (Menu new fromLiteralArrayEncoding:(DirectoryContentsBrowser viewBrowserMenu)) startUp
+ "
+
+ <resource: #menu>
+
+ ^
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Suffix'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewType
+ )
+ #(#MenuItem
+ #label: 'Permissions'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewPermissions
+ )
+ #(#MenuItem
+ #label: 'Owner'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewOwner
+ )
+ #(#MenuItem
+ #label: 'Group'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewGroup
+ )
+ #(#MenuItem
+ #label: 'Size'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewSize
+ )
+ #(#MenuItem
+ #label: 'Date && Time'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewTime
+ )
+ #(#MenuItem
+ #label: 'File Info'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewDescription
+ )
+ #(#MenuItem
+ #label: 'Preview'
+ #translateLabel: true
+ #hideMenuOnActivated: false
+ #enabled: #viewDetails
+ #indication: #viewPreview
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Hidden Files'
+ #translateLabel: true
+ #indication: #showHiddenFiles
)
)
nil
@@ -1394,6 +1556,10 @@
menu := viewBrowserMenu.
menu receiver:self.
^ menu
+!
+
+viewDetailsMenuSpec
+ ^self class viewDetailsMenuSpec
! !
!DirectoryContentsBrowser methodsFor:'menu actions'!
@@ -1722,7 +1888,7 @@
Exception handle:[:ex|
icon := nil.
] do:[ |scale extent w h |
- icon := Image fromFile:(aItem pathName).
+ icon := Image fromFile:(aItem fileName).
icon notNil ifTrue:[
extent := icon extent.
w := column width - 4.
@@ -2545,5 +2711,5 @@
!DirectoryContentsBrowser class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.14 2002-10-11 15:44:12 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.15 2002-10-12 00:48:10 cg Exp $'
! !
--- a/FileBrowserV2.st Fri Oct 11 17:44:36 2002 +0200
+++ b/FileBrowserV2.st Sat Oct 12 02:48:29 2002 +0200
@@ -298,9 +298,37 @@
#hideFilenameEntryField
'Hide Filename Field'
+#showFileDetails
+'Show File Details'
+
+#hideFileDetails
+'Hide File Details'
+
+#toggleDetails
+'Show/Hide File Details'
+
).
^ spec.
+!
+
+helpSpec
+ "This resource specification was automatically generated
+ by the UIHelpTool of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the UIHelpTool may not be able to read the specification."
+
+ "
+ UIHelpTool openOnClass:FileBrowserV2
+ "
+
+ <resource: #help>
+
+ ^super helpSpec addPairsFrom:#(
+
+
+)
! !
!FileBrowserV2 class methodsFor:'icon'!
@@ -343,6 +371,48 @@
^ ToolbarIconLibrary hideToolbarIconH26
! !
+!FileBrowserV2 class methodsFor:'image specs'!
+
+viewDetailsIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self viewDetailsIcon inspect
+ ImageEditor openOnClass:self andSelector:#viewDetailsIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'FileBrowserV2 class viewDetailsIcon'
+ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@]+X@@@@@]+X@@@@@]+X@@@@@]+X@@@@@@@@b') ; yourself); yourself]
+!
+
+viewNoDetailsIcon
+ "This resource specification was automatically generated
+ by the ImageEditor of ST/X."
+
+ "Do not manually edit this!! If it is corrupted,
+ the ImageEditor may not be able to read the specification."
+
+ "
+ self viewNoDetailsIcon inspect
+ ImageEditor openOnClass:self andSelector:#viewNoDetailsIcon
+ Icon flushCachedIcons
+ "
+
+ <resource: #image>
+
+ ^Icon
+ constantNamed:#'FileBrowserV2 class viewNoDetailsIcon'
+ ifAbsentPut:[(Depth1Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@A<@@@@@@A<@@@@@@A<@@@@@@A<@@@@@@@@@b') ; yourself); yourself]
+! !
+
!FileBrowserV2 class methodsFor:'interface specs'!
windowSpec
@@ -674,45 +744,67 @@
#(#Menu
#(
#(#MenuItem
- #label: 'View File List'
+ #label: 'Show'
#translateLabel: true
- #submenuChannel: #viewInContentsBrowserMenu
+ #submenu:
+ #(#Menu
+ #(
+ #(#MenuItem
+ #label: 'Hidden Files'
+ #translateLabel: true
+ #indication: #showHiddenFiles
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Directory Tree'
+ #translateLabel: true
+ #indication: #showDirectoryTreeHolder
+ )
+ #(#MenuItem
+ #label: 'Directory Description'
+ #translateLabel: true
+ #indication: #viewDirectoryDescription
+ )
+ #(#MenuItem
+ #label: 'Regular Files in TreeView (Left)'
+ #translateLabel: true
+ #indication: #viewFilesInDirectoryTree
+ )
+ #(#MenuItem
+ #label: 'Directories in ContentsView (Right)'
+ #translateLabel: true
+ #indication: #viewDirectoriesInDirectoryContentsBrowser
+ )
+ #(#MenuItem
+ #label: 'File Applications'
+ #translateLabel: true
+ #enabled: #enableViewNoteBookApplication
+ #indication: #viewNoteBookApplicationHolder
+ )
+ #(#MenuItem
+ #label: '-'
+ )
+ #(#MenuItem
+ #label: 'Open Multiple Applications'
+ #translateLabel: true
+ #indication: #openMultipleApplicationsForType
+ )
+ )
+ nil
+ nil
+ )
)
#(#MenuItem
- #label: 'Sort File List'
+ #label: 'Sort'
#translateLabel: true
#submenuChannel: #sortMenu
)
#(#MenuItem
- #label: 'View Directory Tree'
- #translateLabel: true
- #indication: #showDirectoryTreeHolder
- )
- #(#MenuItem
- #label: 'View Directory Description'
- #translateLabel: true
- #indication: #viewDirectoryDescription
- )
- #(#MenuItem
- #label: 'View Files in Tree'
+ #label: 'Details'
#translateLabel: true
- #indication: #viewFilesInDirectoryTree
- )
- #(#MenuItem
- #label: 'View Directories in Contents'
- #translateLabel: true
- #indication: #viewDirectoriesInDirectoryContentsBrowser
- )
- #(#MenuItem
- #label: 'View File Applications'
- #translateLabel: true
- #enabled: #enableViewNoteBookApplication
- #indication: #viewNoteBookApplicationHolder
- )
- #(#MenuItem
- #label: 'Open Multiple Applications'
- #translateLabel: true
- #indication: #openMultipleApplicationsForType
+ #submenuChannel: #viewInContentsBrowserMenu
)
#(#MenuItem
#label: '-'
@@ -971,6 +1063,16 @@
#activeHelpKey: #addTerminal
#labelImage: #(#ResourceRetriever #ToolbarIconLibrary #shell20x20WithoutTextIcon)
)
+ #(#MenuItem
+ #label: 'viewDetails'
+ #isButton: true
+ #startGroup: #right
+ "/ #value: #toggleFileDetailsFor:
+ #activeHelpKey: #toggleDetails
+ #labelImage: #(#ResourceRetriever nil #viewDetailsIcon)
+ #submenuChannel: #viewDetailsMenuSpec
+ #indication: #viewDetails
+ )
)
nil
nil
@@ -1173,6 +1275,21 @@
hideToolbar
self toolBarVisibleHolder value:false.
+!
+
+toggleFileDetailsFor:anItem
+ |viewDetails|
+
+ viewDetails := self viewDetails value not.
+ self viewDetails value:viewDetails.
+
+ viewDetails ifTrue:[
+ anItem activeHelpKey:#hideFileDetails.
+ anItem label:(self class viewNoDetailsIcon).
+ ] ifFalse:[
+ anItem activeHelpKey:#showFileDetails.
+ anItem label:(self class viewDetailsIcon).
+ ].
! !
!FileBrowserV2 methodsFor:'aspects'!
@@ -1342,7 +1459,7 @@
postBuildWith:aBuilder
super postBuildWith:aBuilder.
- self updateToolVisibility
+ self updateToolVisibility.
!
postOpenWith:aBuilder
@@ -1363,7 +1480,7 @@
!FileBrowserV2 class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.14 2002-10-11 10:47:55 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/FileBrowserV2.st,v 1.15 2002-10-12 00:48:20 cg Exp $'
! !
FileBrowserV2 initialize!