diff -r 19f6f7395968 -r 3f8311a42ca7 FileBrowserV2.st --- 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 + " + + + + ^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 + " + + + + ^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 + " + + + + ^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!