mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: Capability to set custom decimal separator
This commit is contained in:
parent
0f1f582578
commit
fea28f382b
1 changed files with 10 additions and 0 deletions
|
|
@ -763,6 +763,7 @@ var
|
|||
// loaded from configuration file
|
||||
gPreviousVersion: String = '';
|
||||
FInitList: array of TProcedure;
|
||||
CustomDecimalSeparator: String = #$EF#$BF#$BD;
|
||||
|
||||
function LoadConfigCheckErrors(LoadConfigProc: TLoadConfigProc;
|
||||
ConfigFileName: String;
|
||||
|
|
@ -2536,6 +2537,7 @@ procedure LoadXmlConfig;
|
|||
end;
|
||||
end;
|
||||
var
|
||||
DecimalSeparator: String;
|
||||
Root, Node, SubNode: TXmlNode;
|
||||
LoadedConfigVersion, iIndexContextMode: Integer;
|
||||
oldQuickSearch: Boolean = True;
|
||||
|
|
@ -3080,6 +3082,13 @@ begin
|
|||
{$IF DEFINED(UNIX) AND NOT (DEFINED(DARWIN) OR DEFINED(HAIKU))}
|
||||
gSystemItemProperties := GetValue(Node, 'SystemItemProperties', gSystemItemProperties);
|
||||
{$ENDIF}
|
||||
DecimalSeparator:= GetValue(Node, 'DecimalSeparator', FormatSettings.DecimalSeparator);
|
||||
if (Length(DecimalSeparator) > 0) and (Ord(DecimalSeparator[1]) < $80) and
|
||||
(DecimalSeparator[1] <> FormatSettings.DecimalSeparator) then
|
||||
begin
|
||||
CustomDecimalSeparator:= DecimalSeparator;
|
||||
FormatSettings.DecimalSeparator:= CustomDecimalSeparator[1];
|
||||
end;
|
||||
end;
|
||||
|
||||
{ Thumbnails }
|
||||
|
|
@ -3694,6 +3703,7 @@ begin
|
|||
{$IF DEFINED(UNIX) AND NOT (DEFINED(DARWIN) OR DEFINED(HAIKU))}
|
||||
SetValue(Node, 'SystemItemProperties', gSystemItemProperties);
|
||||
{$ENDIF}
|
||||
SetValue(Node, 'DecimalSeparator', CustomDecimalSeparator);
|
||||
|
||||
{ Thumbnails }
|
||||
Node := FindNode(Root, 'Thumbnails', True);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue