tvplanit: Display birthdate in contact edit dialog. Fix localization file not being found if its name contains the wrong path delimiter.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4865 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-06-29 11:02:25 +00:00
parent 08d356fd9f
commit ae8fecb42d
9 changed files with 77 additions and 23 deletions

View File

@@ -35,7 +35,7 @@ interface
uses
{$IFDEF LCL}
LMessages, LCLProc, LCLIntf,
LMessages, LCLProc, LCLIntf, LazFileUtils,
{$ELSE}
Windows, Messages,
{$ENDIF}
@@ -1351,16 +1351,19 @@ end;
{=====}
procedure TVpControlLink.SetLocalizationFile (const v : string);
var
fn: String;
begin
if v <> FLocalizationFile then begin
FLocalizationFile := v;
if (FLocalizationFile <> '') and
not (csDesigning in ComponentState) then begin
if not FileExists (v) then begin
if Assigned (FOnNoLocalizationFile) then
FOnNoLocalizationFile (Self, v);
if (FLocalizationFile <> '') and not (csDesigning in ComponentState) then
begin
fn := ExpandFilename(v);
if not FileExists(fn) then begin
if Assigned(FOnNoLocalizationFile) then
FOnNoLocalizationFile(Self, fn);
end else
FLocalization.LoadFromFile (FLocalizationFile, False);
FLocalization.LoadFromFile(fn, False);
end;
end;
end;