diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-10-04 13:50:42 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-10-04 13:50:42 +0200 |
| commit | 7ff5d0838ad5bc7d93c9ae184f2a17284b479e9e (patch) | |
| tree | 39eeffeed2da32bbd403ee79d62d7dd1fa3cdbe4 | |
| parent | fab4a8aeab4cfd79760e7c806ab09f83d8056fd2 (diff) | |
| download | tuxcmd-7ff5d0838ad5bc7d93c9ae184f2a17284b479e9e.tar.xz | |
Display correct file dates and sizes in the Overwrite dialog respecting global format settingsv0.6.51
| -rw-r--r-- | UConfig.pas | 4 | ||||
| -rw-r--r-- | UCore.pas | 13 |
2 files changed, 11 insertions, 6 deletions
diff --git a/UConfig.pas b/UConfig.pas index 95f171e..22efc53 100644 --- a/UConfig.pas +++ b/UConfig.pas @@ -25,8 +25,8 @@ uses Classes, ULocale; resourcestring ConstAppTitle = 'Tux Commander'; - ConstAboutVersion = '0.6.50-dev'; - ConstAboutBuildDate = '2008-10-03'; + ConstAboutVersion = '0.6.51-dev'; + ConstAboutBuildDate = '2008-10-04'; {$IFDEF FPC} {$INCLUDE fpcver.inc} @@ -833,6 +833,7 @@ var DefResponse: integer; // Global variables for this function var Res, Response, ErrorKind, r: integer; Item: PDataItemSL; s, s1, s3, cap: string; + FromInfoLabel, ToInfoLabel, InfoLabelFormat: string; begin Result := True; try @@ -881,10 +882,14 @@ var DefResponse: integer; // Global variables for this function Response := DefResponse; Item := DestEngine.GetFileInfoSL(NewFilePath); if Response = 0 then begin - Response := ShowOverwriteDialog(1 + Ord(ParamBool3), Format(LANGOverwriteS, [StrToUTF8(NewFilePath)]), - Format(LANGOvewriteSBytesS, [FormatSize(Item^.Size, 0), FormatDateTime('ddddd t', Item^.ModifyTime)]), - Format(LANGWithFileS, [AFileRec^.FDisplayName]), - Format(LANGOvewriteSBytesS, [FormatSize(AFileRec^.Size, 0), FormatDateTime('ddddd t', AFileRec^.ModifyTime)]), + case ConfSizeFormat of + 5: InfoLabelFormat := '%s, %s'; + else InfoLabelFormat := LANGOvewriteSBytesS; + end; + FromInfoLabel := Format(InfoLabelFormat, [FormatSize(Item^.Size, 0), FormatDate(Item^.ModifyTime, True, True)]); + ToInfoLabel := Format(InfoLabelFormat, [FormatSize(AFileRec^.Size, 0), FormatDate(AFileRec^.ModifyTime, True, True)]); + Response := ShowOverwriteDialog(1 + Ord(ParamBool3), Format(LANGOverwriteS, [StrToUTF8(NewFilePath)]), FromInfoLabel, + Format(LANGWithFileS, [AFileRec^.FDisplayName]), ToInfoLabel, ExtractFileName(StrToUTF8(NewFilePath)), ExtractFileName(AFileRec^.FDisplayName), ExtractFileName(StrToUTF8(NewFilePath))); s := FOverwriteRenameStr; case Response of |
