AbstractFileApplicationNoteBookComponent.st
changeset 8387 44efd774e4fc
parent 7689 f044f38e823c
child 8683 128a252ae16a
--- a/AbstractFileApplicationNoteBookComponent.st	Thu Oct 30 13:48:03 2008 +0100
+++ b/AbstractFileApplicationNoteBookComponent.st	Thu Oct 30 16:51:37 2008 +0100
@@ -181,21 +181,22 @@
 getTabString
     "get the tab string from the application"
 
-    ^ String streamContents:[:stream |
-        |formatString valueString|
-
-        valueString := self getTabValueString.
-        valueString isNil ifTrue:[
-            valueString := resources string:'<unnamed>'
-        ].
+    ^ (Unicode16String 
+        streamContents:[:stream |
+            |formatString valueString|
 
-        formatString := self class tabStringFor:type.
-        formatString isNil ifTrue:[
-            "/ default: take the class name
-            formatString := self className.
-        ].
-        stream nextPutAll:(resources string:formatString with:valueString).
-    ].
+            valueString := self getTabValueString.
+            valueString isNil ifTrue:[
+                valueString := resources string:'<unnamed>'
+            ].
+
+            formatString := self class tabStringFor:type.
+            formatString isNil ifTrue:[
+                "/ default: take the class name
+                formatString := self className.
+            ].
+            stream nextPutAll:(resources string:formatString with:valueString).
+        ]) asSingleByteStringIfPossible
 
     "Modified: / 01-03-2007 / 21:45:02 / cg"
 !
@@ -229,29 +230,28 @@
 getTabValueString
     "the item shown in a tab (not language translated)"
 
-    |stream|
-
     self item isNil ifTrue:[^ nil].
 
-    ^ String streamContents:[:stream |
-        |fn baseName|
+    ^ (Unicode16String 
+        streamContents:[:stream |
+            |fn baseName|
 
-        fn := self fileName.
-        baseName := fn baseName.
-        self type = #directoryDescription ifTrue:[
-            stream nextPutAll:(fn directory baseName).
-            stream space.
-            stream nextPut:$[.
-            stream nextPutAll:baseName.
-            stream nextPut:$].
-        ] ifFalse:[
-            stream nextPutAll:baseName.
-            stream space.
-            self sameFileIndex notNil ifTrue:[
-                stream nextPutAll:self sameFileIndex asString.
+            fn := self fileName.
+            baseName := fn baseName.
+            self type = #directoryDescription ifTrue:[
+                stream nextPutAll:(fn directory baseName).
+                stream space.
+                stream nextPut:$[.
+                stream nextPutAll:baseName.
+                stream nextPut:$].
+            ] ifFalse:[
+                stream nextPutAll:baseName.
+                stream space.
+                self sameFileIndex notNil ifTrue:[
+                    stream nextPutAll:self sameFileIndex asString.
+                ].
             ].
-        ].
-    ].
+        ]) asSingleByteStringIfPossible.
 
     "Created: / 01-03-2007 / 21:40:03 / cg"
 !
@@ -314,5 +314,5 @@
 !AbstractFileApplicationNoteBookComponent class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileApplicationNoteBookComponent.st,v 1.19 2007-03-01 20:48:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileApplicationNoteBookComponent.st,v 1.20 2008-10-30 15:51:37 cg Exp $'
 ! !