From 088a52a1cec23092d2c918cb121b44bd9391ee74 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 2 Mar 2021 12:42:21 +0000 Subject: [PATCH] * converted non-ascii characters in stddlg.pas to unicode and #XXX equivalents in the non-unicode version git-svn-id: branches/unicodekvm@48867 - --- packages/fv/src/stddlg.pas | 40 +++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/packages/fv/src/stddlg.pas b/packages/fv/src/stddlg.pas index 3eebbf5ffe..6a4bea07ec 100644 --- a/packages/fv/src/stddlg.pas +++ b/packages/fv/src/stddlg.pas @@ -1832,12 +1832,21 @@ begin end; procedure TDirListBox.NewDirectory(var ADir: DirStr); +{$ifdef FV_UNICODE} const - PathDir = 'ÀÄÂ'; - FirstDir = 'ÀÂÄ'; - MiddleDir = ' ÃÄ'; - LastDir = ' ÀÄ'; + PathDir = #$2514#$2500#$252C; + FirstDir = #$2514#$252C#$2500; + MiddleDir = ' '#$251C#$2500; + LastDir = ' '#$2514#$2500; IndentSize = ' '; +{$else FV_UNICODE} +const + PathDir = #192#196#194; + FirstDir = #192#194#196; + MiddleDir = ' '#195#196; + LastDir = ' '#192#196; + IndentSize = ' '; +{$endif FV_UNICODE} var AList: PCollection; NewDir, Dirct: DirStr; @@ -1943,16 +1952,29 @@ begin end; FindClose(SR); P := PDirEntry(AList^.At(AList^.Count-1))^.DisplayText; - I := Pos('À',P^); +{$ifdef FV_UNICODE} + I := Pos(#$2514,P^); if I = 0 then begin - I := Pos('Ã',P^); - if I <> 0 then P^[I] := 'À'; + I := Pos(#$251C,P^); + if I <> 0 then P^[I] := #$2514; end else begin - P^[I+1] := 'Ä'; - P^[I+2] := 'Ä'; + P^[I+1] := #$2500; + P^[I+2] := #$2500; end; +{$else FV_UNICODE} + I := Pos(#192,P^); + if I = 0 then + begin + I := Pos(#195,P^); + if I <> 0 then P^[I] := #192; + end else + begin + P^[I+1] := #196; + P^[I+2] := #196; + end; +{$endif FV_UNICODE} end; NewList(AList); FocusItem(NewCur);