mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: SyncDirs: 'DateTimeFormat' parameter (#1396)
(cherry picked from commit bd9285a1db)
This commit is contained in:
parent
ce59083c33
commit
5c3d354b26
2 changed files with 10 additions and 4 deletions
|
|
@ -919,7 +919,7 @@ begin
|
|||
TextRect(Rect(Left, aRect.Top, Left + Width, aRect.Bottom),
|
||||
x, aRect.Top + 2, s);
|
||||
end;
|
||||
s := DateTimeToStr(r.FFileL.ModificationTime);
|
||||
s := FormatDateTime(gDateTimeFormatSync, r.FFileL.ModificationTime);
|
||||
with hCols[2] do
|
||||
TextRect(Rect(Left, aRect.Top, Left + Width, aRect.Bottom),
|
||||
Left + 2, aRect.Top + 2, s)
|
||||
|
|
@ -933,7 +933,7 @@ begin
|
|||
TextRect(Rect(Left, aRect.Top, Left + Width, aRect.Bottom),
|
||||
x, aRect.Top + 2, s);
|
||||
end;
|
||||
s := DateTimeToStr(r.FFileR.ModificationTime);
|
||||
s := FormatDateTime(gDateTimeFormatSync, r.FFileR.ModificationTime);
|
||||
with hCols[4] do
|
||||
TextRect(Rect(Left, aRect.Top, Left + Width, aRect.Bottom),
|
||||
Left + 2, aRect.Top + 2, s)
|
||||
|
|
@ -2033,7 +2033,7 @@ var
|
|||
s := s + #9;
|
||||
s := s + IntToStr(SyncRec.FFileL.Size);
|
||||
s := s + #9;
|
||||
s := s + DateTimeToStr(SyncRec.FFileL.ModificationTime);
|
||||
s := s + FormatDateTime(gDateTimeFormatSync, SyncRec.FFileL.ModificationTime);
|
||||
end;
|
||||
if Length(s) <> 0 then
|
||||
s := s + #9;
|
||||
|
|
@ -2053,7 +2053,7 @@ var
|
|||
s := s + #9;
|
||||
if Assigned(SyncRec.FFileR) then
|
||||
begin
|
||||
s := s + DateTimeToStr(SyncRec.FFileR.ModificationTime);
|
||||
s := s + FormatDateTime(gDateTimeFormatSync, SyncRec.FFileR.ModificationTime);
|
||||
s := s + #9;
|
||||
s := s + IntToStr(SyncRec.FFileR.Size);
|
||||
s := s + #9;
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@ var
|
|||
gSyncDirsShowFilterSingles: Boolean;
|
||||
gSyncDirsFileMask: string;
|
||||
gSyncDirsFileMaskSave: Boolean;
|
||||
gDateTimeFormatSync : String;
|
||||
|
||||
{ Internal Associations}
|
||||
gFileAssociationLastCustomAction: string;
|
||||
|
|
@ -724,6 +725,7 @@ var
|
|||
gConfig: TXmlConfig = nil;
|
||||
gStyles: TJsonConfig = nil;
|
||||
DefaultDateTimeFormat: String;
|
||||
DefaultDateTimeFormatSync: String;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -2115,6 +2117,7 @@ begin
|
|||
gSyncDirsShowFilterSingles := True;
|
||||
gSyncDirsFileMask := '*';
|
||||
gSyncDirsFileMaskSave := True;
|
||||
gDateTimeFormatSync := DefaultDateTimeFormatSync;
|
||||
|
||||
{ Internal Associations}
|
||||
gFileAssociationLastCustomAction := rsMsgDefaultCustomActionName;
|
||||
|
|
@ -2223,6 +2226,7 @@ begin
|
|||
gErrorFile := gpCfgDir + ExtractOnlyFileName(Application.ExeName) + '.err';
|
||||
DefaultDateTimeFormat := FormatSettings.ShortDateFormat + ' hh:nn:ss';
|
||||
FormatSettings.DecimalSeparator:='.';
|
||||
DefaultDateTimeFormatSync := 'yyyy.mm.dd hh:nn:ss';
|
||||
end;
|
||||
|
||||
function OpenConfig(var ErrorMessage: String): Boolean;
|
||||
|
|
@ -3196,6 +3200,7 @@ begin
|
|||
gSyncDirsShowFilterSingles := GetValue(Node, 'FilterSingles', gSyncDirsShowFilterSingles);
|
||||
gSyncDirsFileMask := GetValue(Node, 'FileMask', gSyncDirsFileMask);
|
||||
gSyncDirsFileMaskSave := GetAttr(Node, 'FileMask/Save', gSyncDirsFileMaskSave);
|
||||
gDateTimeFormatSync := GetValidDateTimeFormat(GetValue(Node, 'DateTimeFormat', gDateTimeFormatSync), DefaultDateTimeFormatSync);
|
||||
end;
|
||||
|
||||
{ Internal Associations}
|
||||
|
|
@ -3770,6 +3775,7 @@ begin
|
|||
SetValue(Node, 'FilterSingles', gSyncDirsShowFilterSingles);
|
||||
SetValue(Node, 'FileMask', gSyncDirsFileMask);
|
||||
SetAttr(Node, 'FileMask/Save', gSyncDirsFileMaskSave);
|
||||
SetValue(Node, 'DateTimeFormat', gDateTimeFormatSync);
|
||||
|
||||
{ Internal Associations}
|
||||
Node := FindNode(Root, 'InternalAssociations', True);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue