DirectoryContentsBrowser.st
changeset 10559 e36369957676
parent 10300 5ed6f3d35cbb
child 11058 ab216c9278c6
--- a/DirectoryContentsBrowser.st	Mon Aug 08 21:49:39 2011 +0200
+++ b/DirectoryContentsBrowser.st	Tue Aug 09 18:21:14 2011 +0200
@@ -28,7 +28,7 @@
 Object subclass:#DirectoryContentsItem
 	instanceVariableNames:'fileName fileInfo icon fileType
 		contentsBrowserChangeModificationTime suffix preview group owner
-		timeAndDate mimeType iconKey mimeTypeForContents'
+		timeAndDate mimeType iconKey mimeTypeForContents baseName'
 	classVariableNames:'LastUIDToUserNameMapping LastGIDToGroupNameMapping'
 	poolDictionaries:''
 	privateIn:DirectoryContentsBrowser
@@ -3084,20 +3084,28 @@
 baseName
     "returns the baseName of the file"
 
-    ^ fileName baseName.
+    baseName isNil ifTrue:[
+        baseName := fileName baseName.
+        fileName isDirectory ifTrue:[
+            baseName := baseName allBold.
+        ].
+    ].
+    ^ baseName
+
+    "Modified: / 09-08-2011 / 14:48:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 baseNameWithOutSuffix
     "returns the baseName of the file"
 
-    | baseNameWithOutSuff |
+    | baseNameWithOutSuffix |
 
     self isDirectory ifTrue:[^ self baseName].
-    baseNameWithOutSuff := self baseName asFilename withoutSuffix asString.
-    (baseNameWithOutSuff isEmpty or:[baseNameWithOutSuff = '.']) ifTrue:[
+    baseNameWithOutSuffix := self baseName asFilename withoutSuffix asString.
+    (baseNameWithOutSuffix isEmpty or:[baseNameWithOutSuffix = '.']) ifTrue:[
         ^ self baseName
     ].
-    ^ baseNameWithOutSuff.
+    ^ baseNameWithOutSuffix.
 !
 
 date
@@ -3335,9 +3343,9 @@
 !DirectoryContentsBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.239 2011-07-09 13:53:19 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.240 2011-08-09 16:21:14 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.239 2011-07-09 13:53:19 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DirectoryContentsBrowser.st,v 1.240 2011-08-09 16:21:14 vrany Exp $'
 ! !